Re: AST Transformation in Groovy 4.0.x VS 3.0.x

Adrien Guichard <[email protected]>
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CAJHGhwChXSag46+u1fXai9DvNJP7DNV=CzjHQAdh06wGo7D8Jw@mail.gmail.com>
Le dim. 14 avr. 2024 à 03:32, Adrien Guichard
<[email protected]> a écrit :
>
> Is there any guideline to port AST Transformations for Groovy 4.0 ?
>
> I am porting Taack-UI to Groovy 4.0, and I am stuck with errors like:
> [. . . ]
>   General error during instruction selection: size==0
> [. . .]
>
>
> At the moment I just added casts at ReturnStatements. (See https://github.com/Taack/infra/blob/main/taack-ui/src/main/groovy/taack/ast/model/TaackFieldEnumASTTransformation.groovy)

More info:

Look around
- line 353 for getter method processing;
- line 321 for fields processing;
- line 170 for self;

Other parts of the code should depend on Grails only, so no impact.

The goal of those transformations is mainly to add getters with '_'
appended to add meta info to fields (like field name).

Regards

--
Adrien Guichard
+ 33 6 10 78 75 88
https://taack.org
29 Boulevard Edgar Quinet
75014 Paris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.