Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change unwrap to context or expect in xtask #3327

Closed
ipetr0v opened this issue Oct 14, 2022 · 0 comments
Closed

Change unwrap to context or expect in xtask #3327

ipetr0v opened this issue Oct 14, 2022 · 0 comments
Labels
lang/Rust xtask Tracking improvements and bugs for xtask.

Comments

@ipetr0v
Copy link
Contributor

ipetr0v commented Oct 14, 2022

We have a lot of unwraps in xtask code, which do not log what exactly xtask was trying to do if it produces error:

toml::from_str(&read_file(toml_path)).unwrap_or_else(|err| {

For example, I had a crate that was not checked in the repository, and when I was running ./scripts/xtask run-cargo-tests I just got the following error from which it's not clear what happened:

     Running `target/x86_64-unknown-linux-musl/debug/xtask run-cargo-tests`

panic occurred: could not open file: Os { code: 2, kind: NotFound, message: "No such file or directory" }
signal or panic received, killing outstanding processes
@ipetr0v ipetr0v added lang/Rust xtask Tracking improvements and bugs for xtask. labels Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/Rust xtask Tracking improvements and bugs for xtask.
Projects
None yet
Development

No branches or pull requests

2 participants