-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support rangeStrategy=update-lockfile for Cargo #22820
Comments
Cc @Turbo87 |
Here is the docs for Today we use this:
Attempt to update only packages defined in the workspace. Other packages are updated only if they don’t already exist in the lockfile. This option is useful for updating We hopefully could use this for in-range updates:
When used with -p, allows you to specify a specific version number to set the package to. If the package comes from a git repository, this can be a git revision (such as a SHA hash or tag). |
I've been looking at what it would take to do this and it doesn't seem as simple as it looked on the surface. Correct me if I'm wrong, but what I could gather so far is:
So I think this means we'd first need to redesign the version extraction logic so it also takes |
There is a precedent for this: other managers extract a |
I think I have everything in place, I just can't seem to figure out a reliable way of getting the Edit: Using |
Work in-progress here: #23968. I haven't tested it on an actual repo yet, but would appreciate feedback if there's anything missing or wrong on a high-level. |
@rarkins Would you mind closing this issue? Thanks 🙏 |
Support for this strategy was added recently: renovatebot/renovate#22820. It seems that at the same time the behavior of the "replace" strategy changed, causing PRs to be opened with unnecessary changes to Cargo.toml.
Support for this strategy was added recently: renovatebot/renovate#22820. It seems that at the same time the behavior of the "replace" strategy changed, causing PRs to be opened with unnecessary changes to Cargo.toml.
Describe the proposed change(s).
Support in-range dependency updates for Cargo manager
Describe why we need/want these change(s).
Cargo's semver approach is different from most others. For example if a value like
1.0.0
is specified then it means the same as^1.0.0
in npm, i.e.>=1.0.0, <2.0.0
. This means that in-range, lockfile-only updates should be the most common use case. Today we usebump
but it means unnecessarily narrowing the package fileThe text was updated successfully, but these errors were encountered: