-
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
feat(cargo): support range=update-lockfile #23968
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please sign the cla, otherwise we can't review
d8fb77a
to
9f3fa85
Compare
9f3fa85
to
0d159a3
Compare
Should I also update the default ( |
yes and please don't force push. we squash merge, so no worry about git history |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs more tests for coverage
I also tested this on a number of personal projects and haven't noticed any issues other than the previously mentioned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's say that a PR already exists and is up-to-date. Will Renovate re-run cargo update
commands every single time it runs on the repo/branch, or does it have a way of knowing that the locked version is already updated and no command is necessary?
Is this something each Edit: If the question is referring to the hack I wrote to skip already updated dependencies, this is only used when a preceding command in a list of batched |
I think you have it covered already with the |
The issue is within the same run. Between batched cargo update commands. |
export async function updateArtifacts( | ||
{ | ||
packageFileName, | ||
updatedDeps, | ||
newPackageFileContent, | ||
config, | ||
}: UpdateArtifact, | ||
recursionLimit = 10 | ||
): Promise<UpdateArtifactsResult[] | null> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename and make private, create a new updateArtifacts
which called the renamed function, so recursion limit isn't part of the public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exactly how it's done in other managers, i.e. bundler. I'm really getting tired of this back and forth. Please be respectful of my time. I will leave some time for you to do a final review pass. Any other issues you can fix yourself. I'm happy to use this branch for my use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's best that we close this and someone else can pick it up to completion
If anyone else has the time to pick this up and open an updated PR, please base it off @szlend's branch and let's make sure to name him as co-author in the final commit to main |
Changes
Adds
update-lockfile
rangeStrategy support to thecargo
manager.Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: