Support converting between anyhow::Error and eyre::Report automatically with ?#178
Support converting between anyhow::Error and eyre::Report automatically with ?#178ten3roberts wants to merge 1 commit intomasterfrom
anyhow::Error and eyre::Report automatically with ?#178Conversation
07be581 to
a663f0a
Compare
a663f0a to
de939a5
Compare
137217a to
0668083
Compare
6537155 to
07c31c2
Compare
07c31c2 to
cf4d561
Compare
cf4d561 to
5470215
Compare
|
@dtolnay As per your discussion, I have implemented this, but there is a small issue which I hope you can guide me: As soon as I added your snippet, I got the following error: So, I added I don't have enough context on this, and I was surprised that I was getting the error in the first place at all. |
|
@pksunkara the relevant part of docs
I think we need to find a way to not break downcasting before we can use this to improve interop with anyhow. Off of the top of my head, if the provider API is available the wrapper anyhow inserts could provide a reference to the underlying error type which we can still downcast from. If provider isn't available anyhow could maybe provide the original error directly instead of the wrapper. Iunno, feels a little hacky, hopefully david can think of a better solution. |
yaahc
left a comment
There was a problem hiding this comment.
registering the blocking objection since I already commented
reason: I don't believe breaking downcasting is not an acceptable tradeoff for improved anyhow interop (open to arguments to change this position if others disagree).
Using comment: #31 (comment)