-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Problems disabling a feature #3024
Comments
Hm sorry but I'm not sure I quite follow what's going on there. Is there a smaller example I could take a look at? To explain a bit how features work, though, they work by essentially unioning all the requested features for a package. That is, if A depends on C and B depends on C, then the features activated in C will be those requested by both A and B. The |
The |
@djc |
Any plans to solve this problem? This makes it impossible to turn off some optional |
Looking back over this issue, it feels like a mix of
Did I miss anything? |
@epage I think this is the core problem:
I don't think any of your linked things describe a good solution to this particular problem? (I also think the ability to selectively disable default-enabled features is somewhat related to this.) |
#3126 is for selectively disabling default features and there is interest in it from at least a couple of us on the cargo team, we just haven't been able to prioritize it to write the RFC. Note that our proposal isn't to assert that the feature can never be present and automatically change things throughout but to allow you to express "I need everything in default except foo" recognizing something else might need "foo" and enable it. This is likely different than gentoo and likely won't help this situation.
Theoretically, every package on the way is declaring that it needs that feature, directly or indirectly, and so you need to tunnel up control to the top to express this. Sometimes, the configurability isn't related to an API for the dependents but behavior for the application (how to link The other area where theory breaks down is that it is too easy to depend on too many features because of defaults. Defaults serve to ease on boarding but they are out-of-sight and out-of-mind and can easily be left on, pulling in too much. This is why I wonder if #3126 us enough or if we also need something like rust-lang/rfcs#3347 (which I instead from as custom base features in addition to Outside of those, I'm not really seeing a practical way of resolving this because this sounds like its about allowing packages or the user to break claimed invariants (even if unintended). |
Right, I think this issue in itself is probably not a good thing to focus on -- let's close it. |
Please have a look at servo/servo#11812. I'm trying to disable a feature there so that the dependencies will not be built. However, nor me, nor Lars were able to get it to work, though I think we also didn't find a reason that it doesn't work. This suggests to me that there might be a Cargo issue.
The text was updated successfully, but these errors were encountered: