-
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
Anonymize some line numbers in UI test output #48449
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
LL | &self[x] | ||
| ------- recursive call site | ||
| | ||
= help: a `loop` may express intention better if this is on purpose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of a test with "long" actual numbers that become "short" anonymized numbers.
This doesn't deal with the line number in the |
LL | / fn foo<'a,'b,T>(x: &'a T, y: &'b T) //~ ERROR type annotations required | ||
LL | | where &'a T : Foo, | ||
LL | | &'b T : Foo | ||
LL | | { | ||
19 | | x.foo(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a line number left here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, noticed these too late, will fix today or tomorrow.
I haven't figured out yet where they come from.
|
☔ The latest upstream changes (presumably #47799) made this pull request unmergeable. Please resolve the merge conflicts. |
Updated. |
Now that we have the @bors r+ |
📌 Commit a1065b4 has been approved by |
🌲 The tree is currently closed for pull requests below priority 99, this pull request will be tested once the tree is reopened |
@bors p=1 |
☔ The latest upstream changes (presumably #48476) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r=nikomatsakis |
📌 Commit b94e8a4 has been approved by |
🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened |
Looks like now 64-bit AppVeyor is starting to hit the timeout as well :/ |
check-aux is timing out quite a lot actually. Perhaps doing cargo-test + pretty test together is too long for Windows. I’m thinking of moving one of the check-aux tests to the tools builder, but we need to figure out which ones can balance the time. |
Anonymize some line numbers in UI test output New unstable flag `-Z ui-testing` is introduced. This flag changes diagnostic output of the compiler *in some way* making it more suitable for UI testing (this is intentionally vague). At the moment this flag anonymizes line numbers at line starts thus solving the largest issue with UI test diffs. If diffs continue to be too noisy, some other tweaks could be applied (e.g. anonymizing lines/columns in `--> $DIR/file.rs:line:column`), but this needs some time and experience (we shouldn't diverge too much from the actual output in general). If comment `// disable-ui-testing-normalization` is added to an UI test, then `-Z ui-testing` is not passed. Closes #46643
☀️ Test successful - status-appveyor, status-travis |
This reverts commit 1dc2015, which switched to compiling the UI tests twice rather than extracting the humanized output from a field in the JSON output. A conflict in this revert commit had to be fixed manually where changes introduced in rust-lang#48449 collide with the change we're trying to revert (from rust-lang#48337). This is in the matter of rust-lang#48550. Conflicts: src/tools/compiletest/src/runtest.rs
This reverts commit 9b597a1. That commit added a message informing users about the `rustc --explain` functionality inside of a `Drop` implementation for `EmitterWriter`. In addition to exhibiting questionable semantics (printing a hopefully-helpful message for the user does not seem like a "cleanup" action), this resulted in divergent behavior between humanized output and JSON output, because the latter actually instantiates an `EmitterWriter` for every diagnostic. Several conflicts in this revert commit had to be fixed manually, again owing to code-area collision between rust-lang#48449 and rust-lang#48337. This is in the matter of rust-lang#48550. Conflicts: src/librustc_errors/emitter.rs
New unstable flag
-Z ui-testing
is introduced. This flag changes diagnostic output of the compiler in some way making it more suitable for UI testing (this is intentionally vague).At the moment this flag anonymizes line numbers at line starts thus solving the largest issue with UI test diffs. If diffs continue to be too noisy, some other tweaks could be applied (e.g. anonymizing lines/columns in
--> $DIR/file.rs:line:column
), but this needs some time and experience (we shouldn't diverge too much from the actual output in general).If comment
// disable-ui-testing-normalization
is added to an UI test, then-Z ui-testing
is not passed.Closes #46643