[
https://issues.apache.org/jira/browse/GROOVY-7056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16604301#comment-16604301
]
Christopher Smith commented on GROOVY-7056:
-------------------------------------------
I seem to be having this same issue with 2.5.2 (and formerly with the 2.4
series after this fix); is there a test in the main Groovy tree for this? I
think this underlies the bug I filed against GMavenPlus, with behavior that's
identical as far as I can tell. https://github.com/groovy/GMavenPlus/issues/74
> AnnotationCollector unusable in external jar when used in stub generation
> -------------------------------------------------------------------------
>
> Key: GROOVY-7056
> URL: https://issues.apache.org/jira/browse/GROOVY-7056
> Project: Groovy
> Issue Type: Bug
> Components: Stub generator / Joint compiler
> Affects Versions: 2.3.4
> Environment: windows, java 8
> Reporter: Brad Miller
> Assignee: Jochen Theodorou
> Priority: Major
> Fix For: 2.3.7, 2.4.0-beta-4
>
> Attachments: mod.zip
>
>
> In the attached test case (cd mod; gradle clean build), I have a parent
> module with two child modules. The first module simply defines a simple
> AnnotationCollector. The second module is structured so that it will
> generate a java stub for a groovy file that uses the 'external' annotation
> collector. When the generated java stub for ParentG is compiled, it throws
> the following exception:
> :mod2:compileGroovyC:\sand\nca\javacommons\nca\harmonytest\mod\mod2\build\tmp\groovy-java-stubs\mod2\ParentG.java:10:
> error: incompatible types: ExternalAnnotationCollector cannot be converted
> to Annotation
> @mod1.ExternalAnnotationCollector() public class ParentG
> It appears that the java compilation of the groovy stub does not have the
> external AnnotationCollector 'in scope' of the compiler, and thus barfs.
> However, if the AnnocationCollector is in the same module as where it used,
> the compilation works (uncomment the obvious line in ParentG and rebuild).
> This seems related to https://jira.codehaus.org/browse/GRECLIPSE-1679
> Added Sept. 4th:
> Also related to http://jira.codehaus.org/browse/GROOVY-6635 which was closed
> as 'not reproducible' - believe the test case with this issue effectively
> reproduces the issue (and 6635's as well)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)