-
Notifications
You must be signed in to change notification settings - Fork 66
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 color-eyre to workspace #110
Conversation
The The test is very complex and has failed in the past when rust std added another function in the backtrace due to some internal change. I can not reproduce this locally, so it may be because of some rustc version or something else entirely |
Ok, I've now found the reason for failure. It has do to with rustc versions. 1.65 causes it to fail, 1.71 passes |
As I suspected, "updating" the "minimal_features" backtrace to match caused other tests using 1.75.0 to fail, since somewhere between those versions, the functions and call stack of the panic machinery changed which causes them to match. The solution I see here is to ignore the tests for the older version, or don't test backtraces on older compiler versions. |
e3fa771
to
a15c464
Compare
Found a common denominator and a way to make the tests more lenient in the future. |
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.
Really good work on the UI tests, those were tough.
I posed a few questions, but the core of it looks ready to me.
- --no-default-features --features track-caller | ||
- --no-default-features --features auto-install |
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.
How does changing to "--no-default-features" for eyre's track-caller and auto-install tests relate to adding color-eyre to the workspace?
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 sure, I think it was Pavan who added that to increase the test coverage for feature combinations. This is one of the earliest commits
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.
Well, it's replacing two feature combinations, i'm not sure that it expands the test coverage. If we want to increase the test coverage we could keep both --features
and --no-features
.
Remember not to squash this once it's done! |
The test now only considers our part of the backtrace, allowing for changes in rust std library to not break the test
a15c464
to
cb4bab6
Compare
I'm not sure this will be that simple. How are we going to preserve history when merging color-eyre into eyre? How did y'all do it for spantraces? Does a rebase work? If so, do we need to ping jane for an exception to the policy? |
Creating a merge commit is enough, isn't it? |
I tested it and yes, that is how that works! Sorry for the alarm : ) |
This works now (barring the conflict), how do we feel about merging this? |
I'll make sure to merge it properly into main to preserve the history |
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 looks good! Congrats to both of y'all on landing this : )
No description provided.