Skip to content
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

When no version is specified, reuse existing locked versions #12046

Open
epage opened this issue Apr 27, 2023 · 1 comment
Open

When no version is specified, reuse existing locked versions #12046

epage opened this issue Apr 27, 2023 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-add S-needs-team-input Status: Needs input from team on whether/how to proceed.

Comments

@epage
Copy link
Contributor

epage commented Apr 27, 2023

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

See also killercup/cargo-edit#41

@epage epage added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-add S-triage Status: This issue is waiting on initial triage. labels Apr 27, 2023
@epage
Copy link
Contributor Author

epage commented Apr 27, 2023

I originally rejected killercup/cargo-edit#41 because of workspace inheritance but I find that I don't tend to use it for dependencies, preferring to keep that information more local

@weihanglo weihanglo added S-needs-team-input Status: Needs input from team on whether/how to proceed. and removed S-triage Status: This issue is waiting on initial triage. labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-add S-needs-team-input Status: Needs input from team on whether/how to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants