Skip to content

Only force backtraces when a panic occurs in bootstrap#159270

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Kobzol:bootstrap-panic
Jul 15, 2026
Merged

Only force backtraces when a panic occurs in bootstrap#159270
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Kobzol:bootstrap-panic

Conversation

@Kobzol

@Kobzol Kobzol commented Jul 14, 2026

Copy link
Copy Markdown
Member

In #159040, I forced a backtrace to be printed in bootstrap when a panic happens. However, since bootstrap also captures backtraces manually during command execution, this meant that backtraces started to be printed during "normal" bootstrap failures (e.g. if tidy returned a failure), which is annoying.

This PR changes it so that the override only happens ona actual panics.

Note: bootstrap still uses a lot of panics for "normal" error conditions during a build, rather than for actual bugs or weird bootstrap situations. Those should ideally be replaced with exit!(1).

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 14, 2026
@rustbot

rustbot commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@jieyouxu jieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this makes sense
@bors r+ rollup

View changes since this review

@rust-bors

rust-bors Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9aa459e has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 15, 2026
rust-bors Bot pushed a commit that referenced this pull request Jul 15, 2026
Rollup of 5 pull requests

Successful merges:

 - #156712 (Pointer authentication config and user facing options)
 - #158522 (Lint against invalid POSIX symbol definitions)
 - #159229 (ast_lowering: Reject invalid direct_const_arg owners)
 - #159270 (Only force backtraces when a panic occurs in bootstrap)
 - #159308 (Reorganize `tests/ui/issues` [24/N])
@rust-bors
rust-bors Bot merged commit de4e2ee into rust-lang:main Jul 15, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 15, 2026
@Kobzol
Kobzol deleted the bootstrap-panic branch July 15, 2026 13:34
rust-timer added a commit that referenced this pull request Jul 15, 2026
Rollup merge of #159270 - Kobzol:bootstrap-panic, r=jieyouxu

Only force backtraces when a panic occurs in bootstrap

In #159040, I forced a backtrace to be printed in bootstrap when a panic happens. However, since bootstrap also captures backtraces manually during command execution, this meant that backtraces started to be printed during "normal" bootstrap failures (e.g. if tidy returned a failure), which is annoying.

This PR changes it so that the override only happens ona actual panics.

Note: bootstrap still uses a lot of panics for "normal" error conditions during a build, rather than for actual bugs or weird bootstrap situations. Those should ideally be replaced with `exit!(1)`.
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Jul 16, 2026
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#156712 (Pointer authentication config and user facing options)
 - rust-lang/rust#158522 (Lint against invalid POSIX symbol definitions)
 - rust-lang/rust#159229 (ast_lowering: Reject invalid direct_const_arg owners)
 - rust-lang/rust#159270 (Only force backtraces when a panic occurs in bootstrap)
 - rust-lang/rust#159308 (Reorganize `tests/ui/issues` [24/N])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants