You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make use of Spotless code formatter (within gradle) for formatting our Java + Groovy code. Unfortunately, when setting it up today I encountered some issues with lambda syntax in Groovy 3+ code. A bit of googling lead me to groovy-eclipse, since Spotless uses it to perform its groovy parsing. Eventually I stumbled on the 4.2.0 release notes with the following:
The new antlr4-based Parrot Parser is disabled by default. To enable it, add -Dgroovy.antlr4=true to your eclipse.ini file after the -vmargs line or add a compiler config script to your project with configuration.pluginFactory = org.codehaus.groovy.control.ParserPluginFactory.antlr4()
There doesn't seem to be any way to enable antlr4 from gradle directly. I was able to get things working by passing a JVM option to gradle directly, but I was hoping to configure this in such a way that doesn't require active input from other team members.
Initially I opened an issue at diffplug/spotless#975, inquiring as to whether or not I was missing something. Ultimately, they think this would be better served by making it more configurable from within groovy-eclipse itself.
The text was updated successfully, but these errors were encountered:
Since Groovy 4 is just around the corner and removes the Antlr2 based parser completely, is there any plans to just switch to the Antlr4 parser by default?
Groovy 4 does indeed remove its antlr2-based parser. But it does not remove the mechanism for supplying any compatible parser to the compiler. So this project continues to supply a patched antlr2-based parser to keep code completion and other editor features working.
Plans for transition to the antlr40based parser as the default can be tracked here: #1011 #1107
I'm trying to make use of Spotless code formatter (within gradle) for formatting our Java + Groovy code. Unfortunately, when setting it up today I encountered some issues with lambda syntax in Groovy 3+ code. A bit of googling lead me to groovy-eclipse, since Spotless uses it to perform its groovy parsing. Eventually I stumbled on the 4.2.0 release notes with the following:
There doesn't seem to be any way to enable antlr4 from gradle directly. I was able to get things working by passing a JVM option to gradle directly, but I was hoping to configure this in such a way that doesn't require active input from other team members.
Initially I opened an issue at diffplug/spotless#975, inquiring as to whether or not I was missing something. Ultimately, they think this would be better served by making it more configurable from within groovy-eclipse itself.
The text was updated successfully, but these errors were encountered: