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

Remko Popma edited comment on GROOVY-9553 at 5/14/20, 7:21 AM:
---------------------------------------------------------------

I found an [issue in picocli 
4.3.0|https://github.com/remkop/picocli/issues/1043] that impacts CliBuilder. 
This will need to be fixed first, so we should skip 4.3.0 and bump to version 
4.3.1 instead.

Additionally, the format of an error message has changed, so the following test 
needs to be updated with the version bump:
{code:java}
CliBuilderTest.testFailedParsePrintsUsage
 
Assertion failed: 

assert stringWriter.toString() == String.format( "error: Missing required 
option '-x'%n" +\ "Usage: groovy -x%n" +\ "  -x           message%n")
       |            |          |         |                                      
         |                       |
       |            |          false     |                                      
         |                       'error: Missing required option \'-x\'%nUsage: 
groovy -x%n  -x           message%n'
       |            |                    |                                      
         'error: Missing required option \'-x\'%nUsage: groovy -x%n'
       |            |                    'error: Missing required option 
\'-x\'\nUsage: groovy -x\n  -x           message\n'
       |            'error: Missing required option: \'-x\'\nUsage: groovy -x\n 
 -x     message\n'
       error: Missing required option: '-x'
       Usage: groovy -x
         -x     message

        at 
org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:434)
        at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670)
        at 
groovy.cli.picocli.CliBuilderTest.testFailedParsePrintsUsage(CliBuilderTest.groovy:164)
{code}


was (Author: [email protected]):
I found an [issue in picocli 
4.3.0|[https://github.com/remkop/picocli/issues/1043]] that impacts CliBuilder. 
This will need to be fixed first, so we should skip 4.3.0 and bump to version 
4.3.1 instead.

Additionally, the format of an error message has changed, so the following test 
needs to be updated with the version bump:
{code:java}
CliBuilderTest.testFailedParsePrintsUsage
 
Assertion failed: 

assert stringWriter.toString() == String.format( "error: Missing required 
option '-x'%n" +\ "Usage: groovy -x%n" +\ "  -x           message%n")
       |            |          |         |                                      
         |                       |
       |            |          false     |                                      
         |                       'error: Missing required option \'-x\'%nUsage: 
groovy -x%n  -x           message%n'
       |            |                    |                                      
         'error: Missing required option \'-x\'%nUsage: groovy -x%n'
       |            |                    'error: Missing required option 
\'-x\'\nUsage: groovy -x\n  -x           message\n'
       |            'error: Missing required option: \'-x\'\nUsage: groovy -x\n 
 -x     message\n'
       error: Missing required option: '-x'
       Usage: groovy -x
         -x     message

        at 
org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:434)
        at 
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670)
        at 
groovy.cli.picocli.CliBuilderTest.testFailedParsePrintsUsage(CliBuilderTest.groovy:164)
{code}

> Bump picocli to 4.3.0
> ---------------------
>
>                 Key: GROOVY-9553
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9553
>             Project: Groovy
>          Issue Type: Dependency upgrade
>          Components: command line processing
>    Affects Versions: 3.0.3, 2.5.11
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>            Priority: Major
>             Fix For: 3.0.4, 2.5.12
>
>
> Bump picocli to 4.3.0



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

Reply via email to