-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(cargo): preserve version metadata #37548
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
base: main
Are you sure you want to change the base?
fix(cargo): preserve version metadata #37548
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.
I'm not sure this is logically correct.
If you are adding logic so that currentVersion -> currentValue logic is changed, then it can create a problem when currentValue -> currentVersion is unchanged.
For example this PR sets 0.2.0+metadata
version to be 0.2.0
value, but if you were to run something like matches('0.2.0+metadata', '0.2.0')
then it would return false
.
I think we need more discussion about this before we accept a change from the solution proposed in the corresponding Issue
What exactly was the |
This is the error when using the
I see I misinterpreted this error yesterday. I thought the issue was the Apparently, the first command in |
Thanks. Can you either update this PR back to that approach or submit a separate draft PR so one of us can test it locally to see if that's fixable? |
I tried commenting out the first Cargo command and that solves the issue for this particular situation. I'm unsure if that solution works for all situations. However, given the name of the function is |
This reverts commit f022ae3.
I reverted my commit and made a new one with the |
7137307
to
36d8ee1
Compare
Changes
Preserve version metadata in Cargo datasource, so the registry request doesn't fail. Instead, only strip version metadata from
newValue
in Cargo versioning.I tried using
versionOrig
in the Cargo datasource, as suggested in the issue. This fixes the registry request issue, but instead it runs into a new issue when updating the Cargo lock file usingcargo update
. This command also required the version metadata.Context
#37537
Documentation
How I've tested my work
I have verified these changes via:
Example on a real repository: DanielleHuisman/renovate-issue-37537#2