-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
Problem
Currently, cargo add
will add full latest version number to Cargo.toml
. Especially in new projects (where a lot of add
actions happen,) this might not be ideal. I at least, find myself removing patch and ofteneven minor version numbers, so that I can occasionally just remove Cargo.lock
and get everything upgraded.
Proposed Solution
[add]
version-specificity="major"
resulting in cargo add tokio
adding
[dependencies]
tokio = "1"
and
[add]
version-specificity="minor"
resulting in cargo add tokio
adding
[dependencies]
tokio = "1.28"
Possible settings major|minor|patch
with patch
being the default.
Not quite sure about commandline flags, am absolutely open to suggestions there.
Notes
I am absolutely open to writing a PR for this.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.