Re: ShortTypeHandling castToString

2016-06-14 Thread Paul King
Yes, it's clearly a bug as can be seen by running an example such as below: String foo() { Integer } foo() // ClassCastException Whereas 'Integer as String' works fine. I have a fix for this in PR#345 as part of GROOVY-7853, see: https://github.com/apache/groovy/pull/345 Just waiting for to

Re: @CompileStatic & interfaces

2016-05-29 Thread Paul King
I haven't dived in deeply, but adding @CompileStatic would pick up certain kinds of errors at compilation time that would otherwise result in a runtime error, e.g. a member such as: int BAR = Object.propertyDoesNotExist On Mon, May 30, 2016 at 7:47 AM, Schalk Cronjé wrote: >

Re: ShortTypeHandling castToString

2016-06-18 Thread Paul King
I updated PR #345 as per your comments (I believe). Let me know if it looks okay. I did require changing one swing test that was relying on the old toString behavior. It would be nice if Andres could comment if such a change could impact Griffon. On Sat, Jun 18, 2016 at 6:04 PM, Jochen Theodorou

GenericsVisitor change for Groovy 2.5.0

2016-06-24 Thread Paul King
Hi everyone, I moved the GenericsVisitor earlier in the compilation process. This means that errors involving class usage but supplying an incorrect number of type parameters, e.g. List or HashMap or invalid Diamond operator usage will now be flagged earlier. This is nice

Re: Example of CliBuilder with "optionalArg: true"?

2016-02-08 Thread Paul King
I think we had some improved handling for optional args in some spikes we did for newer versions of the CLI processing stuff. But none of that has been taken forward yet. In the interim, you can peek at return types as per your examples above or sneak down into the underlying implementation -

Re: Escaping unicode reference in slashy string

2016-02-08 Thread Paul King
Unicode processing is done before anything else. For your case, you need to make it not look like a unicode sequence - which you rightly did with the double backslash variant. But you then need to pick the GString form that does the appropriate thing with the sequence of characters that passed

Re: not sure about Collection.intersect

2016-02-09 Thread Paul King
Yes, I think the fix proposed in: https://issues.apache.org/jira/browse/GROOVY-7530 will fix this bug with intersect too. See also: https://issues.apache.org/jira/browse/GROOVY-7602 Cheers, Paul. On Tue, Feb 9, 2016 at 1:32 PM, Strachan, Paul wrote: > OK. It

Re: Escaping unicode reference in slashy string

2016-02-09 Thread Paul King
:38 PM, David M. Karr <davidmichaelk...@gmail.com> > wrote: >> >> On 02/08/2016 05:40 PM, Paul King wrote: >>> >>> Unicode processing is done before anything else. For your case, you >>> need to make it not look like a unicode sequence - which you righ

Re: search for particular text in a multi-line string

2016-03-16 Thread Paul King
Can you give an example of what isn't working as expected? contains() should be good enough if you have the appropriate line endings in your expected text. Otherwise regex searching might be the way to go. Cheers, Paul. On Wed, Mar 16, 2016 at 2:28 PM, Deng, Lea wrote: >

Re: XmlSlurper, attributes and namespaces

2016-03-06 Thread Paul King
Yes, I think it is a bug. I thought we had a workaround using star, i.e. node.@'*:attributeName', much like node.'*:tagName' but the attribute version with star doesn't work either. On Sat, Mar 5, 2016 at 7:43 PM, Pascal Schumacher wrote: > Hi Jason, > > I do not know.

Re: [ANN] Release 0.5.0 of spock-genesis

2016-07-18 Thread Paul King
Looks nice! Great work! On Tue, Jul 19, 2016 at 11:29 AM, Dylan Bijnagte wrote: > I just pushed the latest release of spock-genesis > Mostly lazy data generators for property based testing using the Spock test > framework > > New it this release: > * Limit the number of

Re: looks like a missing exception harness in a typechecker somewhere?

2016-07-11 Thread Paul King
I assume (given you say heavily transformed) that you don't have a simple way to reproduce the error? On Tue, Jul 12, 2016 at 7:26 AM, OC wrote: > Hi there, > > with a pretty complex and heavily AST-transformed code, which, nevertheless, > *without typechecking builds and runs all

Re: I need I help to create two litlle scripts using groovy

2017-02-02 Thread Paul King
AM, Paul King <pa...@asert.com.au> wrote: > I have forwarded your question to the users list which is specifically > designed for usage questions about Groovy. > > This list is for discussions about developing the Groovy language itself. > > Cheers, Paul. > >

Fwd: I need I help to create two litlle scripts using groovy

2017-02-02 Thread Paul King
I have forwarded your question to the users list which is specifically designed for usage questions about Groovy. This list is for discussions about developing the Groovy language itself. Cheers, Paul. -- Forwarded message -- From: pppablo Date: Fri, Feb 3,

Re: Performance conundrum ?

2017-01-26 Thread Paul King
There are numerous trade-offs between functional and imperative styles (a general statement not specific to Groovy). Often you'll lose performance to gain the more declarative coding style. In fact it's a big part of implementation design (and an on-going research topic) to make functional style

Re: help with an AST

2017-02-22 Thread Paul King
ried with and without the VariableScopeVisitor call, and with and > without > a call to "blockStatement.variableScope.putReferencedClassVariable( cv)".) > > So, does this look like the correct way to set the value of a property that > is > inherited from a

Re: help with an AST

2017-02-16 Thread Paul King
Do you have something like: VariableScopeVisitor scopeVisitor = new VariableScopeVisitor(source) scopeVisitor.visitClass(cNode) for each of your closure(s)? Where cNode is a closure's classNode? Cheers, Paul. On Thu, Feb 16, 2017 at 9:35 PM, Ed Clark wrote: > Ok, a

RE: [ANNOUNCE] Apache Groovy 2.4.8 released

2017-01-17 Thread Paul King
/groovy-lang.org/security.html. The link http://groovy-lang.org/security.htm gives 404. Jason -Original Message- From: Paul King [mailto:pa...@asert.com.au] Sent: Saturday, January 14, 2017 2:27 AM To: d...@groovy.apache.org; users@groovy.apache.org; annou...@apache.org Subject: [ANNOUNCE] Apa

Re: Reporting groovy line number in log4j2

2016-08-22 Thread Paul King
We set the line number to -1 for generated code which doesn't have a corresponding real line in the source code. So, you might be seeing exactly what we expect or it's possible we have missed some case. Can you elaborate further on how you are using the logging? Cheers, Paul. On Tue, Aug 23,

[ANNOUNCE] Apache Groovy 2.4.9 Released

2017-02-27 Thread Paul King
Dear community, The Apache Groovy team is pleased to announce version 2.4.9 of Apache Groovy. Apache Groovy is a multi-facet programming language for the JVM. Further details can be found at the http://groovy.apache.org website. This release is a maintenance release of the GROOVY_2_4_X branch.

Re: [ANNOUNCE] Apache Groovy 2.4.9 Released

2017-02-28 Thread Paul King
11:23 AM, Paul King <pa...@apache.org> wrote: >> The Apache Groovy team is pleased to announce version 2.4.9 of Apache Groovy. > > Thanks for the release! > > I'm just pointing out that the "source" link for the 2.4.9 release in > the download page points to a

Fwd: Delete Sub Child XML Nodes

2016-08-24 Thread Paul King
I forwarded your email to the users list since it isn't about development of the language codebase itself but rather about using Groovy. Cheers, Paul. -- Forwarded message -- From: GroovyBeginner Date: Thu, Aug 25, 2016 at 12:51 AM Subject: Delete Sub

Re: Delete Sub Child XML Nodes

2016-08-24 Thread Paul King
def xml = new XmlParser().parseText(employees) xml.'**'.ZipCode.each { it.'..'.remove(it) } XmlUtil.serialize(xml) On Thu, Aug 25, 2016 at 9:06 AM, Paul King <pa...@asert.com.au> wrote: > I forwarded your email to the users list since it isn't about > development of the language cod

Re: Looking for testers & feedback: new Groovy binaries for Windows

2016-09-08 Thread Paul King
I think there are numerous problems with the argument passing in the batch files. That was one of the things that the exe files aimed to improve on. I must admit to having reservations about the new approach. Not so much with the concept but more about relying on the current bat files. That said,

Re: Reporting groovy line number in log4j2

2016-08-30 Thread Paul King
xample: >> >> package com.sample >> >> class SampleController { >> >> def index() { >> log.error("test") >> render "test" >> } >> } >> >> >> ERROR grails.app.controllers.com.sample.SampleCo

Fwd: Calling Ant target “collect” from Groovy

2016-09-22 Thread Paul King
Forwarding your question to the users list since it is about using Groovy. Cheers, Paul. -- Forwarded message -- From: ganna_bc Date: Thu, Sep 22, 2016 at 7:51 PM Subject: Calling Ant target “collect” from Groovy To: d...@groovy.incubator.apache.org I am

Fwd: Issue with XML Serialization

2016-08-18 Thread Paul King
-- Forwarded message -- From: GroovyBeginner Date: Thu, Aug 18, 2016 at 8:17 PM Subject: Issue with XML Serialization To: d...@groovy.incubator.apache.org Am facing the issue when serialising the node object. Here is my code but getting an error

Re: Issue with XML Serialization

2016-08-18 Thread Paul King
ent Groovy versions or are compiling with one version and running with another. Can you add the following line to your script and see what output you get? println getClass().classLoader.rootLoader.URLs Cheers, Paul. . On Thu, Aug 18, 2016 at 8:57 PM, Paul King <pa...@asert.

.with() variant that returns the original object

2016-11-08 Thread Paul King
Hi everyone, We are hoping to release 2.5 not too far down the track. We are working on a revamped release process that is going to dramatically improve our ability to release early/release often but also comply with some additional Apache requirements that we follow these days. But more on that

Re: .with() variant that returns the original object

2016-11-08 Thread Paul King
t was meanting. >> >> Not a big fan of auto, asThis, withThis or within. >> >> My preference clearly goes for tap! >> >> On Tue, Nov 8, 2016 at 3:34 PM, Paul King <pa...@asert.com.au> wrote: >>> >>> Hi everyone, >>> >>> W

Re: .with() variant that returns the original object

2016-11-08 Thread Paul King
Well we certainly could have as per Jochen's suggestion a DGM method roughly like: public static with(def self, boolean returnThis, Closure closure) { ... } and for backwards compatibility returnThis would default to false, i.e. with(closure) and identity(closure) are an alias for with(false,

Re: .with() variant that returns the original object

2016-11-09 Thread Paul King
On Thu, Nov 10, 2016 at 4:44 AM, Jochen Theodorou wrote: > ... And I just noticed Paul made the very same mistake in the original post > already. Ah yes, it should be return it or return "implicitThis" not return this. Cheers, Paul.

Re: .with() variant that returns the original object

2016-11-09 Thread Paul King
On Thu, Nov 10, 2016 at 12:02 AM, Cédric Champeau wrote: > I agree with what Jason said. I'm still up for `tap`. We could use > `with(true) { ... }`, but I also dislike "with(returnThis: true) {... }" > because it's not type safe. If we progress GROOVY-7956, we'd have

Re: .with() variant that returns the original object

2016-11-09 Thread Paul King
On Thu, Nov 10, 2016 at 6:47 AM, James Kleeh wrote: > What about something like object.build { } ? If you are solely using 'with' to build an object and 'with' by itself isn't good enough Groovy also has the @Builder annotation. Probably best we don't confuse normal 'with'

Re: .with() variant that returns the original object

2016-11-09 Thread Paul King
On Thu, Nov 10, 2016 at 6:45 AM, Jordan Martinez wrote: > What about `object.itselfWith(Closure)`? Then its understood as returning > the object itself but with the changes that follow. Both variants use 'itself' but only one returns 'itself', so I would regard that

Re: .with() variant that returns the original object

2016-11-09 Thread Paul King
Yes, there are no plans to break backwards compatibility, it's very handy to be able to do: def fullName = person.with{ "$firstName $lastName" } We wouldn't want code like that to break. Cheers, Paul. On Thu, Nov 10, 2016 at 7:02 AM, Winnebeck, Jason wrote: >

Re: Closure does not see field when setting value

2016-11-08 Thread Paul King
I think that is probably a bug - but with reads and writes. Change your declaration to "int x = 2" and see what you get? Cheers, Paul. On Tue, Nov 8, 2016 at 8:54 PM, Krzysztof Kowalczyk wrote: > Hi, > Today I was quite confused by behaviour of fields inside of

Re: Closure does not see field when setting value

2016-11-08 Thread Paul King
println x println binding.variables.x but not closures? Cheers, Paul. On Tue, Nov 8, 2016 at 10:04 PM, Jochen Theodorou <blackd...@gmx.org> wrote: > > > On 08.11.2016 12:19, Paul King wrote: >> >> I think that is probably a bug - but with reads and writes. > &

Re: ASTNode modifications does not reflect in the final class getting executed

