-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Delayed CTFE backtraces #54487
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Merged
Delayed CTFE backtraces #54487
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
bors
added a commit
that referenced
this pull request
Oct 28, 2018
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! |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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