You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2019/09/12 16:12:00 UTC

[jira] [Commented] (GROOVY-9238) Groovy 2.5 AnnotationCollector not generating expected bytecode

    [ https://issues.apache.org/jira/browse/GROOVY-9238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928694#comment-16928694 ] 

Eric Milles commented on GROOVY-9238:
-------------------------------------

It looks like {{@CompileStatic}} is being applied, but {{@Immutable}} is not because it is also an {{AnnotationCollector}}-based annotation.  It does not look like there is support currently implemented for nested collectors.

You could work around this by looking at Immutable and adding all its annotations to your collector.

> Groovy 2.5 AnnotationCollector not generating expected bytecode
> ---------------------------------------------------------------
>
>                 Key: GROOVY-9238
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9238
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler, groovy-runtime
>    Affects Versions: 2.5.x
>         Environment: Ubuntu 18.04.3 LTS
>            Reporter: Andrew Allen
>            Priority: Major
>
> When using {{@AnnotationController}} with meta-annotations ( {{@Canonical}}, {{@Immutable}} ) compiled classes do not contain the expected bytecode.  As an example I have a [project | https://github.com/kod4n/groovy-gradle-issue] that is using a custom annotation with an annotation collector for {{@Immutatble}} and {{@CompileStatic}}.  The error can be reproduced by running {{./gradlew clean test}} against the linked project.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)