2016-11-10 Thread Paul King
Does your transform extend ClassCodeExpressionTransformer (like NewifyASTTransformation)? Depending on how you have set things up, you might need to. Cheers, Paul. On Thu, Nov 10, 2016 at 9:46 AM, Gowtham Sridharan wrote: > Hi > Here is my usecase. I am running on

Re: .with() variant that returns the original object

2016-11-15 Thread Paul King
, Paul. On Thu, Nov 10, 2016 at 3:04 PM, Paul King <pa...@asert.com.au> wrote: > On Thu, Nov 10, 2016 at 6:45 AM, Jordan Martinez > <jordanalexmarti...@gmail.com> wrote: >> What about `object.itselfWith(Closure)`? Then its understood as returning >> the object itself bu

Re: [VOTE] new operator ?=

2016-11-23 Thread Paul King
For all our other operators of the form: a X= b it is shorthand for: a = a X b So, to follow that convention the operator is: a ?:= b which as per previous discussions is a bit cumbersome, so I am +1 for the shortened form so long as we document appropriately. Paul. On Thu, Nov 24, 2016

Sitepoint article on Groovy

2016-11-24 Thread Paul King
Sitepoint is featuring open source topics on their Java channel this week. Here's my #groovylang article: https://www.sitepoint.com/groovy-open-source-success-story/

Re: Using Groovy in Business Intelligence applications via dyna4JDBC driver

2016-11-16 Thread Paul King
I finally got around to giving this a try. I noticed some minor issues with the pom which require me to have some @GrabExclude statements that I would prefer not to need. I created an issue for your consideration. Anyway, it was fun to play with:

Congratulations to our newest committer Daniel Sun

2016-11-03 Thread Paul King
Congratulations to Daniel Sun who is now a Groovy committer: https://projects.apache.org/committee.html?groovy http://people.apache.org/phonebook.html?unix=groovy Daniel has been mostly working on the new Antlr 4 parser which will see some exciting steps forward for the Groovy compiler. Cheers,

Re: println slashy string

2016-12-07 Thread Paul King
That is the current expected behaviour. The grammar currently doesn't support slashy syrings straight after println unless you add the parentheses. I can't recall the rationale just now. Perhaps it's something we could look at in the Parrot parser - or an attempt to add it might make it clear what

[CVE-2016-6814] Apache Groovy Information Disclosure

2017-01-14 Thread Paul King
Severity: Important Vendor: The Apache Software Foundation Versions Affected: * Unsupported Codehaus versions of Groovy from 1.7.0 to 2.4.3 * Apache Groovy 2.4.4 to 2.4.7 * Fixed in version 2.4.8 Impact: Remote execution of untrusted code, DoS Description: When an application with Groovy on

[ANNOUNCE] Apache Groovy 2.4.8 released

2017-01-13 Thread Paul King
Dear community, The Apache Groovy team is pleased to announce version 2.4.8 of Apache Groovy. Apache Groovy is a multi-facet programming language for the JVM. Further details can be found at the http://groovy.apache.org website. This release is a maintenance release of the GROOVY_2_4_X branch.

Re: Problems with Groovy 2.4.8 and `final`.

2017-01-13 Thread Paul King
It's a known issue that was discovered too late to fix in 2.4.8: https://issues.apache.org/jira/browse/GROOVY-8048 It will be mentioned in the official release announce email when that gets sent out shortly. Just waiting on confirmation from Baruch about a particular detail before I send that

Maven coordinates going forward

2017-03-27 Thread Paul King
Hi, it's still a little while away but we'll soon begin the work on what will be called Groovy 3 or Groovy 4 - the exact version number is potentially up for further debate depending on how other upcoming Parrot back port work pans out but we are not asking for feedback on that right now. This

Re: why does this throw an exception? new to groovy, script works outside of class def

2017-03-28 Thread Paul King
Your dir.eachFile expression needs to be inside a method, constructor or initializer block. Given the rest of your code, I'd be inclined to add an init method and move the init code into that, e.g.: def init() { dir = new File(path) dir.eachFile ... } Then add a f.init() line

Re: Testing the Java 8 / Parrot parser online!

2017-03-27 Thread Paul King
Well, master is currently destined for Groovy 3 (or perhaps 4 - depending on how things pan out and how we finalise numbering) and it is ear-marked for JDK8+, so we could start making those changes soon. I was going to wait until I split off the GROOVY_2_6_X branch which I'll do after working out

Re: Groovy and JVM version [was Testing the Java 8 / Parrot parser online!]

2017-03-27 Thread Paul King
Russel, seems we were thinking about the same things. I responded to the earlier thread. Does that answer your question? In summary, we could start trying to move to indy only on master. I think stability wise we are in good shape. There are some question marks still however about indy performance

Re: [ANNOUNCE] Groovy 2.4.10 Windows Installer Released

2017-03-19 Thread Paul King
That was quick! Nice work! :-) On Mon, Mar 20, 2017 at 1:47 PM, Keegan Witt wrote: > The Windows installer for Groovy 2.4.10 is available from the usual place: > https://bintray.com/groovy/Distributions/download_file?file_path=groovy-2.4.10-installer.exe > > > -Keegan

Re: Compile error with 2.4.10

2017-03-22 Thread Paul King
The method that throws that error hasn't changed recently but it looks like another case that isn't handled correctly with final fields in a trait. I'll have to investigate further to be sure. Can you create a Jira issue? Workaround would be to remove the final for now. Cheers, Paul. On Wed,

Welcome John Wagenleitner to the Groovy PMC

2017-04-02 Thread Paul King
The Groovy PMC welcomes John Wagenleitner as its latest member. Many of you will already know John - he has been a very valuable member of the Groovy community for numerous years with many commits as well as an active contribution within the various mailing lists, the issue tracker and forums. He

Re: @ListenerList generated fireWhatever() method stops working

2017-03-08 Thread Paul King
Looks like a bug, I haven't checked the code yet but experimentally, no array argument (primitive or otherwise) seems to be supported. The workaround would be to create a holder event class of some kind that had an array property. Filing a bug issue in Jira would be much appreciated. Cheers,

Re: Maven coordinates going forward

2017-04-06 Thread Paul King
Thanks everyone for the feedback. I was mostly interested in feedback on the maven coordinates rather than package names, but it was good to get views on both. We have already started creating new classes using the org.apache package prefix rather than org.codehaus and I presume that we can

Re: One Language to Rule Them All ?

2017-07-21 Thread Paul King
Nice! On Sat, Jul 22, 2017 at 3:08 AM, Markus Giegl wrote: > Hi fellow Groovy developers & Groovy devs, > > someone asked me recently what in my eyes makes Groovy special, and what > my arguments for choosing Groovy over other JVM languages for an (existing) > project would

Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-22 Thread Paul King
I would be leaning towards -1 without further justification. Even though I don't think we want to rush into union types in Groovy, wouldn't this syntax rule out us having it down the track? Cheers, Paul. On Sun, Jul 23, 2017 at 8:28 AM, Daniel Sun wrote: > Hi all, > >

upcoming release(s)

2017-07-22 Thread Paul King
Hi everyone, We are planning to release 2.4.13, 2.5.0-beta-2 and the first alpha release of 2.6.0 and/or 3.0.0 over the coming weeks. We already have a bunch of fixes/features we are targeting for those releases but we are keen for any feedback. If there is a particular release you are waiting

Re: Named Parameters Support

2017-07-23 Thread Paul King
I too would be interested in thoughts from anyone who has used Ruby/Smalltalk a bit more extensively. But generally, there is certainly more that we could potentially do. We could do various kinds of mapping during compilation of Groovy source since we have the names at hand - there is the issue

Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-24 Thread Paul King
It's the kind of new feature (potentially wide impacting) that we have created Groovy Enhancement Proposals for in the past. Most recently we have just used well-fleshed out Jira issues with a GEP label. I'm +1 for exploring the idea further but -1 for trying to implement a small piece of the

[ANNOUNCE] Apache Groovy 2.4.11 released

2017-04-27 Thread Paul King
Dear community, The Apache Groovy team is pleased to announce version 2.4.11 of Apache Groovy. Apache Groovy is a multi-facet programming language for the JVM. Further details can be found at the http://groovy.apache.org website. This release is a maintenance release of the GROOVY_2_4_X branch.

Re: upcoming release(s)

2017-08-05 Thread Paul King
> <https://issues.apache.org/jira/browse/GROOVY-8157> fixed in this > release. > > Nextflow is currently reporting a bunch of errors caused by that issue. > See here > <http://ci.groovy-lang.org/project.html?projectId=JointBuilds_Nextflow=1> > . > > > Cheers, >

Re: Possible New Groovy Features...

2017-08-20 Thread Paul King
Hi Markus, Thanks for your suggestions. Some neat ideas in your suggestions! Just a general comment to start off with... With language design, it's often the details which are important, so I'd suggest rather than going straight from this email to a bunch of PRs, you'd create separate Jira

