Pointless updates to Cargo.toml when lockfile is already updated #27913
Replies: 6 comments 14 replies
-
Hi there, This issue or discussion is missing some logs, making it difficult or impossible to help you. Depending on which situation applies follow one, some or all of these instructions. No logs at allIf you haven't posted any log yet, we need you to find and copy/paste the log into the issue template. Finding logs on hosted appSelect me to read instructionsIf you use the Mend Renovate app (GitHub):
Finding logs when self-hostingSelect me to read instructionsIf you're running self-hosted, run with Insufficient logsSelect me to read instructionsIf you already gave us a log, and the Renovate team said it's not enough, then follow the instructions from the No logs at all section. Formatting your logsSelect me to read instructionsPlease put your logs in a
If you feel the logs are too large to paste here, please use a service like GitHub Gist and paste the link here. Good luck, The Renovate team |
Beta Was this translation helpful? Give feedback.
-
How was the lock file updated to latest? Eg before renovate or by someone manually? Please also locate the "packageFiles with updates" log message for this update |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. To get started, please read our guide on creating a minimal reproduction. Good luck, The Renovate team |
Beta Was this translation helpful? Give feedback.
-
I realized that the reason for this behavior is essentially "by design", but I'm open to changing the design. Renovate has a concept of rangeStrategy. It defaults to In Cargo, auto is changed to "bump" in most cases: "bump" means "bump the constraint to the highest version". So that's why if you have e.g. 0.4.34 in your Cargo.toml then bumping means updating it to 0.4.35. If this were to be changed to "replace" then it would mean "only raise a PR if the value in Cargo.toml needs to be replaced with a higher constraint", e.g. if a new major version came out. In this case you'd rarely get PRs at all. Finally there's rangeStrategy "update-lockfile" which means "change the Cargo.toml only if it needs to be, but any time the lock file is out of date then bump it alone". If we were to change Cargo's rangeStrategy=auto to prefer "update-lockfile" instead of "bump" it would mean:
|
Beta Was this translation helpful? Give feedback.
-
What would you like help with?
I think I found a bug
How are you running Renovate?
Mend Renovate hosted app on github.com
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
No response
Please tell us more about your question or problem
I notice that renovate will often update my Cargo.toml file to upgrade the version of a library, but that library has already been upgraded in my Cargo.lock file. For example, I have a cargo workspace with three crates in it, and today I'm seeing a PR from Renovate changing Chrono from 0.4.34 ro 0.4.35, but it only modifies Cargo.toml. The Cargo.lock file already has Chrono at 0.4.35, so this isn't actually upgrading anything. Makes for a lot of noisy PRs.
Is there a configuration option I'm missing to avoid these?
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions