Skip to content
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

Conversation

amazimbe
Copy link
Contributor

@amazimbe amazimbe commented Oct 1, 2024

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.

@github-actions github-actions bot added the L: java:maven Maven packages via Maven label Oct 1, 2024
@amazimbe amazimbe force-pushed the revert-10647-revert-10558-amazimbe/use-new-maven-version branch from 2cb6e7f to 661c07e Compare October 1, 2024 10:57
@amazimbe amazimbe changed the title Use new implementation of Maven version standard Revert "Revert "Use new implementation of Maven version standard"" Oct 1, 2024
@amazimbe amazimbe marked this pull request as ready for review October 1, 2024 11:02
@amazimbe amazimbe requested a review from a team as a code owner October 1, 2024 11:02
@amazimbe
Copy link
Contributor Author

amazimbe commented Oct 1, 2024

I've merged #10664 into this one

@@ -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
Copy link
Member

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.

…0647)"

This reverts commit 10e5c7c.

Move ignore conditions for maven to maven version
@amazimbe amazimbe force-pushed the revert-10647-revert-10558-amazimbe/use-new-maven-version branch from b68e3b8 to 4060061 Compare October 3, 2024 08:37
@amazimbe amazimbe merged commit 5ffb7a2 into main Oct 3, 2024
123 of 124 checks passed
@amazimbe amazimbe deleted the revert-10647-revert-10558-amazimbe/use-new-maven-version branch October 3, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: java:maven Maven packages via Maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants