Re: Closures in annotations

2020-11-18 Thread Remko Popma
Oh, I see. Thanks for the clarification! And thanks for the quick resolution! :-) On Thu, Nov 19, 2020 at 12:17 Paul King wrote: > I was just giving approx 72 hrs for feedback. Out of courtesy/caution more > than a hard requirement for a change like this. I'll merge now. > > cheers, Paul. > > On

Re: Closures in annotations

2020-11-18 Thread Paul King
I was just giving approx 72 hrs for feedback. Out of courtesy/caution more than a hard requirement for a change like this. I'll merge now. cheers, Paul. On Thu, Nov 19, 2020 at 9:09 AM Remko Popma wrote: > Paul, just curious: is there anything preventing > https://github.com/apache/groovy/pull/

Re: Closures in annotations

2020-11-18 Thread Remko Popma
Paul, just curious: is there anything preventing https://github.com/apache/groovy/pull/1420 from being merged? On Tue, Nov 17, 2020 at 6:25 PM Paul King wrote: > Looks good, thanks! > > On Tue, Nov 17, 2020 at 6:11 PM Remko Popma wrote: > >> You beat me to it! Thanks! >> I updated the descripti

Re: Closures in annotations

2020-11-17 Thread Paul King
Looks good, thanks! On Tue, Nov 17, 2020 at 6:11 PM Remko Popma wrote: > You beat me to it! Thanks! > I updated the description, please take a look. > > > On Tue, Nov 17, 2020 at 16:45 Paul King wrote: > >> I created this: >> https://issues.apache.org/jira/browse/GROOVY-9817 >> >> On Tue, Nov 1

Re: Closures in annotations

2020-11-17 Thread Remko Popma
You beat me to it! Thanks! I updated the description, please take a look. On Tue, Nov 17, 2020 at 16:45 Paul King wrote: > I created this: > https://issues.apache.org/jira/browse/GROOVY-9817 > > On Tue, Nov 17, 2020 at 2:11 PM Remko Popma wrote: > >> Eric and Paul, >> Thank you both for your r

Re: Closures in annotations

2020-11-17 Thread Paul King
And this: https://github.com/apache/groovy/pull/1420 On Tue, Nov 17, 2020 at 5:45 PM Paul King wrote: > I created this: > https://issues.apache.org/jira/browse/GROOVY-9817 > > On Tue, Nov 17, 2020 at 2:11 PM Remko Popma wrote: > >> Eric and Paul, >> Thank you both for your responses! >> >> Pau

Re: Closures in annotations

2020-11-16 Thread Paul King
I created this: https://issues.apache.org/jira/browse/GROOVY-9817 On Tue, Nov 17, 2020 at 2:11 PM Remko Popma wrote: > Eric and Paul, > Thank you both for your responses! > > Paul, > Thank you for your quick turnaround on supporting array annotations! > > I will create a Jira ticket when I get t

Re: Closures in annotations

2020-11-16 Thread Remko Popma
Eric and Paul, Thank you both for your responses! Paul, Thank you for your quick turnaround on supporting array annotations! I will create a Jira ticket when I get to my PC. Remko > On Nov 17, 2020, at 12:24, Paul King wrote: > >  > The following runs fine after adding in array support: >

Re: Closures in annotations

2020-11-16 Thread Paul King
The following runs fine after adding in array support: import java.lang.annotation.* import org.codehaus.groovy.runtime.InvokerHelper class ClosureTest { static class Demo { @Option(names = "-x", completionCandidates = {["A", "B", "C"]}, converter = [{

Re: Closures in annotations

2020-11-16 Thread Paul King
The Closure to Class conversion doesn't currently support arrays. If you change converter() to take just a single convert, your example works for me. Supporting arrays might be an interesting enhancement. I'll take a look at what would be involved. Cheers, Paul. On Tue, Nov 17, 2020 at 11:02 A

RE: Closures in annotations

2020-11-16 Thread Milles, Eric (TR Technology)
fails. From: Remko Popma Sent: Monday, November 16, 2020 7:02 PM To: Groovy_Developers Subject: Re: Closures in annotations I’m probably overlooking something simple but I’m not seeing it yet. The below code demonstrates the issue when trying to pass a Groovy closure to the @Option(conv

Re: Closures in annotations

2020-11-16 Thread Remko Popma
I’m probably overlooking something simple but I’m not seeing it yet. The below code demonstrates the issue when trying to pass a Groovy closure to the @Option(converter = ...)attribute: class ClosureTest { static class Demo { @picocli.CommandLine.Option(names = "-x", c

Re: Closures in annotations

2020-11-16 Thread Remko Popma
PS The ITypeConverter interface definition is here: https://picocli.info/apidocs/picocli/CommandLine.ITypeConverter.html On Mon, Nov 16, 2020 at 21:08 Remko Popma wrote: > Hi all, > > I have a question about passing closures to annotations in Groovy. > To illustrate, consider the @Option annot