Repository navigation
Test on Java 21 and 25 through additional_test_java_versions - #1194
Merged
Merged
Conversation
Drop the toolchain override to 25, so the build and its tests run on the recipe-library plugin's Java 21 toolchain again, and put both rewrite-java-21 and rewrite-java-25 on the test runtime classpath. The new additional_test_java_versions input of ci-gradle.yml then runs the tests on Java 25 as well (openrewrite/gh-automation#120).
The Java 21 parser cannot parse unnamed variables, which became final in Java 22.
This file contains hidden or 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
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.
Adopts openrewrite/gh-automation#120: CI now runs the tests on Java 21 in the build job and on Java 25 in a separate
test (Java 25)job, where before it only ran them on 25. Thebuild.gradle.ktsoverride that set the toolchain to 25 is gone, so the build falls back to therecipe-libraryplugin's toolchain, which is 21.rewrite-java-21andrewrite-java-25are both on the test runtime classpath now, soJavaParser.fromJavaVersion()gets the parser that matches each JVM.ci.ymlswapsjava_version: 25/21foradditional_test_java_versions: '[25]', which is the same setup as rewrite-migrate-java.The two
MockitoWhenOnStaticToMockStaticTesttests that use unnamed variables now run only on Java 25, because the Java 21 parser cannot read them.