Bootstrapping Gradle when building from the source distro

2017-05-17 Thread Paul King
Hi all, TL;DR if you don't build from the zip source distro you can safely ignore this. Since we had users, including some of us developers :-), who were so used to typing 'gradle wrapper' when bootstrapping gradle, I applied oreissig's PR which removes the default task and updates the

Re: Groovy 2.5.0-beta-1 released

2017-06-08 Thread Paul King
And it's there now: http://groovy-lang.org/releasenotes/groovy-2.5.html We might make a nicer fleshed out version for some of those points before the final release - but at least it's there now. Cheers, Paul. On Fri, Jun 9, 2017 at 10:29 AM, Paul King <pa...@asert.com.au>

Re: Groovy 2.5.0-beta-1 released

2017-06-08 Thread Paul King
The normal practice is to mark the related Jira issue(s) with a 'breaking' label. We sometimes don't do that if the previous behavior was deemed a bug. In any case, I have marked both the relevant issues with the label now. I also updated the release notes to list those two issues under breaking

Re: JSR 308 support for Groovy

2017-06-12 Thread Paul King
Thanks Daniel, I created this additional sub-task: https://issues.apache.org/jira/browse/GROOVY-8228 JSR308 grammar changes If any parts turn out to be controversial or need further discussion we can create further issues. Cheers, Paul. On Tue, Jun 13, 2017 at 2:34 AM, Daniel Sun

[ANNOUNCE] Apache Groovy 2.4.12 released

2017-06-24 Thread Paul King
Dear community, The Apache Groovy team is pleased to announce version 2.4.12 of Apache Groovy. Apache Groovy is a multi-faceted programming language for the JVM. Further details can be found at the http://groovy.apache.org website. This release is a maintenance release of the GROOVY_2_4_X

Re: JSR 223 support behavior

2017-05-23 Thread Paul King
You can put things into the binding yourself if that helps: import org.codehaus.groovy.jsr223.* def engine = new GroovyScriptEngineFactory().scriptEngine engine.put('something', 10) engine.eval('println something') Cheers, Paul. On Tue, May 23, 2017 at 8:39 PM,

Re: [ANNOUNCE] Groovy 2.5.0-beta-1 Windows Installer Released

2017-06-06 Thread Paul King
That was quick. Nice work! On Wed, Jun 7, 2017 at 10:49 AM, Keegan Witt wrote: > The Windows installer for Groovy 2.5.0-beta-1 is available from the usual > place: https://bintray.com/groovy/Distributions/download_file? > file_path=groovy-2.5.0-beta-1-installer.exe. > >

Re: Eclipse-Installer can now provision a Groovy-Eclipse development environment

2017-05-31 Thread Paul King
Nice! On Thu, Jun 1, 2017 at 2:10 AM, Felix Dorner wrote: > Hey, > > In case anyone is interested in Groovy-Eclipse development, it's now quite > easy to setup a development environment and start hacking: Just download > the latest Eclipse-Installer and select

Re: Java 8 Date/Time API Extension Methods

2017-06-08 Thread Paul King
+1 from me, but I'd be keen to hear Joe's thoughts? Cheers, Paul. On Thu, Jun 8, 2017 at 10:37 PM, Dinko Srkoč wrote: > On 8 June 2017 at 13:34, Russel Winder wrote: > > On Thu, 2017-06-08 at 13:18 +0200, Dinko Srkoč wrote: > >> On 8 June 2017 at

Re: Sql parameter count verification causing exceptions

2017-06-15 Thread Paul King
exception still occurs because the driver is > returning fewer parameters in the count metadata than are actually present. > > > > Regards, > > Chad > > > > *From: *Paul King <pa...@asert.com.au> > *Reply-To: *"users@groovy.apache.org" <users@groovy.ap

JSR 308 support for Groovy

2017-06-12 Thread Paul King
I have started examining what is required for JSR 308 support in Groovy. It is one of those things which might make sense to ensure we support in the new grammar from the get go. Current issues: https://issues.apache.org/jira/browse/GROOVY-8225 https://issues.apache.org/jira/browse/GROOVY-8226

Re: Slashy strings in GroovyConsole

2017-06-14 Thread Paul King
What bo zhang said or use dollar slashy string. Cheers, Paul. On Wed, Jun 14, 2017 at 7:37 PM, bo zhang wrote: > def scriptDir = /C:\Folder1\My Documents\Folder2\Version\etc\// > > note the last slash. \/ is escaping / > > On Wed, Jun 14, 2017 at 4:44 PM, Dmytro

