Skip to content

Upgrade to Groovy 5 #6220

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Upgrade to Groovy 5 #6220

wants to merge 1 commit into from

Conversation

bentsherman
Copy link
Member

Initial attempt to upgrade to Groovy 5.

Benefits:

  • new collection functions like zip (can be added to Nextflow standard library)
  • pattern matching for instanceof (can be added to Nextflow language)
  • use _ for placeholder variables (can be added to Nextflow language)

Changes:

  • Had to remove generic type arguments from instanceof checks as the Groovy parser doesn't allow it anymore

  • Had to add @Slf4j to some inner classes to make log work in that class. not sure if this is a bug or just a breaking change

Current issues:

  • Groovy complained about a few implementers of CacheFunnel, even though I didn't see anything wrong. Converting CacheFunnel to Java fixed the issue for one but not the other

  • Multiple issues with the type checker that I'm pretty sure are just Groovy bugs, particularly CmdLog and DumpOp

  • The type checker does not recognize target in TaskConfig as a Map, seems like a bug. I wonder if it's an edge case since target is defined in super class as private and a Delegate

Overall it looks like Groovy 5 beta still has a few compiler bugs to sort out. But I'm excited to get it working so that I can bring the new pattern matching features into the Nextflow language.

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman bentsherman requested a review from a team as a code owner June 25, 2025 19:33
Copy link

netlify bot commented Jun 25, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 5f0a0c6
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/685c4ef8f0e52800088d8c64

@bentsherman bentsherman marked this pull request as draft June 25, 2025 19:33
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.

1 participant