[
https://issues.apache.org/jira/browse/GROOVY-11359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17839315#comment-17839315
]
Adrien Guichard edited comment on GROOVY-11359 at 4/21/24 6:55 AM:
-------------------------------------------------------------------
I would like to keep @{{{}CompileStatic{}}}.
It was working with Groovy 3.0.11, with little differences (there was no cast,
see
[oldVersion|https://github.com/Taack/infra/blob/48e48afdbf332ca2ef9c9ed7df4137685fde2720/taack-ui/src/main/groovy/taack/ast/model/TaackFieldEnumASTTransformation.groovy#L313]).
What do you mean by "write out the necessary metadata" ? I am obliged to issue
OpCode ?
EDIT: I found this [Compile time
metaprogramming|https://docs.groovy-lang.org/latest/html/documentation/index.html#_compile_time_metaprogramming]
will read it carefully.
EDIT2: The most relevant source of information comes from
{{org.codehaus.groovy.transform}} package. I am looking at it.
Regards
was (Author: adrienguichard):
I would like to keep @{{{}CompileStatic{}}}.
It was working with Groovy 3.0.11, with little differences (there was no cast,
see
[oldVersion|https://github.com/Taack/infra/blob/48e48afdbf332ca2ef9c9ed7df4137685fde2720/taack-ui/src/main/groovy/taack/ast/model/TaackFieldEnumASTTransformation.groovy#L313]).
What do you mean by "write out the necessary metadata" ? I am obliged to issue
OpCode ?
EDIT: I found this [Compile time
metaprogramming|https://docs.groovy-lang.org/latest/html/documentation/index.html#_compile_time_metaprogramming]
will read it carefully.
Thanks
> ASTTransformation cause "General error during instruction selection"
> --------------------------------------------------------------------
>
> Key: GROOVY-11359
> URL: https://issues.apache.org/jira/browse/GROOVY-11359
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 3.0.21
> Environment: $ java -fullversion
> openjdk full version "17.0.10+7"
> $ uname -a
> Linux auoHome 6.6.26-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Apr 10 20:11:08 UTC
> 2024 x86_64 GNU/Linux
> Reporter: Adrien Guichard
> Priority: Major
> Fix For: 3.0.11
>
> Attachments: expect.ex, indent.groovy, testcase-asttransform-ko.tar.gz
>
>
> When assembling the *Grails* project, I do obtain the following stacktrace:
> java.lang.ArrayIndexOutOfBoundsException: size==0
> at
> org.codehaus.groovy.classgen.asm.OperandStack.ensureStackNotEmpty(OperandStack.java:279)
> at
> org.codehaus.groovy.classgen.asm.OperandStack.replace(OperandStack.java:271)
> at
> org.codehaus.groovy.classgen.AsmClassGenerator.visitCastExpression(AsmClassGenerator.java:815)
> at org.codehaus.groovy.ast.expr.CastExpression.visit(CastExpression.java:90)
> at
> org.codehaus.groovy.classgen.asm.StatementWriter.writeReturn(StatementWriter.java:615)
> [. . .]
> Tell me if you need a more complete stacktrace. I try to work around this
> bug, changing the AST, without success. The error looks the same {*}each
> time{*}.
> To reproduce:
> $ tar xvfz testcase-asttransform-ko.tar.gz
> $ cd groovyInfra
> $ ./gradlew publishMavenPublicationToMavenLocal
> $ cd ..
> $ cd t620g
> $ ./gradlew assemble
> => BROKEN HERE
> Thanks for your help !
--
This message was sent by Atlassian Jira
(v8.20.10#820010)