Skip to content
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

Backtrace is not available due to Error API change #97

Open
ileixe opened this issue May 30, 2023 · 5 comments
Open

Backtrace is not available due to Error API change #97

ileixe opened this issue May 30, 2023 · 5 comments
Assignees
Labels
A-eyre Area: eyre subcrate P-important (Priority) something that contributes towards achieving the long term goals of the project

Comments

@ileixe
Copy link

ileixe commented May 30, 2023

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 (dtolnay/anyhow@46d3d2c).

I modified to follow the latest API and it worked at least with minimal change. Can we as eyre support such change as well?

@thenorili
Copy link
Contributor

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.

@thenorili thenorili self-assigned this Nov 19, 2023
@thenorili
Copy link
Contributor

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!

@thenorili
Copy link
Contributor

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

@thenorili thenorili added P-important (Priority) something that contributes towards achieving the long term goals of the project A-eyre Area: eyre subcrate labels Nov 20, 2023
@ten3roberts ten3roberts self-assigned this Mar 26, 2024
ten3roberts added a commit that referenced this issue Mar 26, 2024
This addresses the invalid compile probe testing for a non-longer
existing feature by updating it and eyre to use the
`error_generic_member_access` features instead.

The report and errors have all been updated to accomodate this and the
new backtrace provide API

Fixes: #84 and #97
@ten3roberts
Copy link
Contributor

😅 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?

ten3roberts added a commit that referenced this issue Mar 26, 2024
This addresses the invalid compile probe testing for a non-longer
existing feature by updating it and eyre to use the
`error_generic_member_access` features instead.

The report and errors have all been updated to accomodate this and the
new backtrace provide API

Fixes: #84 and #97
ten3roberts added a commit that referenced this issue Mar 26, 2024
This addresses the invalid compile probe testing for a non-longer
existing feature by updating it and eyre to use the
`error_generic_member_access` features instead.

The report and errors have all been updated to accomodate this and the
new backtrace provide API

Fixes: #84 and #97
ten3roberts added a commit that referenced this issue Mar 26, 2024
This addresses the invalid compile probe testing for a non-longer
existing feature by updating it and eyre to use the
`error_generic_member_access` features instead.

The report and errors have all been updated to accomodate this and the
new backtrace provide API

Fixes: #84 and #97
ten3roberts added a commit that referenced this issue Mar 26, 2024
This addresses the invalid compile probe testing for a non-longer
existing feature by updating it and eyre to use the
`error_generic_member_access` features instead.

The report and errors have all been updated to accomodate this and the
new backtrace provide API

Fixes: #84 and #97
ten3roberts added a commit that referenced this issue Apr 25, 2024
This addresses the invalid compile probe testing for a non-longer
existing feature by updating it and eyre to use the
`error_generic_member_access` features instead.

The report and errors have all been updated to accomodate this and the
new backtrace provide API

Fixes: #84 and #97
ten3roberts added a commit that referenced this issue Jul 18, 2024
This addresses the invalid compile probe testing for a non-longer
existing feature by updating it and eyre to use the
`error_generic_member_access` features instead.

The report and errors have all been updated to accomodate this and the
new backtrace provide API

Fixes: #84 and #97
@thenorili
Copy link
Contributor

😅 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-eyre Area: eyre subcrate P-important (Priority) something that contributes towards achieving the long term goals of the project
Projects
None yet
Development

No branches or pull requests

3 participants