eyre
eyre copied to clipboard
Backtrace is not available due to Error API change
I'm not sure this issue is tracking or not (or even intended), current build.rs script do not add backtrace
feature as it failed to compile since Error does not have backtrace()
API rather https://rust-lang.github.io/rfcs/3192-dyno.html.
I found this issue while comparing anyhow and found that eyre does not emit valid backtrace like anyhow. The reason is that eyre do not set backtrace feature as I explained above.
Anyhow has changed API (https://github.com/dtolnay/anyhow/commit/46d3d2c9f5260e74b0ff4c6262713f51b843e9de).
I modified to follow the latest API and it worked at least with minimal change. Can we as eyre support such change as well?
Thanks for this suggestion, I'll make these modifications and test it locally. Feel free to open a PR if you have it saved already, otherwise I'll get to it this week.
Ah yeah it looks like this has already changed, any::Demand doesn't exist.
https://github.com/dtolnay/anyhow/blob/master/build.rs
Anyhow has updated again it looks like. Mind you our backtrace module is much smaller than anyhow's, so I'm not sure that the minimal change you had in mind will work, but I'll give it a shot!
You're right that backtrace isn't working, this is important. I just implemented it for eyre. I'm going to write unit tests for this before I make a pull request. Thanks so much for bringing this to our attention! :D
:sweat_smile: Just saw your PR @thenorili, I accidentally fixed it too while working on another compile probe issue in #160.
Any chance we could merge that first and then look back into your PR which adds some more tests etc?
😅 Just saw your PR @thenorili, I accidentally fixed it too while working on another compile probe issue in #160.
Any chance we could merge that first and then look back into your PR which adds some more tests etc?
Yes, I think getting the fix in here before developing cohesive UI tests for backtrace is a good idea. I saw you've put it on main -- do you think this should be closed for now?