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

ASF GitHub Bot commented on GROOVY-11668:
-----------------------------------------

jdaugherty commented on PR #2228:
URL: https://github.com/apache/groovy/pull/2228#issuecomment-2889112482

   I wasn't sure if it would be preferred to use JavaParser's enum or create 
one.  When I went to update the Ant task, I realized the JavaParser wasn't on 
the classpath so I created 
[one](https://github.com/apache/groovy/blob/8b2bf34425b9b8fc4fef34b48412d7a92432d4ee/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/JavaLanguageLevel.java).
  The downside is the enum will have to be updated over time - and I excluded 
preview versions.  I also noticed that the version of JavaParser in the groovy 
4 branch only parses up to Java 21. If someone has a strong opinion on a 
solution here, I'm happy to update.




> Groovydoc crashes with higher Java language levels
> --------------------------------------------------
>
>                 Key: GROOVY-11668
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11668
>             Project: Groovy
>          Issue Type: Improvement
>          Components: GroovyDoc
>            Reporter: James Daugherty
>            Priority: Critical
>
> Groovydoc supports both groovy & java files.  It supports parsing via the 
> JavaParser library & the library supports specifying a language level.  
> However, groovydoc does not have a way of setting it for the library at this 
> time.  By default the library defaults to the "popular" language level of 
> that release - for the current JavaParser version that is Java 11.  
> As projects update to newer language features, it is desirable to continue 
> using groovydoc for later Java versions.  This change is to add an option to 
> groovydoc to specify the language level based on the possible values in the 
> enum ParserConfiguration.LanguageLevel from the JavaParser library.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to