-
Notifications
You must be signed in to change notification settings - Fork 68
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 must-install feature, so that a non-default handler can be the on… #52
Conversation
…ly handler consuming .text.
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 needed commit 598a179 to avoid patching problems locally.
What is the state of this PR? |
I think we just need to update the test-suite to properly handle this feature. Something like:
Also, a nice to have but not required would be adding documentation for the new feature. It looks like we don't already have a section for this but I'd like to add one, probably based off of tracing's similar section: https://docs.rs/tracing/latest/tracing/#crate-feature-flags |
Incidentally, I circled back to the project using this PR yesterday on a lark. I don't think I thought through edge cases sufficiently: Since the feature is not enabled by default, the default behavior is back-compatible with previous Additionally, are the |
Ah, I think you're right on this one. We probably want to instead add an enabled by default
Yes, |
Ahh I see now- Okay, I will rework the feature into |
Right now, at least
I'm thinking of solving this by adding a fn maybe_install_handler() -> Result<(), InstallError> {
if cfg!(not(feature = "auto-install")) {
set_hook(Box::new(DefaultHandler::default_with))
} else {
Ok(())
}
} Unfortunately, this doesn't work because
Is there a way to create a |
I think the answer to that is no, and yes. |
Hmmm, why is the workflow only showing10 expected checks? Many combinations of features and Rust compilers seem to be missing... |
I'm guessing that may have been because I had to approve the CI run |
My changes to |
…ly handler consuming .text.
A while ago, you mentioned:
I implemented this feature myself out of curiosity, and it seems to have done the trick. It'll require modifying
simple-eyre
'sCargo.toml
, but I shaved a good 8k off my.text
segment with this feature :D!