This repository was archived by the owner on Oct 10, 2023. It is now read-only.
Print underlying error when we fail to detect a project#121
Merged
Conversation
41b541f to
a7f331a
Compare
Hoverbear
reviewed
Sep 8, 2022
| nix = "nix".cyan(), | ||
| nix_install_url = "https://nixos.org/download.html".blue().underline(), | ||
| ); | ||
| eprintln!("{err_msg}\n\nUnderlying error:\n{err}", err = err.red()); |
Contributor
There was a problem hiding this comment.
I'm a bit confused since according to the docs we already would print that underlying error? https://docs.rs/eyre/0.6.8/eyre/struct.Report.html#display-representations
Member
Author
There was a problem hiding this comment.
Yes, the change here is that it is colored red (so as to stand out more, but I'm not married to the idea and can easily revert that commit).
Contributor
There was a problem hiding this comment.
I have no strong opinions about this. 😅
Hoverbear
approved these changes
Sep 8, 2022
Contributor
Hoverbear
left a comment
There was a problem hiding this comment.
THe code seems correct, though I'm not entirely sure this is a beneficial change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
e.g.:
I'm not set on the "red-ify all the errors", but I think it looks good.
One issue with the current approach is that we duplicate the error from
riff/src/dev_env.rs
Line 71 in 8950375
riff/src/flake_generator.rs
Line 36 in 8950375
Could be addressed by slightly changing the wording so we get:
instead of
Suggestions welcome.