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

[groovy] Support Groovy to 3 and 4 and CPD suppressions #4726

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

jsotuyod
Copy link
Member

@jsotuyod jsotuyod commented Oct 21, 2023

Describe the PR

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

 - We now support parsing all Groovy features from Groovy 3 and 4
 - Support for 5 is not included as it would not work with Java 8
 - Along the way, this also fixes pmd#4674
@jsotuyod jsotuyod added this to the 7.0.0 milestone Oct 21, 2023
@jsotuyod
Copy link
Member Author

jsotuyod commented Oct 21, 2023

I still need to update documentation and changelog appropriately.

Thankfully the base implementation we did to support both JavaCC a Antlr was flexible enough to accommodate this one, even if it's using a different Antlr and needed new implementations here and there.

Groovy 5 requires JRE 11 to run, and since it attempts to load immediately upon being in the classpath (hence the logs seen in #4674) I didn't dare to use it.

@pmd-test
Copy link

1 Message
📖 No regression tested rules have been changed.

Generated by 🚫 Danger

@adangel adangel added an:enhancement An improvement on existing features / rules in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception labels Nov 10, 2023
@adangel adangel self-assigned this Dec 11, 2023
Copy link
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

I'm going to update the release notes and doc and merge it afterwards.

@adangel adangel merged commit 65b4c38 into pmd:master Dec 11, 2023
3 checks passed
adangel added a commit that referenced this pull request Dec 11, 2023
[groovy] Support Groovy to 3 and 4 and CPD suppressions #4726
@jsotuyod jsotuyod deleted the upgrade-groovy branch December 11, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
an:enhancement An improvement on existing features / rules in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass
3 participants