Re: Groovy Bug?

2017-05-02 Thread Paul King
Removing the @TypeChecked line will achieve what they want - should probably be raised as an error though. On Tue, May 2, 2017 at 9:50 PM, Guillaume Laforge wrote: > Hi, > > Someone sent me the following email, showing a problem, which triggers an > interesting error

Re: Groovy AOT compilation

2017-05-08 Thread Paul King
That line was added to break a hard-dependency on the groovy-xml module by the core groovy module. With Java 9's "real" modules, we'd potentially want to rework that. I haven't really thought about what we might do instead but welcome to suggestions/ideas/PRs. Cheers, Paul. On Tue, May 9, 2017

Re: [ANNOUNCE] Groovy 2.4.11 Windows Installer Released

2017-05-08 Thread Paul King
Thanks Keegan! On Tue, May 9, 2017 at 11:02 AM, Keegan Witt wrote: > The Windows installer for Groovy 2.4.11 is available from the usual place: > https://bintray.com/groovy/Distributions/download_ > file?file_path=groovy-2.4.11-installer.exe. > > -Keegan >

Re: Consider statically typed/compiled as default for Groovy 3.0

2017-10-13 Thread Paul King
I think most committers are also keen on making progress in the directions you describe. Not along the lines of watering down Groovy's dynamic capabilities but certainly in terms of making Groovy's static nature as hassle free as possible to use. Having said that, we have limited resources, so we

[ANNOUNCE] Apache Groovy 2.5.0-beta-2 released

2017-10-05 Thread Paul King
Dear community, The Apache Groovy team is pleased to announce version 2.5.0-beta-2 of Apache Groovy. Apache Groovy is a multi-facet programming language for the JVM. Further details can be found at the http://groovy.apache.org website. This is a pre-release of a new version of Groovy. We greatly

Re: GMavenPlus 1.6 Released

2017-09-11 Thread Paul King
Nice work! On Tue, Sep 12, 2017 at 2:06 PM, Keegan Witt wrote: > GMavenPlus 1.6 has been released to Sonatype OSS > and should appear > in Maven Central shortly. Besides the usual > minor

Re: Possible New Groovy Features... - var Keyword

2017-08-24 Thread Paul King
The same argument applies to this as to the 'the type of final fields from their assigned value' case. So, possible perhaps within @CompileStatic contexts. On Wed, Aug 23, 2017 at 8:52 AM, MG <mg...@arscreat.com> wrote: > Hi Paul, > > On 21.08.2017 04:30, Paul King wrote: > &g

Re: Possible New Groovy Features... - Auto final-ize

2017-08-24 Thread Paul King
Forgot the list the first time. On Thu, Aug 24, 2017 at 8:44 PM, Paul King <pa...@asert.com.au> wrote: > > > On Wed, Aug 23, 2017 at 8:32 AM, MG <mg...@arscreat.com> wrote: > >> Hi Paul, >> >> On 21.08.2017 04:30, Paul King wrote: >> >&

Re: Possible New Groovy Features... - Deduce the type of final fields from their assigned value

2017-08-24 Thread Paul King
result == 42 Cheers, Paul. On Wed, Aug 23, 2017 at 8:45 AM, MG <mg...@arscreat.com> wrote: > Hi Paul, > > On 21.08.2017 04:30, Paul King wrote: > > Deduce the type of final fields from their assigned value: > >> class Foo { >> final device = new PrinterDevice

Re: Possible New Groovy Features... - Auto final-ize

2017-08-27 Thread Paul King
On Sun, Aug 27, 2017 at 12:57 PM, MG <mg...@arscreat.com> wrote: > > On 25.08.2017 04:15, Paul King wrote: > > Actually, I think an @AutoFinal transform might be a good addition. I'm > happy to work on that with you if you like. > > Let's do it. > https://issues.apache.org/jira/browse/GROOVY-8300

Re: Possible New Groovy Features... - Auto final-ize

2017-08-24 Thread Paul King
; ? > Actually, I think an @AutoFinal transform might be a good addition. I'm happy to work on that with you if you like. Cheers, Paul. > Just kidding... > Ma;-)rkus > > > On 24.08.2017 14:08, Paul King wrote: > > Forgot the list the first time. > > On Thu, A

Re: @AutoFinal(enabled=false) ?

2017-10-08 Thread Paul King
My inclination would be that if you are going to have a disable option at the method/constructor level, then I'd also enable it at the class level. Imagine inheriting a large Groovy code base and you want to migrate it towards have auto finals. With a class level option you could enable it

Re: @AutoFinal(enabled=false) ?

2017-10-08 Thread Paul King
gument that generally does make sense. "Least surprise" with regard to > interfaces... ;-) > > KR, > Markus > > > > > On 09.10.2017 01:16, Paul King wrote: > > My inclination would be that if you are going to have a disable option at > the method/constructor level,

Re: [ANNOUNCE] Groovy 2.5.0-beta-2 and 2.6.0-alpha-1 Windows Installers Released

2017-10-09 Thread Paul King
Nice, thanks! On Mon, Oct 9, 2017 at 1:35 PM, Keegan Witt wrote: > The Windows installer for Groovy 2.5.0-beta-2 and 2.6.0-alpha-1 are > available from the usual places: > https://bintray.com/groovy/Distributions/download_file?file_ > path=groovy-2.5.0-beta-1-installer.exe

Re: [ANNOUNCE] Groovy 2.4.13 Windows Installer Released

2017-11-23 Thread Paul King
Thanks Keegan! And super fast again! :-) Cheers, Paul. On Thu, Nov 23, 2017 at 2:27 PM, Keegan Witt wrote: > The Windows installer for Groovy 2.4.13 is available from the usual place: > https://bintray.com/groovy/Distributions/download_file? >

Re: [ANNOUNCE] Groovy 3.0.0-alpha-1 Windows Installer Released

2017-12-19 Thread Paul King
You can use a SNAPSHOT version of Spock, e.g. 1.1-groovy-2.4-SNAPSHOT or 1.2-groovy-2.4-SNAPSHOT Cheers, Paul. On Wed, Dec 20, 2017 at 7:16 AM, Keegan Witt wrote: > The Windows installer for Groovy 3.0.0-alpha-1 is available from the > usual place: >

Re: NF build error

2017-11-16 Thread Paul King
Actually, I created GROOVY-8382 to cover some new cases and fix the bug you observed. On Thu, Nov 16, 2017 at 9:05 PM, Paul King <pa...@asert.com.au> wrote: > Incidentally, here is the reproducer I have been using: > > @groovy.transform.CompileStatic > class Foo { &g

Re: NF build error

2017-11-16 Thread Paul King
Feel free to create one. We can always close it if we end up fixing under another issue number. On Thu, Nov 16, 2017 at 6:51 PM, Paolo Di Tommaso wrote: > Let me know if you want I open an issue for this problem. > > > Cheers, > Paolo > > > On Wed, Nov 15, 2017 at

Re: NF build error

2017-11-16 Thread Paul King
, doesn't cover 1 and gives the ClassCastException for 3. Our test coverage obviously still needs further attention. :-( Cheers, Paul. On Thu, Nov 16, 2017 at 8:59 PM, Paul King <pa...@asert.com.au> wrote: > Feel free to create one. We can always close it if we end up fixing under > a

Re: [ANNOUNCE] Groovy 2.6.0-alpha-2 Windows Installer Released

2017-11-15 Thread Paul King
Great work - and in record time - even beating the official release out the door! :-) On Wed, Nov 15, 2017 at 8:50 PM, Guillaume Laforge wrote: > Thanks Keegan! > > On Wed, Nov 15, 2017 at 6:30 AM, Keegan Witt wrote: > >> The Windows installer for

Re: Use of SystemOutputInterceptor with different groovy versions

2017-11-09 Thread Paul King
I guess we regarded that class as somewhat internal when we made that change. You could use: myLogger = new SystemOutputInterceptor({ Object... args -> logOutput << args[-1]; logOutput.flush(); true }) Cheers, Paul. On Fri, Nov 10, 2017 at 4:15 AM, Merlin Beedell

Re: Is it possible to add GroovyObject methods via a category?

2017-12-11 Thread Paul King
3.0 is still some time away from being feature complete. On Mon, Dec 11, 2017 at 6:26 PM, Ruben Laguna wrote: > I see, thank you very much. > > I'll take a look at how to implement the methodMissing support since > I'm really interested on having this at some point in

Re: Groovy code with Function or Predicate

2017-12-11 Thread Paul King
that or: wait.until(application as Function) Cheers, Paul. On Mon, Dec 11, 2017 at 8:46 PM, Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > I posted this too soon. > > This line > > Function application = { wd -> > wd.findElement(By.name("q"))} > > removes

  1   2   >