-
Notifications
You must be signed in to change notification settings - Fork 12
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
Improve Errors using miette
#103
Conversation
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 dislike the fact that this mr does things way beyond its scope, its a bit hard to review.
The error side looks good to me mostly! Just the refactoring of existing code makes changes hard to track and bloats this. Could you eventually split refactoring the registries etc in a second pr, based on this one and revert the changes for now so we can merge this today?
Mostly lgtm! 😊
Co-authored-by: Mara Schulke <mara.schulke@helsing.ai>
The primary goal of this PR is to implement some error reporting improvements developed for #95 while avoiding introducing new public types.
What's different from #95
Instead of introducing typed errors everywhere, I made judicious use of them only for error reusability (so that structurally similar errors need only be defined once).
This approach preserves the current pattern of defining opaque errors inline and leaking
eyre::Report
as the crate's external error type. It does not introduce any new public error types.