Print more than one backtrace on error
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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" }
]
- Ngôn ngữ chính
- Rust
- Star
- 50
- Fork
- 4
- Merge trung bình
- 4 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenDevicePartnership/cga
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
OpenDevicePartnership/cga#4 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
OpenDevicePartnership/cga#6 · 4 bình luận ·
Tất cả issue của OpenDevicePartnership/cga
Issue tương tự
-
app bug session
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
macOS autosubmit enable passes unsupported --wait to launchctl bootoutCó thể đã có người làm @iqdoctor đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
junhoyeo/tokscale#1713 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày