-
Notifications
You must be signed in to change notification settings - Fork 153
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
Add --preserve-precision
flag to cargo-upgrade
#598
Comments
Some of my concerns for
I'll say that my opinion is less strong for preserving existing precision in cargo-upgrade than having configurable precision in cargo-add. Even better if we have consensus one way or the other and don't need a flag to control this. I do wonder if trends towards preferring a specific precision will die down with further adoption of cargo-add once its built-in to cargo. |
Ideally, we always specify at least the last working version. Without However, I would say version requirements should not be "always latest". We might want to upgrade binaries on a regular cadence but ideally, we don't update version requirements more than needed. It can cause extra build churn and cause conflicts unnecessarily (most patches are not critical) |
With all of that said, I would be open to seeing a PR that switches |
This is continuation of a discussion starting here: #126 (comment).
Currently, when
cargo upgrade
updates a dependency requirement, it does so with full precision, i.e., specifying the major, minor, and patch versions. The proposal is to add a flag--preserve-precision
that, when set, causes the new requirement to use the same components as the existing requirement.For example, consider:
As of this writing,
cargo upgrae
turns this into:The proposal is that
cargo upgrade --preserve-precision
would turn this into:This flag would make
cargo upgrade
more flexible, and thereby applicable to more projects, e.g., projects whose developers (for whatever reason) prefer not to rely on some dependency with full precision.@epage noted that similar logic is already present in
cargo-set-version
.Thanks, @epage and @kornelski, for providing feedback on this idea already.
The text was updated successfully, but these errors were encountered: