-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Refactor Error Types #24
Conversation
It can be derived from the package_name
to avoid confusing it with a valid package_name where relative_package_dir could be derived.
Fix clippy warning about same postfix "Problem" in struct names on NixpkgsProblem enum
I'm not able to add reviewers @infinisil @philiptaron :) |
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.
Some initial thoughts. I like the direction.
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.
Reviewed together in today's office hour with @willbush and @philiptaron
Got some minor suggestions, overall looking good.
One other thing is to add simple comments to the new types.
To remove duplicate `.into()` calls
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.
Awesome, looking good to me!
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.
Some curiosities.
Work related to: #2
This pull request does not change the single-line vs multi-line style or any of the error messages. The goal here is to reduce code duplication.
A lot of the NixpkgsProblem enum variants had common fields more or less due to the context of where the error originated.
I grouped these similar problems into structs which contains the common fields and a
kind
enum to differentiate between the different types of problems.