A bug in gradle versioning for versions that end with a separator #33581
Unanswered
PhilipAbed
asked this question in
Request Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
github
Please tell us more about your question or problem
The failed version is taken from here: https://mvnrepository.com/artifact/org.jenkins-ci.plugins/token-macro
input is: 400.v35420b_922dcb_
and it fails to tokenize this version in gradle.
to reproduce the bug
add a test to the
lib/modules/versioning/gradle/index.spec.ts
The first succeeds but the second fails because it ends with a
_
separatorso i tried the same test in
lib/modules/versioning/maven/index.spec.ts
and it works like a charm.
here's the results of Gradle versioning tokenize:
note: returns null when it reaches the last character
_
here's the result of Maven versioning tokenize
I noticed both functions in gradle and maven have the same purpose but.
each of them consider different separators.
Gradle has "_" as a separator while maven considers it a normal letter.
They mention in gradle docs
Versions are divided into parts using the characters [. - _ +].
yet they let you set a version that ends with a separator which is confusing our resolution
Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions