]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #86856 - jyn514:x.py-less-verbose, r=Mark-Simulacrum
authorYuki Okushi <jtitor@2k36.org>
Sun, 4 Jul 2021 22:13:24 +0000 (07:13 +0900)
committerGitHub <noreply@github.com>
Sun, 4 Jul 2021 22:13:24 +0000 (07:13 +0900)
commit249d872901f9791799e1230ebdf11d4fc8df86e2
tree92552c4af40046717ae7d1ded1cd53a5f883d15f
parentac880e5e3952c09fbce4df3da86537d33ea7ece2
parentfad1b9c3ba98f2018a33de523b241be622d32c0c
Rollup merge of #86856 - jyn514:x.py-less-verbose, r=Mark-Simulacrum

Make x.py less verbose on failures

- 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 (and you can't replicate it anyway unless you have the environment variables, which aren't printed by default).
- 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.
```

cc https://github.com/rust-lang/rust/issues/86854, https://github.com/rust-lang/rust/pull/86022

r? `@Mark-Simulacrum`