-
Notifications
You must be signed in to change notification settings - Fork 69
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
Fix compile probe and nightly backtraces #160
Conversation
bc5017d
to
4881cd2
Compare
4881cd2
to
011f9a1
Compare
I have to pin |
011f9a1
to
be497c8
Compare
Well... this is embarassing. Once again the backtrace test is being finicky, this time due to (I believe) a warning injected by cargo, breaking it all. |
be497c8
to
fdb7d84
Compare
eyre/build.rs
Outdated
_ => {} | ||
} | ||
// Supports invoking rustc thrugh a wrapper | ||
let mut cmd = if let Some(wrapper) = env::var_os("RUSTC_WRAPPER") { |
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.
It turns out there is also RUSTC_WORKSPACE_WRAPPER which should probably be honored as well. Furthermore, the wrapper can be empty and that means "no wrapping".
This is a reasonable template to start with.
|
e766676
to
92b6a57
Compare
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.
This looks okay to me to move forward with, sorry for the slowness!
eyre/src/wrapper.rs
Outdated
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.
Not your code / out of scope: We're getting a couple dead code errors in this file with DisplayError and NoneError. I'm surprised they're triggered even though we marked them public. Why don't we tag these structs as #[allow(dead_code)]
?
I am similarly distressed by the other warnings we get a dozen copies of down below. I thought the missing_doc_code_examples thing was resolved ages ago.
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'm surprised they're triggered even though we marked them public.
pub
in a private module can still be dead code.
pub(crate)
is not even public, though.
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.
Yes, I understand that. I guess my surprise is that it's existing code that's had attention paid to its visibility and yet it's dead. I'll find the last time it wasn't dead code and figure its story out.
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.
What was your motivation for rewriting this file?
|
||
Backtraces are captured when an error is converted to an `eyre::Report` (such as using `?` or `eyre!`). | ||
|
||
If using the nightly toolchain, backtraces will also be captured and accessed from other errors using [error_generic_member_access](https://github.com/rust-lang/rfcs/pull/2895) if available. |
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.
Per #121, some folks will continue to be unhappy about enforcing unstable features whenever we detect nightly. IIRC we discussed a while ago that we want to accomodate that use case. It doesn't make it any worse so I think it's fine to put that work off, but I thought it was worth mentioning.
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.
Yeah, not wanting to break existing behavior in a "fix" PR, but rather make existing up to date nightly a tricky beast when it comes to libraries.
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