-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Revert "Revert "Use new implementation of Maven version standard"" #10704
Merged
amazimbe
merged 1 commit into
main
from
revert-10647-revert-10558-amazimbe/use-new-maven-version
Oct 3, 2024
Merged
Revert "Revert "Use new implementation of Maven version standard"" #10704
amazimbe
merged 1 commit into
main
from
revert-10647-revert-10558-amazimbe/use-new-maven-version
Oct 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2cb6e7f
to
661c07e
Compare
I've merged #10664 into this one |
5 tasks
jakecoffman
reviewed
Oct 2, 2024
.github/workflows/smoke.yml
Outdated
@@ -14,7 +14,7 @@ concurrency: | |||
|
|||
env: | |||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |||
SMOKE_TEST_BRANCH: main | |||
SMOKE_TEST_BRANCH: revert-229-revert-228-amazimbe/use-new-maven-version |
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 revert this before merging. It's ok to say "the smoke test failure is expected" when making changes like this. Smoke test failures are not required checks so it doesn't block a merge.
jakecoffman
approved these changes
Oct 2, 2024
b68e3b8
to
4060061
Compare
jonabc
added a commit
that referenced
this pull request
Mar 9, 2025
The maven version parser was broadened in #10704, however VERSION_PATTERN was not updated to match. Looking at the version parser and the details of maven's ComparableVersion https://maven.apache.org/ref/3.5.2/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html, it looks like "unlimited number of version components" means that the regex pattern can be simplified.
jonabc
added a commit
that referenced
this pull request
Mar 9, 2025
The maven version parser was broadened in #10704, however VERSION_PATTERN was not updated to match. Looking at the version parser and the details of maven's ComparableVersion https://maven.apache.org/ref/3.5.2/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html, it looks like "unlimited number of version components" means that the regex pattern can be simplified.
5 tasks
jonabc
added a commit
that referenced
this pull request
Mar 9, 2025
The maven version parser was broadened in #10704, however VERSION_PATTERN was not updated to match. Looking at the version parser and the details of maven's ComparableVersion https://maven.apache.org/ref/3.5.2/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html, it looks like "unlimited number of version components" means that the regex pattern can be simplified.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #10647
What are you trying to accomplish?
Update Maven to use the newly implemented maven version standard: #10524
I added a new implementation of the maven version standard in PR #10524. However, to reduce the size of that PR I decided to create a separate PR where I can integrate the new version implementation.
Fixes incorrect version precedence and adds extra tests for version comparisons.
Anything you want to highlight for special attention from reviewers?
The maven spec: https://maven.apache.org/pom.html#version-order-specification is not 100% compatible with the implementation we had before. For example, in the previous implementation, any versions with qualifiers like 'pr', 'pre' or 'dev' were considered prereleases. The maven spec only mentions "alpha", "beta", "milestone", "rc", "cr" and "snapshot" as having lower precedence than ("" | final | ga) i.e. as potential prereleases.
In my view, it's better to strictly follow the spec since standardising is one of our goals. Therefore, I have removed the other tokens from the previous implementation that were being treated as prereleases. However, this could be a breaking change for some users who might expect versions like 1.2.dev to have lower precedence than 1.2.dev, for example.
I've also had to remove some code and update tests to do with dynamic versioning e.g 2.+. This is a gradle feature that the maven specification doesn't support.
Finally, in order to test the new implementation thoroughly, I've grouped similar test inputs together and I loop through these lists to avoid having to manually type in the test cases individually. Inevitably, that's coming up as a huge diff in the test files.