Before Groovy 2.6 and 3.0 are released, will there be a review of the syntax
additions for inclusion in the final release? I get "!in" and "!instanceof".
However, I'm am getting the feeling of "Kitchen Sink" or "just because we can"
on recent additions to the parser. I'm not seeing any of the
For sure , "this" and "super" are supported within a closure defined in a
static context. Are you saying they also work directly in a static method?
Given "class A { static main(args} { this } }", this should be of type
"Class" if it is indeed supported. It follows that it would work, since y
You should be able to call `name` or `canonicalName` or `sinpleName` directly
if there are no static methods in the class or its supers that would take
precedence.
```
class LongClassName {
private static Logger log = Logger.getLogger(name)
private static Logger log = Logger.getLogger(this)
And https://issues.apache.org/jira/browse/GROOVY-8289 is causing us a lot of
pain in the debugger and appears to have a simple solution.
Quick correction: `name` or `canonicalName` or `simpleName` cannot be used
directly in static scopes. You will get "Groovy:Apparent variable
'canonicalName' was found in a static scope but doesn't refer to a local
variable, static field or class."
However, you can use `getName()` or `getCanoni
Are we really ready to have 3 unfinished versions making their way through
alpha/beta? I haven't even had time to look into 2.6 yet.
Could someone help me understand the rules for DGMs when multiple methods
apply? I can't seem to find anything in the specification that addresses this
and I need to emulate (or call into) the rules for Eclipse. I also tried
walking through MetaClassImpl and MetaMethodIndex, but I got lost in
I think "this" or "getThisObject()" should really be "delegate" or
"getDelegate()".
From: Leonard Brünings [mailto:groovy-...@bruenings-it.net]
Sent: Monday, November 20, 2017 2:27 PM
To: dev@groovy.apache.org
Subject: Get reference to enclosing closure
Hi,
I'm Leonard from the Spock framework
When you rewrite to this form:
with(list) {
SpockRuntime.verifyMethodCondition(this.getThisObject(), "contains", [1])
}
You've esentially frozen your choice of delegate, owner or this. The dynamic
resolution of "implicit this" to one of those is no longer going to happen. I
guess you'd ne
If this snippet, "this" will always refer to the enclosing class, never the
delegate "list" or the owner (which may be the enclosing closure or "this" if
no enclosing closure). That is, the choice of "this" has already frozen where
"contains" can come from.
with(list) {
SpockRuntime.verify
Shouldn't it be different for each groovy-xxx.jar? What should it be for
groovy-all.jar, which contains the stuff of many modules? What about the indy
jars? Do they have a separate module name or a shared name with their non-indy
counterparts?
Has anyone noticed that there are 40+ pending changes waiting to build in
TeamCity (Groovy 2.5) and no builds have run for several days? Same goes for
2.4, 2.6, 3.0.
Eric Milles
Lead Software Engineer
Thomson Reuters
Email: eric.mil...@thomsonreuters.com
Phone: 651-848-7040
The build server mentions insufficient disk space. Could someone have a look?
From: Milles, Eric (TR Technology & Ops)
Sent: Monday, December 11, 2017 10:40 AM
To: dev@groovy.apache.org
Subject: CI builds for Groovy
Has anyone noticed that there are 40+ pending changes waiting to build in
TeamC
The JDK 8 builds are still not running because the agent is listed as
disconnected.
So is it still possible to produce the groovy-all.jar and
groovy-all-sources.jar from the SDK zip?
"The "all" sources is still produced. But there's no all jar anymore."
Is there a way to get back to being able to produce an all jar? I actually
leverage the embeddable jar for embedding in another OSGi bundle. I was
humming along with adding Groovy 2.5 support through beta2 and now it seems
Isn't the trend to use CharSequence instead of String? If it's startsWith,
shouldn't the signature be startsWith(String one, String two, String... more)
to avoid zero params and conflict with 1 param built-in method?
Couldn't this be just as easily expressed using the any DGM?
['prefix1', 'pre
Now that Java 8 is the minimum required runtime, could some default methods be
added to interfaces such as org.codehaus.groovy.ast.expr.MethodCall or
org.codehaus.groovy.ast.Variable. For example, predicate checks like
isStatic(), et al. could be implemented in terms of getModifiers(), would
p
Daniel,
Could you please wait? Each time Paul has announced 2.4 and 2.5 releases
forthcoming, you announce 2.6 and 3.0 minutes later. Then you end up forcing
out 2.6 and 3.0 before 2.4 and 2.5. This strains the intake pipelines of
downstream projects like IDE support, etc.
-Original Mess
You can add all the imports you want to your compiler configuration and they
will be consistently available for all scripts.
From: David Ekholm [mailto:da...@jalbum.net]
Sent: Thursday, February 08, 2018 2:12 PM
To: dev@groovy.apache.org
Subject: Remembering imports between script invocations
We
Sounds more like the Groovy Shell or Groovy Console. Not too sure myself how
the javax.script stuff is tied in.
From: David Ekholm [mailto:da...@jalbum.net]
Sent: Thursday, February 08, 2018 2:47 PM
To: dev@groovy.apache.org
Subject: Re: Remembering imports between script invocations
How do I d
A couple notes on Groovy 2.5b3:
1) The groovy-2.5.0-beta-3-sources.jar on Maven Central has a lot of duplicate
source entries; at least under the groovy packages.
2) I'm having a little trouble with the new PropertyHandler stuff that supports
@Immutable. The error "The propertyHandler class
'
GROOVY-5306 (https://issues.apache.org/jira/browse/GROOVY-5306) states:
Add "a ?= 2" support: should be expanded to "a = a == null ? 2 : a"
Shouldn't the expansion be "a = (a != null ? a : 2)"? Like other ternary
situations, the alternative would not be evaluated unless needed. Also, is it
a
I just gave the Parrot Parser a quick try out for Groovy 2.6 / Eclipse 4.8.
One thing I'm noticing right away is that the parser sets the line and column
information of AST nodes, but leaves position properties start, end, nameStart
and nameEnd unset. Is there a way to request these properties
Sorry, yes Eclipse adds those. I wasn't aware the patching began at such a low
level. It would be nice to have the option of getting an offset instead of
line,column. But I can't see an easy path to that.
-Original Message-
From: Daniel Sun [mailto:realblue...@hotmail.com]
Sent: Mond
Java syntax for a default method value is:
public @interface Delegate {
boolean interfaces() default true;
Is there really a need to introduce another form when the saving is actially 0
characters (colon and equals vs open and close brace)?
class Foo {
fun truth(): Integer = 42
}
vs.
I think you could experiment with this using a closure, since return statements
have this expression property already:
final foo = ({ ->
if(...) { ... }
else if(...) { ... }
else if(...) { ... }
else { ... }
}())
From: mg [mailto:mg...@arscreat.com]
Sent: Wednesday, March 21, 2018 4:03
I agree; I don't see the value here. Could the backwards compat problem be
solved with compiler configuration (aka a global transform)?
I have heard from many developers that import aliasing is a feature they don't
particularly like. Adding an odd edge case to this feature seems confusing at
>> [...]I have submitted over 20 bugs in
>> the past months for existing features that do not mix well with
>> eachother or are not completely implemented and yet I feel the core
>> development thrust is not in fixing bugs for existing features but in
>> adding new features for the sake of new f
Yes, the statements I made are a bit exaggerated. That was to bring out a
little more discussion on balance of maintenance vs enhancement.
In my case, I am suggesting fixes because I have groovy-eclipse setup and this
gives me a chance to make some small patches to groovy-core and see if they f
Is it possible to determine the available Category (aka DGM) extension classes
at runtime? I have been relying on DefaultGroovyMethods.DGM_LIKE_CLASSES, but
this has been getting reduced with each release due to modularization. And it
was never really a good source to begin with. I tried look
What API can I call to get a list of modules? I'm having trouble determining
the actual entry point.
-Original Message-
From: Jochen Theodorou [mailto:blackd...@gmx.org]
Sent: Friday, April 06, 2018 1:36 PM
To: dev@groovy.apache.org
Subject: Re: Determining the registered DGM classes at
Thanks for the tip. Looking through
StaticTypeCheckingSupport.EXTENSION_METHOD_CACHE.getExtensionMethods(ClassLoader)
I was able to see that ExtensionModuleScanner is what I was looking for. Here
is my end result for discovering the configured DGM classes:
public static class XYGroovyCla
I know it is part of the Java spec, but do you know anyone that actuallky does
that? I'm just curious as I've never once seen a need for it.
Array creation is the one item that comes up most often for me when converting
a source file from Java to Groovy.
34 matches
Mail list logo