Print more than one backtrace on error
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
The payload names only the cga.toml whitelist format and the diagnostic text it produces, which lists 'backtrace (1 of N)' with one entry point and one trace. Start by reproducing the lint on the rsop repository with cargo cga check and reading the cga repository's handling of the whitelist entries and the note output. Done means the maintainers agree on how many backtraces to show and in what form, and a single run reports them. The thread has no decision yet, so settle the design with the maintainer before writing code.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Currently when I run cargo cga check on https://codeberg.org/heiko/rsop, I get an error which shows me a single entry point (main function) and a single backtrace starting from it:
error: call to function `sop::cli::main` which can panic
--> rsop/src/bin/rsop.rs:6:5
|
6 | sop::cli::main(&mut rpgpie_sop::RPGSOP::default(), sop::cli::Variant::Full);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: 12 different panics from this location
= note: backtrace (1 of 300953334964):
0: core::panicking::panic (called)
1: std::sys::sync::once::futex::Once::call (called)
2: std::sync::Once::call_once_force::<{closure@std::sync::OnceLock<std::sync::Mutex<std::io::BufReader<std::io::stdio::StdinRaw>>>::initialize<{closure@std::sync::OnceLock<std::sync::Mutex<std::io::BufReader<std::io::stdio::StdinRaw>>>::get_or_init<{closure@std::io::stdin::{closure#0}}>::{closure#0}}, !>::{closure#0}}> (called)
3: std::sync::OnceLock::<std::sync::Mutex<std::io::BufReader<std::io::stdio::StdinRaw>>>::initialize::<{closure@std::sync::OnceLock<std::sync::Mutex<std::io::BufReader<std::io::stdio::StdinRaw>>>::get_or_init<{closure@std::io::stdin::{closure#0}}>::{closure#0}}, !> (called)
4: std::sync::OnceLock::<std::sync::Mutex<std::io::BufReader<std::io::stdio::StdinRaw>>>::get_or_try_init::<{closure@std::sync::OnceLock<std::sync::Mutex<std::io::BufReader<std::io::stdio::StdinRaw>>>::get_or_init<{closure@std::io::stdin::{closure#0}}>::{closure#0}}, !> (called)
5: std::sync::OnceLock::<std::sync::Mutex<std::io::BufReader<std::io::stdio::StdinRaw>>>::get_or_init::<{closure@std::io::stdin::{closure#0}}> (called)
6: std::io::stdin (called)
7: sop::cli::real_main::<'_, rpgpie_sop::RPGSOP, rpgpie_sop::Certs, rpgpie_sop::Keys, rpgpie_sop::Sigs> (called)
8: sop::cli::main::<'_, rpgpie_sop::RPGSOP, rpgpie_sop::Certs, rpgpie_sop::Keys, rpgpie_sop::Sigs> (called) <--
9: rsop::main (entrypoint)
= note: `#[deny(cga::panics)]` on by default
warning: [email protected]: rsop: shell completions written to /home/user/src/rsop/./target/cga/debug/build/rsop/032fe99886f2720a/out
warning: [email protected]: rsop: man pages written to /home/user/src/rsop/./target/cga/debug/build/rsop/032fe99886f2720a/out
error: could not compile `rsop` (bin "rsop") due to 1 previous error
Error: 101
In this case I want to add std::io::stdin to cga.toml whitelist and then rerun cargo cga check --config-path ./cga.toml. Then I get another backtrace, but each time the whole compilation is restarted so it will take me forever to collect all the functions that i trust.
Is there a way to get in a single run what all "12 different panics from this location" are or print more backtraces (definitely not all 300953334964 backtraces) at once?
My current cga.toml is this:
whitelist = [
{ crate = "core" },
{ crate = "env_logger" },
{ path = "^std::rt::panic_fmt" },
{ path = "^std::process::exit" },
{ path = "^sop::Password::new" },
{ path = "^std::io::stdout" },
{ path = "^std::io::stdin" }
]
- Lenguaje dominante
- Rust
- Estrellas
- 50
- Forks
- 4
- Merge medio
- 4 d 12 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de OpenDevicePartnership/cga
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
OpenDevicePartnership/cga#4 · 2 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
OpenDevicePartnership/cga#6 · 4 comentarios ·
Todos los issues de OpenDevicePartnership/cga
Issues similares
-
app bug session
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
marketing
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
macOS autosubmit enable passes unsupported --wait to launchctl bootoutPosiblemente ocupada @iqdoctor la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
junhoyeo/tokscale#1713 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día