-
Notifications
You must be signed in to change notification settings - Fork 13k
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
bootstrap: Normal compiler errors should not panic rustbuild #53379
Comments
We should get this I think in 4ish weeks, the fix has landed in cargo but we don't plan to backport it to beta. |
Well, we can fix the panic, that's separate. |
Yeah I was about to ask which role cargo plays here? It is the process being run, sure, but it seems like the problem is bootstrap asserting a successful execution, and panicking otherwise. |
The caused by and process didn't execute successfully lines take up space too and are printed by Cargo. |
Ah I see. Yeah the biggest space-eater here is the "process didn't exit successfully". However, once you run with RUST_BACKTRACE, the fact that it panics is also more than just aesthetics (panics are for unexpected errors, a compile failure is not so unexpected) -- it means that two backtraces are shown, the lower one usually filling the entire screen already. |
do not panic just because cargo failed Currently, a rustc ICE during bootstrap shows *two* backtraces with `RUST_BACKTRACE`. Fix that by making bootstrap just exit when cargo fails. This matches what we do [when building a tool fails](https://github.com/rust-lang/rust/blob/master/src/bootstrap/tool.rs#L189) and [when other stuff (not called through `stream_cargo`, like `cargo test`) fails](https://github.com/rust-lang/rust/blob/master/src/build_helper/lib.rs#L43). Fixes rust-lang#53379
do not panic just because cargo failed Currently, a rustc ICE during bootstrap shows *two* backtraces with `RUST_BACKTRACE`. Fix that by making bootstrap just exit when cargo fails. This matches what we do [when building a tool fails](https://github.com/rust-lang/rust/blob/master/src/bootstrap/tool.rs#L189) and [when other stuff (not called through `stream_cargo`, like `cargo test`) fails](https://github.com/rust-lang/rust/blob/master/src/build_helper/lib.rs#L43). Fixes rust-lang#53379
do not panic just because cargo failed Currently, a rustc ICE during bootstrap shows *two* backtraces with `RUST_BACKTRACE`. Fix that by making bootstrap just exit when cargo fails. This matches what we do [when building a tool fails](https://github.com/rust-lang/rust/blob/master/src/bootstrap/tool.rs#L189) and [when other stuff (not called through `stream_cargo`, like `cargo test`) fails](https://github.com/rust-lang/rust/blob/master/src/build_helper/lib.rs#L43). Fixes rust-lang#53379
When there is an error building rustc, there always is a 20-line wall of text below the actual error message:
Things get even worse when
RUST_BACKTRACE
is enabled because one is debugging something in the compiler, and the stage 1 build panics -- then we get two backtraces.At least in the default configuration, bootstrap should not panic when cargo failed, it should exit gracefully.
The text was updated successfully, but these errors were encountered: