-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Delayed CTFE backtraces #54487
Delayed CTFE backtraces #54487
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @oli-obk |
This comment has been minimized.
This comment has been minimized.
375e17b
to
b8d593f
Compare
needs a rebase |
oh sorry, nevermind. I was sure the other PR was merged :/ |
b8d593f
to
c058606
Compare
This comment has been minimized.
This comment has been minimized.
…he backtrace delayed The env var is now RUST_CTFE_BACKTRACE. Similar to RUST_BACKTRACE, it usually only prints a backtrace when the error actually surfaces, not when it happens. This makes a difference when we catch errors. As per @oli-obk's request, one can set RUST_CTFE_BACKTRACE=immediate to get the backtrace shown immediately.
No point in making the user also enable RUST_LOG
c058606
to
5903fdb
Compare
Rebased. @oli-obk this is finally ready for review :) |
@bors r+ |
📌 Commit 5903fdb has been approved by |
Delayed CTFE backtraces This renames the env var that controls CTFE backtraces from `MIRI_BACKTRACE` to `RUST_CTFE_BACKTRACE` so that we can use `MIRI_BACKTRACE` in the miri tool to only show backtraces of the main miri execution. It also makes `RUST_CTFE_BACKTRACE` only show backtraces that actually get rendered as errors, instead of showing them eagerly when the `Err` happens. The current behavior is near useless in miri because it shows about one gazillion backtraces for errors that we later catch and do not care about. However, @oli-obk likes the current behavior for rustc CTFE work so it is still available via `RUST_CTFE_BACKTRACE=immediate`. NOTE: This is based on top of #53821. Only [the last three commits](oli-obk/rust@sanity_query...RalfJung:ctfe-backtrace) are new. Fixes #53355
☀️ Test successful - status-appveyor, status-travis |
Thanks. :) Locally, the miri test suite now passes with opt level 3! |
This renames the env var that controls CTFE backtraces from
MIRI_BACKTRACE
toRUST_CTFE_BACKTRACE
so that we can useMIRI_BACKTRACE
in the miri tool to only show backtraces of the main miri execution.It also makes
RUST_CTFE_BACKTRACE
only show backtraces that actually get rendered as errors, instead of showing them eagerly when theErr
happens. The current behavior is near useless in miri because it shows about one gazillion backtraces for errors that we later catch and do not care about. However, @oli-obk likes the current behavior for rustc CTFE work so it is still available viaRUST_CTFE_BACKTRACE=immediate
.NOTE: This is based on top of #53821. Only the last three commits are new.
Fixes #53355