-
Notifications
You must be signed in to change notification settings - Fork 10
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
node: Remove default
feature
#45
base: master
Are you sure you want to change the base?
Conversation
899189e
to
896156b
Compare
896156b
to
ccac13d
Compare
Every single use statement in `client_versions` has an `allow` attribute; this is too noisy.
If no features are enabled then a few things happen: - `bitcoind` from `$PATH` is used. - We assume Core version 28 This means that in order to make `--no-default-features` build (which is a reasonable expectation) there are implicit requirements on the environment - this is bad but I see no other solution ATM. Improve the code comments, make the attributes uniform, and add missing version to the no-feature-enabled logic. Document the `bitcoind` version requirements in the README.
The `default` feature is problematic because it overrides `--features=xyz` if `--no-default-features` is used. Remove it.
ccac13d
to
8d08689
Compare
I'm interested to see if this one gets through your CI please @apoelstra. |
Sure, will run this through local CI and ack it. But I'm not convinced that We maybe also ought to warn if multiple features are enabled. |
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.
ACK 8d08689; successfully ran local tests
hmm. You could be right, its (By "has to" I mean, its annoying if it doesn't - I remember we had that somewhere when I first started in this org and it bit me a bunch.) |
Yeah, true, we had that with the But this is a somewhat-obscure leaf crate, which will make it less annoying, and I also think that users would like to be forced to choose a Core version rather than unknowingly going with "the default" and finding that this version changes out from under them. |
The
default
feature innode
overides an explicit version feature. This is a footgun.Remove the
default
feature fromnode
.Note
The features in the
node
crate are not 'normal'. Even so I personally maintain that--all-features
and--no-default-features
should build and be footgun free. With this PR merged there is a remaining footgun but it relates to running unit tests locally instead of in using the crate as a dependency - that's not a win but its an improvement.Fix: #40