Add tests for --document-hidden-items option#113857
Merged
bors merged 2 commits intorust-lang:masterfrom Jul 20, 2023
Merged
Conversation
cbb42c7 to
d9753d7
Compare
GuillaumeGomez
commented
Jul 19, 2023
| except UnicodeEncodeError: | ||
| args = [arg.decode('utf-8') for arg in shlex.split(args.encode('utf-8'))] | ||
| except Exception as exc: | ||
| raise Exception("line {}: {}".format(lineno + 1, exc)) from None |
Member
Author
There was a problem hiding this comment.
The from None part is to go from:
Traceback (most recent call last):
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 274, in get_commands
args = shlex.split(args)
File "/usr/lib/python3.10/shlex.py", line 315, in split
return list(lex)
File "/usr/lib/python3.10/shlex.py", line 300, in __next__
token = self.get_token()
File "/usr/lib/python3.10/shlex.py", line 109, in get_token
raw = self.read_token()
File "/usr/lib/python3.10/shlex.py", line 191, in read_token
raise ValueError("No closing quotation")
ValueError: No closing quotation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 708, in <module>
check(sys.argv[1], get_commands(rust_test_path))
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 691, in check
for c in commands:
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 278, in get_commands
raise Exception("line {}: {}".format(lineno, exc))
Exception: line 56: No closing quotation
to:
Traceback (most recent call last):
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 708, in <module>
check(sys.argv[1], get_commands(rust_test_path))
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 691, in check
for c in commands:
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 278, in get_commands
raise Exception("line {}: {}".format(lineno + 1, exc)) from None
Exception: line 57: No closing quotation
Contributor
|
@bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 20, 2023
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#113710 (Fix rpath for libdir is specified) - rust-lang#113787 (Update documentation for std::process::Command's new method) - rust-lang#113795 (Properly document `lifetime_mapping` in `OpaqueTy`) - rust-lang#113857 (Add tests for `--document-hidden-items` option) - rust-lang#113871 (Use the correct span for displaying the line following a derive sugge…) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since
--document-hidden-itemswas greatly fixed/improved in #113574, thought it might be worth adding some more tests for it to prevent new regressions.As for the first commit, it allows to go from:
to:
Having the line where the error occurred is quite useful.
r? @notriddle