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

Build on Java 21 #982

Merged
merged 4 commits into from
Oct 3, 2023
Merged

Build on Java 21 #982

merged 4 commits into from
Oct 3, 2023

Conversation

bodiam
Copy link
Contributor

@bodiam bodiam commented Oct 3, 2023

(temurin doesn't support Java 21 yet, so moved to Corretto for the time being)

@bodiam bodiam changed the title Build on Java 21 (temurin doesn't support Java 21 yet, so moved to Co… Build on Java 21 Oct 3, 2023
@what-the-diff
Copy link

what-the-diff bot commented Oct 3, 2023

PR Summary

  • Update of Java Version Matrix
    The versions of Java that our software checks against have been updated. We were previously testing against version 17 and 20, but now we're also going to check against version 21. This update ensures that we stay compatible with the latest version of Java.

  • Change in Java Distribution
    We've switched from using 'Temurin' to 'Corretto' as our Java distribution. This change was made to use a Java distribution that may work better for our specific needs.

  • Modification of Maven Build Command
    In the commands we use to build our software with Maven, we've started using the $mvn_options variable and turned on the -PnoGpg option. This update should give us better control over the build process and disable GPG signing during the build, providing a more efficient process.

@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.32%. Comparing base (e6e1e76) to head (27d929b).
Report is 418 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #982      +/-   ##
============================================
- Coverage     92.37%   92.32%   -0.06%     
+ Complexity     2761     2759       -2     
============================================
  Files           289      289              
  Lines          5523     5523              
  Branches        602      602              
============================================
- Hits           5102     5099       -3     
- Misses          269      270       +1     
- Partials        152      154       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -10,7 +10,7 @@ on:
branches: [ main, 1.x ]

env:
mvn_options: --batch-mode -Dstyle.color=always -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS
mvn_options: --batch-mode -Dnet.bytebuddy.experimental=true -Dstyle.color=always -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS
Copy link
Collaborator

@snuyanzin snuyanzin Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
no need for =true
this should be enough
-Dnet.bytebuddy.experimental

Copy link
Contributor Author

@bodiam bodiam Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just stole it from here: raphw/byte-buddy#1396

either way, this should be a temporary solution until Mockito releases things.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

@bodiam bodiam Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this Windows Build doesn't want to start or finish.

update Ah, seems like the old build was stuck, preventing the new one from running.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

I re-ran failed (which includes cancelled). Fingers crossed it actually runs this time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cancelled the build, triggered it again, but seems no luck.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's wait till the end to see exception
i guess there should be timeout something about an hour

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems I found the reason

  1. mockito (5.5.0) depends on byte-buddy 1.14.6
  2. mvn dependency:tree shows that it uses byte-buddy 1.12.11
  3. it comes from assertj-core

As a result exclusion of byte-buddy from assertj-core solves the issue and makes it using byte-buddy from mockito
as a bonus after that there is no need for -Dnet.bytebuddy.experimental at all

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for tackling that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I see that AssertJ did upgrade: https://github.com/assertj/assertj/blob/main/assertj-core/pom.xml#L31, they just haven't released a version in a while.

@bodiam bodiam merged commit 2d7abe2 into main Oct 3, 2023
@bodiam bodiam deleted the java-21 branch October 3, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants