backtrace-rs icon indicating copy to clipboard operation
backtrace-rs copied to clipboard

Mismatch between comment and actual code about when paths are made relative

Open bjorn3 opened this issue 6 months ago • 1 comments

The comment says it is done only for the short format: https://github.com/rust-lang/backtrace-rs/blob/57c75298115cf36505725281b4f45f03dacfa290/src/capture.rs#L493-L496 Which matches the printing code in libstd. The actual code however does it for the full format: https://github.com/rust-lang/backtrace-rs/blob/57c75298115cf36505725281b4f45f03dacfa290/src/capture.rs#L501-L507

bjorn3 avatar May 30 '25 08:05 bjorn3

Looks like a regression in #526 which did a few changes to impl fmt::Debug for Backtrace which look unrelated to the issue the PR was addressing.

philipc avatar May 31 '25 05:05 philipc

Fixed by #726. But the removal of actual_start_index in #526 still looks wrong to me (it now always skips frames, even for the "full" display).

philipc avatar Sep 24 '25 00:09 philipc

Yeah, sorry about the slipup there. I'll take a closer look at the missing index problem before closing this.

workingjubilee avatar Sep 25 '25 21:09 workingjubilee