Skip to content

Conversation

@zackmdavis
Copy link
Contributor

See discussion on #48550 for justification.

(As the commit messages note, there were some conflicts; this wasn't a sheerly mechanical revert. But this should—pending Travis's verdict—get us back to the old extract-rendered-from-JSON UI testing regime, after which an --explain usage note can be reimplemented in a cleaner way at leisure.)

cc @GuillaumeGomez @estebank

r? @petrochenkov

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
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 28, 2018
@zackmdavis zackmdavis force-pushed the ui_test_efficiencies branch from 84588c1 to a46a511 Compare March 1, 2018 00:40
@GuillaumeGomez
Copy link
Member

I'm not a big fan of a revert but if we're in a hurry, we don't have a better idea... I have a work in progress to fix this which would allow to just make it work with json output.

@petrochenkov
Copy link
Contributor

I have a work in progress to fix this which would allow to just make it work with json output

Ok, let's wait for "--explain usage from json" then.
(I'll probably land this PR instead if "--explain usage from json" do not materialize in couple of weeks.)

@petrochenkov petrochenkov added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2018
@GuillaumeGomez
Copy link
Member

The only remaining issue for the fix is some invalid error emission but otherwise it's almost done.

@zackmdavis
Copy link
Contributor Author

@GuillaumeGomez awesome, let's close this in favor of #48684 💖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-blocked Status: Blocked on something else such as an RFC or other implementation work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants