-
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
Disable adding a feature when using cargo-add --optional #13430
Comments
In addition to
We did this because it will be an error to do anything else in the next edition, see rust-lang/rfcs#3491 Any switch will be short-lived. Since this use case has the user editing the file either way, I don't think a switch would have been worth it. However, like #13411, I wonder if we should add a Status message saying that we added the feature. This way users are less likely to miss that it was done. |
Your proposed/PR addition seems a fine resolution, I'm gonna go ahead and close this ticket while that lands. |
Problem
With #13071,
cargo add
started creating explicit features for new optional deps. While I understand the reasoning, this is frustrating to have to keep remembering to delete that line when I actively want to use the newer behaviour that adding optional dependencies doesn't create features.Proposed Solution
Some kind of opt-in switch or heuristic that will let me disable this behaviour.
Notes
No response
The text was updated successfully, but these errors were encountered: