consider using/copying backtrace-ext to more properly filter the backtrace
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Inizia in src/report.rs nelle due sezioni con lo skipping dei frame codificate in modo rigido e collegate nell’issue, quindi confronta il loro comportamento con backtrace_ext::short_frames_strict. Verifica le implicazioni sulle dipendenze e sull’MSRV descritte nell’issue; il lavoro è completo quando il filtraggio fragile viene sostituito dal comportamento proposto e viene verificato che il report di panic mostri ancora lo stack previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
human-panic currently skips a hardcoded number of frames which is... not what you want to do:
https://github.com/rust-cli/human-panic/blob/c0e52f47213eebfb3212f8029ff5705fd0e0c091/src/report.rs#L47-L52
https://github.com/rust-cli/human-panic/blob/c0e52f47213eebfb3212f8029ff5705fd0e0c091/src/report.rs#L66-L71
Rust emits two magic frame names to delimit the "runtime glue" from the "real stack". Unfortunately the backtrace crate doesn't support handling that for you. As such I made backtrace-ext::short_frames_strict to do that for everyone who is implementing this kind of logic.
The example is basically already human-panic's impl because I found this problem in miette which copied your impl. I can do the PR for you but I wasn't sure if you were ok with adding this dep (it's basically one complicated function but slightly factored out so I could unit test the crap out of it because you should never trust backtraces to provide decent input).
(NB: at the time of filing this issue I've published 0.2.0 but docs.rs is super backlogged. 0.2.0 includes fixes from me adding all the comprehensive tests, and also removes the "re-export of all of Backtrace" because I realized it's goody. If you see this issue soon enough just know that this line in the example changed to import Backtrace from backtrace and not backtrace-ext.)
(0.2.0 is live now, also I cut 0.2.1 to lower the msrv)
- Lingua principale
- Rust
- Stelle
- 1.9k
- Fork
- 65
- Merge medio
- 2h 48m
- PR unite (30g)
- 3
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rust-cli/human-panic
-
breaking-change enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
rust-cli/human-panic#194 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
rust-cli/human-panic#167 · 2 commenti ·
-
Dependency Dashboard Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
rust-cli/human-panic#106 ·
-
Custom error message Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
rust-cli/human-panic#54 · 11 commenti · 19 reazioni ·
-
Tracking Issue: v2.0.0 Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
rust-cli/human-panic#46 · 8 commenti ·
Tutte le issue di rust-cli/human-panic
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yantrikos/yantrik-os#255 ·
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Apertabug CLI custom-model
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
raphamorim/rio#1956 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 commento ·