report status to stderr instead of stdout#2693
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
... on the stable compiler. There should be even for failures for nightly |
Will help to fix [cargo-issue] [cargo-issue]: rust-lang/cargo#2693
Will help to fix [cargo-issue] [cargo-issue]: rust-lang/cargo#2693
|
91 failures left :) |
|
Hm, I found an interesting phenomena: some tests before this changed asserted |
|
@matklad yeah that's probably a split between "intentionally ignored", "too lazy to write out the output", or "oops forgot to assert that output". It should be fine to either add the assertions or switch to Also cc @rust-lang/tools, a somewhat large-ish semantic change to Cargo! |
Nice, I indeed feel a little uneasy because of the scope of the change (Although I personally think that stderr is the right stream for the status messages). I'll then wait for an explicit approval before I continue fixing the tests :) |
|
+1 for more disciplined use of stderr/out |
|
I agree that stderr is the right place for status messages. How will this affect |
|
@brson in theory it won't affect |
|
Discussed during tools triage we were all on board, so let's do this! Wanna fix up the few remaining tests @matklad and I'll merge? |
Yeah, I'll do it, but I can't give a precise ETA (this weak perheps?). The remaining tests most likely all require some manual intervention. |
|
Ah yeah no worries, and if you run out of time I can help out as well |
| .file("src/lib.rs", r#" | ||
| #[cfg(test)] extern crate bar; | ||
| #[cfg(not(test))] fn foo() { env!("FOO"); } | ||
| #[cfg(not(test))] pub fn foo() { env!("FOO"); } |
There was a problem hiding this comment.
@alexcrichton this tests looks a bit strange. Looks like it should set and read an environmental variable, but it actually is never asserted (and "unused function foo" is printed during the compilation).
Perhaps the test doesn't test what it is supposed to?
There was a problem hiding this comment.
I believe the env! macro fails compilation if the env var isn't defined
|
@alexcrichton I think I have fixed all the tests except the cross compile ones (one does not simply link stuff on nixos :) ). Can you please finish the work here? I think the commits should be squashed before merge, but it may be simpler to review them one by one. |
Report status to stderr -- last few tests Fixup of #2693 for the last few tests.
All status messages are printed to stderr instead of stdout now.
This changes exactly three letters of code and breaks 211 tests 😨
I will hopefully fix all the tests here, but I decided to submit PR early in case somebody comes up with a less laborious way to do this.
Fixes #1473, #2661