You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/05/22 04:04:01 UTC

[jira] [Closed] (GROOVY-8774) Stub generator doesn't handle package-info

     [ https://issues.apache.org/jira/browse/GROOVY-8774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-8774.
-----------------------------

> Stub generator doesn't handle package-info
> ------------------------------------------
>
>                 Key: GROOVY-8774
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8774
>             Project: Groovy
>          Issue Type: Bug
>          Components: Stub generator / Joint compiler
>    Affects Versions: 2.5.2
>            Reporter: Christopher Smith
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 4.0.0-alpha-1, 3.0.4
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The stub compiler seems to get confused with {{package-info.groovy}}, which may need special-casing. This source:
> {code:title=package-info.groovy}
> @org.hibernate.annotations.GenericGenerator(name = "random-uuid", strategy = "org.hibernate.id.UUIDGenerator")
> package my.application.domain.annotation
> {code}
> results in the stub
> {code:title=package-info.java}
> package my.application..domain.annotation;
> import java.lang.*;
> import java.io.*;
> import java.net.*;
> import java.util.*;
> import groovy.lang.*;
> import groovy.util.*;
> interface package-info
>  {
> ;
> }
> {code}
> which predictably fails because {{package-info}} is not a valid identifier. Given the semantics of {{package-info.java}} (and especially that imports aren't allowed), it might make sense to special-case this and just repeat the input file with a trailing semicolon.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)