-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Make x.py less verbose on failures #86856
Conversation
I'd prefer to keep the time and "unsuccessfully" line - I find it slightly helpful at least and it seems pretty harmless. Other changes seem great (haven't looked at code yet). |
- Don't print the exact command run by rustbuild unless `--verbose` is set. This is almost always unhelpful, since it's just cargo with a lot of arguments. - Don't print "Build completed unsuccessfully" unless --verbose is set. You can already tell the build failed by the errors above, and the time isn't particularly helpful. - Don't print the full path to bootstrap. This is useless to everyone, even including when working on x.py itself. You can still opt-in to this being shown with `--verbose`, since it will throw an exception. Before: ``` error[E0432]: unresolved import `x` --> library/std/src/lib.rs:343:5 | 343 | use x; | ^ no external crate `x` error: aborting due to previous error For more information about this error, try `rustc --explain E0432`. error: could not compile `std` To learn more, run the command again with --verbose. command did not execute successfully: "/home/joshua/rustc4/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--features" "panic-unwind backtrace" "--manifest-path" "/home/joshua/rustc4/library/test/Cargo.toml" "--message-format" "json-render-diagnostics" expected success, got: exit status: 101 failed to run: /home/joshua/rustc4/build/bootstrap/debug/bootstrap check Build completed unsuccessfully in 0:00:13 ``` After: ``` error[E0432]: unresolved import `x` --> library/std/src/lib.rs:343:5 | 343 | use x; | ^ no external crate `x` error: aborting due to previous error For more information about this error, try `rustc --explain E0432`. error: could not compile `std` To learn more, run the command again with --verbose. ```
Sure, done. (I don't find it particularly useful, but we can always remove it later and getting rid of the other three lines seems really helpful.) |
I added it exactly because you cannot, and because it's helpful. |
@bors r+ rollup |
📌 Commit fad1b9c has been approved by |
Rollup of 8 pull requests Successful merges: - rust-lang#86477 (E0716: clarify that equivalent code example is erroneous) - rust-lang#86623 (Add check to ensure error code explanations are not removed anymore even if not emitted) - rust-lang#86856 (Make x.py less verbose on failures) - rust-lang#86858 (Stabilize `string_drain_as_str`) - rust-lang#86859 (Add a regression test for issue-69323) - rust-lang#86862 (re-export SwitchIntEdgeEffects) - rust-lang#86864 (Add missing code example for Write::write_vectored) - rust-lang#86874 (Bump deps) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
--verbose
is set.This is almost always unhelpful, since it's just cargo with a lot of
arguments (and you can't replicate it anyway unless you have the environment variables, which aren't printed by default).
You can already tell the build failed by the errors above, and the
time isn't particularly helpful.
even including when working on x.py itself. You can still opt-in to
this being shown with
--verbose
, since it will throw an exception.Before:
After:
cc #86854, #86022
r? @Mark-Simulacrum