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.
Problem
Currently,
cargo addwill add full latest version number toCargo.toml. Especially in new projects (where a lot ofaddactions happen,) this might not be ideal. I at least, find myself removing patch and ofteneven minor version numbers, so that I can occasionally just removeCargo.lockand get everything upgraded.Proposed Solution
resulting in
cargo add tokioaddingand
resulting in
cargo add tokioaddingPossible settings
major|minor|patchwithpatchbeing 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.