Repository navigation
compiletest: Further clean up directive parsing - #165651
Conversation
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
These refactorings aren't the most exciting, I wanted to do more but ran out of time last Sunday as I had to dip. One "large" thing I want to do eventually is to avoid reparsing directives. AFAICT for the UI test suite, we always parse directives twice, first when "constructing" the test ( For that I could be mistaken but for the rustdoc-html test suite it seemed like we parse directives 4 times. Needs investigation. Once we only parse directives once, it should be easier to make errors in |
5f8f169 to
2c1918d
Compare
This comment has been minimized.
This comment has been minimized.
|
I've addressed your comments and implemented some more checks (as alluded to in my Zulip PM):
>>> Changes since your last review <<<. @rustbot review |
b71bb77 to
edb7c1f
Compare
This comment has been minimized.
This comment has been minimized.
3bf4f7d to
f174681
Compare
This comment has been minimized.
This comment has been minimized.
f174681 to
f18a370
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
And stop accepting empty directive names & empty values (after the `:`).
…vision conditions
f18a370 to
6da2875
Compare
@rustbot review Edit: And I know, having so many separate I don't consider this to be the final design. Ideally, we would not only bubble up the error but actually report multiple errors at once where possible. In the far future, we might even replace all these |
6da2875 to
23679e8
Compare
* Reject revision names that aren't a sequence of alphanumeric chars, `-` and `_`. * Reject conditional `revision` directives (e.g., `//@[r] revisions: q`).
23679e8 to
8e47edf
Compare
Yep, any incr improvement here is good. |
…ouxu compiletest: Further clean up directive parsing See individual commits for details. Follow-up to rust-lang#165576 and rust-lang#165483. Fixes rust-lang#123765. r? jieyouxu <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…ouxu compiletest: Further clean up directive parsing See individual commits for details. Follow-up to rust-lang#165576 and rust-lang#165483. Fixes rust-lang#123765. r? jieyouxu <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…uwer Rollup of 7 pull requests Successful merges: - #164252 (Share retain implementation between Vec and VecDeque) - #166171 (borrowck: Fix Reborrow ICE on types with several lifetimes) - #166506 (traits: Fix dead match arm for String type suggestions.) - #164542 (Add regression test for #151312) - #165651 (compiletest: Further clean up directive parsing) - #166196 (autodiff: don't ICE on invalid macro arguments) - #166556 (remove `Box::into_boxed_slice`)
…uwer Rollup of 10 pull requests Successful merges: - #164252 (Share retain implementation between Vec and VecDeque) - #166008 (fix inconsistent precedence of -Ctarget-feature wrt -Zllvm-target-feature) - #166156 (tests: cover proc-macro metadata path remapping) - #166171 (borrowck: Fix Reborrow ICE on types with several lifetimes) - #166506 (traits: Fix dead match arm for String type suggestions.) - #164542 (Add regression test for #151312) - #165651 (compiletest: Further clean up directive parsing) - #166196 (autodiff: don't ICE on invalid macro arguments) - #166556 (remove `Box::into_boxed_slice`) - #166562 (docs: add backticks around `!` in primitive docs )
…uwer Rollup of 10 pull requests Successful merges: - #164252 (Share retain implementation between Vec and VecDeque) - #166008 (fix inconsistent precedence of -Ctarget-feature wrt -Zllvm-target-feature) - #166156 (tests: cover proc-macro metadata path remapping) - #166171 (borrowck: Fix Reborrow ICE on types with several lifetimes) - #166506 (traits: Fix dead match arm for String type suggestions.) - #164542 (Add regression test for #151312) - #165651 (compiletest: Further clean up directive parsing) - #166196 (autodiff: don't ICE on invalid macro arguments) - #166556 (remove `Box::into_boxed_slice`) - #166562 (docs: add backticks around `!` in primitive docs )
Rollup merge of #165651 - fmease:comptest-dir-improv, r=jieyouxu compiletest: Further clean up directive parsing See individual commits for details. Follow-up to #165576 and #165483. Fixes #123765. r? jieyouxu <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…uwer Rollup of 10 pull requests Successful merges: - rust-lang/rust#164252 (Share retain implementation between Vec and VecDeque) - rust-lang/rust#166008 (fix inconsistent precedence of -Ctarget-feature wrt -Zllvm-target-feature) - rust-lang/rust#166156 (tests: cover proc-macro metadata path remapping) - rust-lang/rust#166171 (borrowck: Fix Reborrow ICE on types with several lifetimes) - rust-lang/rust#166506 (traits: Fix dead match arm for String type suggestions.) - rust-lang/rust#164542 (Add regression test for rust-lang/rust#151312) - rust-lang/rust#165651 (compiletest: Further clean up directive parsing) - rust-lang/rust#166196 (autodiff: don't ICE on invalid macro arguments) - rust-lang/rust#166556 (remove `Box::into_boxed_slice`) - rust-lang/rust#166562 (docs: add backticks around `!` in primitive docs )
View all comments
See individual commits for details. Follow-up to #165576 and #165483.
Fixes #123765.
r? jieyouxu
(No LLM was or will be used by me during the entire creation process of this PR)