-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
handle precompiled compiler more properly #138205
Conversation
rustbot has assigned @albertlarsan68. Use |
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@bors p=100 |
c35c24e
to
8042e00
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Thanks for the quick fix, the logic here looks correct to me AFAICT. @bors r+ rollup=never |
☀️ Test successful - checks-actions |
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
Finished benchmarking commit (cdd8af2): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -2.8%, secondary 2.9%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 1.7%, secondary 1.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 766.756s -> 766.8s (0.01%) |
bootstrap: Fix stack printing when a step cycle is detected When bootstrap detects a step dependency cycle (which represents a bootstrap bug), it is supposed to print out the contents of the step stack as part of its panic message. However, while investigating rust-lang#138205 it was found that bootstrap was actually printing out several copies of `Any { .. }`, because that is the Debug implementation for `dyn Any`. This is sadly not very helpful. This PR fixes that problem by introducing a `trait AnyDebug: Any + Debug` that delegates to the underlying type's Debug implementation, while still allowing downcasting via Any. --- The fixed behaviour can be verified manually (and is tested automatically) via a new dummy command, `./x run cyclic-step`: ``` $ x run cyclic-step Building bootstrap Finished `dev` profile [unoptimized] target(s) in 0.02s thread 'main' panicked at src/bootstrap/src/core/builder/mod.rs:1521:17: Cycle in build detected when adding CyclicStep { n: 0 } CyclicStep { n: 0 } CyclicStep { n: 1 } CyclicStep { n: 2 } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:00 ```
bootstrap: Fix stack printing when a step cycle is detected When bootstrap detects a step dependency cycle (which represents a bootstrap bug), it is supposed to print out the contents of the step stack as part of its panic message. However, while investigating rust-lang#138205 it was found that bootstrap was actually printing out several copies of `Any { .. }`, because that is the Debug implementation for `dyn Any`. This is sadly not very helpful. This PR fixes that problem by introducing a `trait AnyDebug: Any + Debug` that delegates to the underlying type's Debug implementation, while still allowing downcasting via Any. --- The fixed behaviour can be verified manually (and is tested automatically) via a new dummy command, `./x run cyclic-step`: ``` $ x run cyclic-step Building bootstrap Finished `dev` profile [unoptimized] target(s) in 0.02s thread 'main' panicked at src/bootstrap/src/core/builder/mod.rs:1521:17: Cycle in build detected when adding CyclicStep { n: 0 } CyclicStep { n: 0 } CyclicStep { n: 1 } CyclicStep { n: 2 } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:00 ```
Rollup merge of rust-lang#138216 - Zalathar:any-debug, r=onur-ozkan bootstrap: Fix stack printing when a step cycle is detected When bootstrap detects a step dependency cycle (which represents a bootstrap bug), it is supposed to print out the contents of the step stack as part of its panic message. However, while investigating rust-lang#138205 it was found that bootstrap was actually printing out several copies of `Any { .. }`, because that is the Debug implementation for `dyn Any`. This is sadly not very helpful. This PR fixes that problem by introducing a `trait AnyDebug: Any + Debug` that delegates to the underlying type's Debug implementation, while still allowing downcasting via Any. --- The fixed behaviour can be verified manually (and is tested automatically) via a new dummy command, `./x run cyclic-step`: ``` $ x run cyclic-step Building bootstrap Finished `dev` profile [unoptimized] target(s) in 0.02s thread 'main' panicked at src/bootstrap/src/core/builder/mod.rs:1521:17: Cycle in build detected when adding CyclicStep { n: 0 } CyclicStep { n: 0 } CyclicStep { n: 1 } CyclicStep { n: 2 } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:00 ```
Fixes the build cycle problem reported on #t-infra/bootstrap > Cycle on `aarch64-apple`.