Open
Description
Problem
When developing #12039, I ran cargo add clap
into the xtask but that picked the latest clap version, causing more churn to the lockfile than I thought was appropriate for my change.
Proposed Solution
Check the lockfile for the highest version that is semver compatible with the latest version.
- By limiting it to semver compatible, this avoids the "some random dev dependency is using an old
clap
" problem (criterion)
Alternatives
- Pick from non-dev dependencies
- Pick only if a workspace member depends on it
- Reject this in favor of workspace inheritance
Notes
We already will auto pick
- version from alternative dependency table from same package
- inheriting from
workspace.dependencies
See also killercup/cargo-edit#41