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

Enable the use of Java 22 #4970

Merged
merged 13 commits into from
May 27, 2024
Merged

Enable the use of Java 22 #4970

merged 13 commits into from
May 27, 2024

Conversation

pditommaso
Copy link
Member

This PR adds the support Java 22

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso pditommaso requested a review from a team as a code owner May 3, 2024 13:24
Copy link

netlify bot commented May 3, 2024

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit de13de8
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/6654932d60bc300008b4a0a9
😎 Deploy Preview https://deploy-preview-4970--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso
Copy link
Member Author

pditommaso commented May 3, 2024

When compiling with Java >= 21, the following error is reported

Execution error (ClassNotFoundException) at
jdk.internal.loader.BuiltinClassLoader/loadClass (BuiltinClassLoader.java:641).
java.util.SequencedCollection

This looks caused by the new SequencedCollection interface introduced in Java 21 that's retroffied in the collection API.

Ideally the target compatibility setting should prevent this, but it looks it's ignored.

The following link reports a similar error in Clojure:

https://aphyr.com/posts/369-classnotfoundexception-java-util-sequencedcollection

build.gradle Outdated Show resolved Hide resolved
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso
Copy link
Member Author

The problem the build fails with Java using this error

> BUG! exception in phase 'semantic analysis' in source unit '/home/runner/work/nextflow/nextflow/buildSrc/src/main/groovy/io/nextflow/gradle/tasks/AbstractS3Task.groovy' Unsupported class file major version 66

Interestingly enough this is not nextflow code base the project buildSrc plugin used by Gradle

@pditommaso
Copy link
Member Author

Java is not supported by Gradle

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso pditommaso changed the title Build java22 Enable the use of Java 22 May 21, 2024
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@pditommaso pditommaso merged commit cbf24f9 into master May 27, 2024
22 checks passed
@pditommaso pditommaso deleted the build-java22 branch May 27, 2024 14:29
marcodelapierre pushed a commit that referenced this pull request May 31, 2024
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Dr Marco Claudio De La Pierre <marco.delapierre@gmail.com>
nathanthorpe pushed a commit to nathanthorpe/nextflow that referenced this pull request May 31, 2024
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
Signed-off-by: Nathan Thorpe <nathan@techstormpc.com>
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.

Upgrade Nextflow to work with Java 22
1 participant