-
Notifications
You must be signed in to change notification settings - Fork 204
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
chore(nargo): report bubbled up errors using eyre #907
Conversation
I think this also resolves #686 |
Ah, thanks yes it does (as we no longer colour the terminal on errors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it's worth it to add a new dependency just to avoid writing:
if let Err(err) = result {
err.write()
}
I usually agree with @jfecher about adding dependencies but I think getting anyhow into the project would be helpful for the future. It's one of the (surprisingly) few crates that I've seen recommended by everyone (probably just thiserror and anyhow!) |
Actually, it looks like our existing dependency of |
Related issue(s)
Resolves #819
Resolves #686
Description
Summary of changes
Rather than explicitly writing errors to the console and then calling
std::process::exit(1)
we now wrap the bubbled up error in ananyhow::Result
and just return it frommain
.Dependency additions / changes
Added
anyhow
as dep of nargo.Test additions / changes
Checklist
cargo fmt
with default settings.Additional context