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

Skip parsing groovy generated transform methods #4848

Merged

Conversation

jevanlingen
Copy link
Contributor

@jevanlingen jevanlingen commented Jan 6, 2025

What's changed?

Generated transform annotations are parsed.

What's your motivation?

Any additional context

Notice with these fixes the parser just ignores the groovy AST transformations. So you cannot use the 'real' AST as the bytecodes dictate in the groovy recipes. If we want to support that, we would have to do a project like rewrite-lombok.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@jevanlingen jevanlingen added bug Something isn't working parser-groovy labels Jan 6, 2025
@jevanlingen jevanlingen self-assigned this Jan 6, 2025
@jevanlingen jevanlingen linked an issue Jan 6, 2025 that may be closed by this pull request
@jevanlingen jevanlingen marked this pull request as ready for review January 6, 2025 12:11
@jevanlingen jevanlingen marked this pull request as draft January 6, 2025 12:19
@jevanlingen jevanlingen marked this pull request as ready for review January 6, 2025 12:46
@jevanlingen jevanlingen merged commit a3249f2 into main Jan 6, 2025
2 checks passed
@jevanlingen jevanlingen deleted the 4254-groovy-generated-transform-methods-break-parser branch January 6, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser-groovy
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Groovy generated transform methods break parser
2 participants