Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

color-eyre uses the same inexplicable information order as standard backtraces #139

Open
safinaskar opened this issue Oct 14, 2023 · 1 comment

Comments

@safinaskar
Copy link

Consider this code:

fn g() {
    panic!();
}

fn f() {
    g();
}

fn main() {
    color_eyre::install().unwrap(); f();
}

Here is output of RUST_BACKTRACE=1 cargo run --release:

The application panicked (crashed).
Message:  explicit panic
Location: src/main.rs:2

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 8 frames hidden ⋮                               
   9: core::panicking::panic::h1b0af24502591aff
      at /rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/core/src/panicking.rs:127
  10: fastertha::g::hbcd4195430211455
      at /tmp/fastertha/src/main.rs:2
  11: fastertha::f::hb05321583c5f1adf
      at /tmp/fastertha/src/main.rs:6
  12: fastertha::main::h74d25b490126aede
      at /tmp/fastertha/src/main.rs:10
  13: core::ops::function::FnOnce::call_once::h2ea4dee289c5a1d9
      at /rustc/13e6f24b9adda67852fb86538541adaa68aff6e8/library/core/src/ops/function.rs:250
                                ⋮ 14 frames hidden ⋮                              

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

Unfortunately, the output above uses the same inexplicable, impossible to understand structure as standard backtraces use. To understand what I mean, please read my bug report on standard backtraces: rust-lang/rust#99560 , especially this comment: rust-lang/rust#99560 (comment) (first comment may be useful, too: rust-lang/rust#99560 (comment) ).

color-eyre 0.6.2

@safinaskar
Copy link
Author

I used this:

[profile.release]
debug = 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant