-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add caused_by to Diagnostic #165
Conversation
For me, tests are green now 🎉 |
Thanks for the patch and the fixes so far! I've continued thinking about this and I'm wondering: How would you feel about renaming |
Definitively. Tell me if there's more that you want to have changed. I'll make sure to squash the history appropriately before it gets merged, if it gets merged. |
Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "miette" | |||
version = "4.6.1-alpha.0" | |||
version = "4.4.8" |
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 think this should not be in the commit
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.
Whoopsi.
std::option::Option::Some(self.#rel.as_ref()) | ||
} | ||
}) | ||
} |
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.
uhhh, this shouldn't be unused.
The gen_struct
typically generates definitions for when the macro is used on a struct-style error, for example:
#[derive(Diagnostic, Error)]
#[error("meh")]
struct MyError {
#[diagnostic_source]
src: SomeError
}
Okay, I guess now this looks like it is ready ... @zkat if you agree, I can squash and make the history here pretty before it goes in! |
you'll want all the tests passing first :) |
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.
everything looks good. I'll merge once tests are passing again :)
Thanks for the contribution, and for hanging in there during the back and forth!
Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
Signed-off-by: Matthias Beyer <[email protected]>
yay! Thanks again! :) Looks like we're all set~ |
Hi!
Currently, miette does not support error causes which contain a
Diagnostic
.This draft tries to change that. It is related to #164 , as I worked with @TheNeikos on implementing this.
Tell me what you think! ❤️
Please note that I will rebase this PR until we all agree on a way forward!