-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
C-enhancementCategory: enhancementCategory: enhancementCommand-addS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Description
Problem
This is inspired by my running cargo add
and seeing a lot of features that might be there only because people have not updated to the new dep:
syntax to disable unintended implicit features. For my crates, I'm aware of the syntax and plan to transition my crates. For others, they might not be aware the feature exists and by us cargo add
turning it explicit, it would help raise visibility on these features to help lead more people to using it.
In addition, #10556 mentions the idea of cargo fix
doing
possibly define a feature named "package" if it doesn't already exist and dep:package isn't already used
ie by convention moving away from implicit feature declarations.
Proposed Solution
cargo add --optional <dep>
would create a <dep> = "dep:<dep>
feature iff
rust-version
is unset or is new enough for the syntaxdep:<dep>
doesn't already exist
marcospb19 and schneiderfelipe
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: enhancementCategory: enhancementCommand-addS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review