-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustfmt is not getting backtraces anymore #111529
Comments
Something was already wrong before that change - the panic was just the generic
the hook hides that backtrace because it assumes there was another panic before, but there isn't one in this case. cc @rust-lang/rustfmt |
This looks relevant: rust/src/tools/rustfmt/src/formatting.rs Lines 149 to 150 in 591b056
|
If it helps, here's the original error if it isn't silenced:
|
maybe this is an upstream bug? rust/compiler/rustc_parse/src/parser/diagnostics.rs Lines 2162 to 2172 in 4d219d0
|
Would it be best to revert the ice url change until this is sorted? |
I don't mind doing so, but I don't think it helps much, |
I'm looking at more from the perspective of the value gained from the bug report url vs. the possibility of any other unknown impacts (not just the one message in this one case). To be clear I'm not necessarily pushing for this, just wondering what the potential blast radius could be; the bug report url is nice but not critically important. I probably should've thought to ask when we were adding this, but do we expect the ice hook to work even though rustfmt doesn't actually use rustc_driver? Wrt #111529 (comment), this is very intentional and not something we'd want to change. If that's going to be problematic for the custom bug url then I imagine we'd want to roll that back for rustfmt |
…ler-errors Give a more useful location for where a span_bug was delayed Before: ``` = note: delayed at 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1335:29 1: <rustc_errors::Handler>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1124:9 ... ``` After: ``` = note: delayed at compiler/rustc_parse/src/parser/diagnostics.rs:2158:28 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1335:29 1: <rustc_errors::Handler>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1124:9 ... ``` This both makes the relevant frame easier to find without having to dig through diagnostic internals, and avoids the weird-looking formatting for the first frame. Found while working on rust-lang#111529.
…ler-errors Give a more useful location for where a span_bug was delayed Before: ``` = note: delayed at 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1335:29 1: <rustc_errors::Handler>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1124:9 ... ``` After: ``` = note: delayed at compiler/rustc_parse/src/parser/diagnostics.rs:2158:28 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1335:29 1: <rustc_errors::Handler>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1124:9 ... ``` This both makes the relevant frame easier to find without having to dig through diagnostic internals, and avoids the weird-looking formatting for the first frame. Found while working on rust-lang#111529.
…ler-errors Give a more useful location for where a span_bug was delayed Before: ``` = note: delayed at 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1335:29 1: <rustc_errors::Handler>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1124:9 ... ``` After: ``` = note: delayed at compiler/rustc_parse/src/parser/diagnostics.rs:2158:28 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1335:29 1: <rustc_errors::Handler>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1124:9 ... ``` This both makes the relevant frame easier to find without having to dig through diagnostic internals, and avoids the weird-looking formatting for the first frame. Found while working on rust-lang#111529.
…ler-errors Give a more useful location for where a span_bug was delayed Before: ``` = note: delayed at 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1335:29 1: <rustc_errors::Handler>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1124:9 ... ``` After: ``` = note: delayed at compiler/rustc_parse/src/parser/diagnostics.rs:2158:28 0: <rustc_errors::HandlerInner>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1335:29 1: <rustc_errors::Handler>::emit_diagnostic at ./compiler/rustc_errors/src/lib.rs:1124:9 ... ``` This both makes the relevant frame easier to find without having to dig through diagnostic internals, and avoids the weird-looking formatting for the first frame. Found while working on rust-lang#111529.
with beta:
Backtrace
with nightly
rustfmt 1.5.2-nightly (69fef92 2023-05-13)
RUST_BACKTRACE=full rustfmt 8E72B7907D9D7F81DC6329AAC44D7D42D638688A0797C99F636739F9BFE5BEC1.rs
Could this be a sideeffect of 2469afe ? cc @jyn514
File to make rustfmt crash is attached (--check is sufficient)
ice.rs.zip
The text was updated successfully, but these errors were encountered: