-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require a colon in //@ normalize-*:
test headers
#126777
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu |
The pattern I used for find/replace was:
|
This comment has been minimized.
This comment has been minimized.
0202259
to
e3077f1
Compare
This comment has been minimized.
This comment has been minimized.
e3077f1
to
d9566ee
Compare
This comment has been minimized.
This comment has been minimized.
d9566ee
to
27db617
Compare
Require a colon in `//@ normalize-*:` test headers The previous parser for `//@ normalize-*` headers (before rust-lang#126370) was so lax that it did not require `:` after the header name. As a result, the test suite contained a mix of with-colon and without-colon normalize headers, both numbering in the hundreds. This PR updates the without-colon headers to add a colon (matching the style used by other headers), and then updates the parser to make the colon mandatory. (Because the normalization parser only runs *after* the header system identifies a normalize header, this will detect and issue an error for relevant headers that lack the colon.) Addresses one of the points of rust-lang#126372.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
27db617
to
5d099f8
Compare
5d099f8
to
b677359
Compare
Indeed, there have been a few normalize directives without a colon added over the last few weeks (diff). |
PR CI is green; let's try this again. @bors r=lcnr |
Seeing actual failures makes me think that the error message could use some improvement, but I'd rather get the check merged before it rots again. I can worry about diagnostics in a follow-up. |
Require a colon in `//@ normalize-*:` test headers The previous parser for `//@ normalize-*` headers (before rust-lang#126370) was so lax that it did not require `:` after the header name. As a result, the test suite contained a mix of with-colon and without-colon normalize headers, both numbering in the hundreds. This PR updates the without-colon headers to add a colon (matching the style used by other headers), and then updates the parser to make the colon mandatory. (Because the normalization parser only runs *after* the header system identifies a normalize header, this will detect and issue an error for relevant headers that lack the colon.) Addresses one of the points of rust-lang#126372.
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
linker error @bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (fdf7ea6): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 2.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -4.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 703.344s -> 703.866s (0.07%) |
…iser compiletest: Better error message for bad `normalize-*` headers Follow-up to rust-lang#126777. Example of the new error message in context: ```text ---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs stdout ---- thread '[ui] tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs' panicked at src/tools/compiletest/src/header.rs:1001:13: couldn't parse custom normalization rule: `normalize-stderr-test ".*note: .*\n\n" -> ""` help: expected syntax is: `normalize-stderr-test: "REGEX" -> "REPLACEMENT"` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
Rollup merge of rust-lang#127607 - Zalathar:normalize-hint, r=wesleywiser compiletest: Better error message for bad `normalize-*` headers Follow-up to rust-lang#126777. Example of the new error message in context: ```text ---- [ui] tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs stdout ---- thread '[ui] tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs' panicked at src/tools/compiletest/src/header.rs:1001:13: couldn't parse custom normalization rule: `normalize-stderr-test ".*note: .*\n\n" -> ""` help: expected syntax is: `normalize-stderr-test: "REGEX" -> "REPLACEMENT"` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
The previous parser for
//@ normalize-*
headers (before #126370) was so lax that it did not require:
after the header name. As a result, the test suite contained a mix of with-colon and without-colon normalize headers, both numbering in the hundreds.This PR updates the without-colon headers to add a colon (matching the style used by other headers), and then updates the parser to make the colon mandatory.
(Because the normalization parser only runs after the header system identifies a normalize header, this will detect and issue an error for relevant headers that lack the colon.)
Addresses one of the points of #126372.