Skip to content
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

Merged
merged 1 commit into from
Jul 5, 2021
Merged

Commits on Jul 4, 2021

  1. 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.
    - 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.
    ```
    jyn514 committed Jul 4, 2021
    Configuration menu
    Copy the full SHA
    fad1b9c View commit details
    Browse the repository at this point in the history