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

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

testlens-app[bot] commented on PR #2511:
URL: https://github.com/apache/groovy/pull/2511#issuecomment-4370523220

   ## ✅ All tests passed ✅
   
   ⚠️ TestLens detected flakiness ⚠️
   
   ### Test Summary
   
   | Check | Project/Task | Test | Runs |
   |---|---|---|---|
   | [Build and test / lts \(17, 
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/25314552658/job/74208988604?pr=2511)
 | :test | TempTest > testCode\(\) | ⚠️ |
   
   🏷️ Commit: d8e494666c37c602c41f83c2f064a6340e7de804
   ▶️ Tests:  62935 executed
   🟡 Checks: 12/24 completed
   
   ### Test Failure
   
   <details>
   
   <summary><strong>TempTest > testCode()</strong> (:test in <a 
href="https://github.com/apache/groovy/actions/runs/25314552658/job/74208988604?pr=2511";>Build
 and test / lts (17, ubuntu-latest)</a>)</summary>
   
   ```
   groovy.lang.MissingMethodException: No signature of method: assertScript for 
class: TempTest is applicable for argument types: 
(org.codehaus.groovy.runtime.GStringImpl) values: 
[@GrabResolver('file:/home/runner/work/groovy/groovy/build/testFixtures/extmodule/repo/jars')
                   @Grab(value='module-test:module-test:1.4', changing='true')
                   import org.codehaus.groovy.runtime.m12n.*
   
                   // ensure that the module is now loaded
                   ExtensionModuleRegistry registry = 
GroovySystem.metaClassRegistry.moduleRegistry
                   assert registry.modules.any { it.name == 'Test module for 
Grab' && it.version == '1.4' }
   
                   // the following methods are added by the 'Test module for 
Grab' module
                   def str = 'This is a string'
                   assert str.reverseToUpperCase2() == 
str.toUpperCase().reverse()
                   assert String.answer2() == 42
               ]
        at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:83)
        at 
org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures.unwrap(IndyGuardsFiltersAndSignatures.java:163)
        at TempTest.testCode(Temp.groovy:16)
   ```
   
   </details>
   
   ---
   _Learn more about TestLens at [testlens.app](https://testlens.app)._
   




> groovydoc CLI fails with "Unsupported Java Version: false" when --javaVersion 
> omitted
> -------------------------------------------------------------------------------------
>
>                 Key: GROOVY-11987
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11987
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 6.0.0-alpha-1
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> {code}
> $ groovydoc -d out -sourcepath src Foo.groovy
> java.lang.IllegalArgumentException: Unsupported Java Version: false
>     at 
> org.codehaus.groovy.tools.groovydoc.GroovyDocTool.calculateLanguageLevel(GroovyDocTool.java:128)
>     at 
> org.codehaus.groovy.tools.groovydoc.GroovyDocTool.<init>(GroovyDocTool.java:78)
>     at org.codehaus.groovy.tools.groovydoc.Main.execute(Main.groovy:284)
> {code}
> When the {{--javaVersion}} CLI option is omitted, {{groovydoc}} aborts with 
> {{IllegalArgumentException: Unsupported Java Version: false}} instead of 
> falling back to the running JVM's version.
> *Root cause:* in {{Main.groovy}} line 163, {{javaVersion = 
> options.javaVersion}} reads the picocli option without handling its 
> absent-value sentinel, so the literal string {{"false"}} is passed to 
> {{GroovyDocTool}}. In {{GroovyDocTool.calculateLanguageLevel}}, the {{null}} 
> check at line 113 never triggers (the value is non-null {{"false"}}), so the 
> code falls through to {{ParserConfiguration.LanguageLevel.valueOf("FALSE")}} 
> at line 126, which throws.
> *Expected:* with no {{--javaVersion}}, {{groovydoc}} should use the running 
> JVM's feature version (the existing fallback in the {{version == null}} 
> branch).
> *Workaround:* pass {{-javaVersion JAVA_17}} (or matching version) explicitly.
> *Affects:* 6.0.0-SNAPSHOT.



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

Reply via email to