RE: next releases

2020-07-02 Thread Milles, Eric (TR Technology)
Is it common to find calls to ClassNode#getTypeClass in Grails, GORM, etc.? Or is it happening at just a few locations? I ask because ClassNode#isResolved is not a proper guard for ClassNode#getTypeClass and they could be wrapping getTypeClass in try/catch. Even if Groovy provided a safer alt

RE: [PROPOSAL]Support conditional return

2020-07-28 Thread Milles, Eric (TR Technology)
If switch expression or pattern match macro is insufficient, could a macro be written to cover this "conditional return"? // "it" could easily be replaced by "_" or "$" as mentioned previously as options def doSomething(int a) { returnIf(callB(), a > 6 && it > 10) returnIf(callC(), a > 5 &&

RE: [PROPOSAL]Support conditional return

2020-07-30 Thread Milles, Eric (TR Technology)
> for (goo(); a>6 && it>10;) {return} Actually my first take on the macro implementation was to create a for statement because it provides a scope for a temp variable and supports a statement. Then I discovered that macro methods must return an expression... -Original Message- From: Jo

RE: [PROPOSAL]Support conditional return

2020-08-04 Thread Milles, Eric (TR Technology)
ber of methods that are being evaluated, without getting into the problematic area of whether/ how to support this syntax-wise. If there is nothing blocking this, the question is if Groovy should supply a basic version of such a macro (if Groovy is ever planning to supply macros of its own) ? Cheer

RE: StaticPropertyAccessHelper transforms are not routed through my expression transformer

2020-08-06 Thread Milles, Eric (TR Technology)
Your assessment appears correct. PropertyExpression works like this: public Expression transformExpression(ExpressionTransformer transformer) { PropertyExpression ret = new PropertyExpression(transformer.transform(objectExpression), transformer.transform(property), safe); PoppingMet

RE: switch destructuring

2020-08-07 Thread Milles, Eric (TR Technology)
e to do so would mean one would a) need to know the macro transform class exists and what its purpose and exact name is, b) how the disallowed list in CompilerConfiguration works (that's the easy part), as well as last but not least c) to be sure that doing so will not just break part or all of G

RE: switch destructuring

2020-08-10 Thread Milles, Eric (TR Technology)
es a gap between Java and Groovy. And I think Groovy should support Java syntax as best as possible. From: MG Sent: Friday, August 7, 2020 3:37 PM To: dev@groovy.apache.org; Milles, Eric (TR Technology) Subject: Re: switch destructuring Hi eric, just to make my post clear: I do not desperat

RE: CompareToNullExpression does not visitTransforms

2020-09-08 Thread Milles, Eric (TR Technology)
https://github.com/apache/groovy/pull/1361

RE: Dynamic class types

2020-10-19 Thread Milles, Eric (TR Technology)
You might run your transformation in (at least) 2 phases. In the first phase, you can mark or replace ClassNode instances that you expect to fill in as resolved or primary. ResolveVisitor checks isResolved() and isPrimaryClassNode() first. -Original Message- From: Saravanan Palanicham

RE: Closures in annotations

2020-11-16 Thread Milles, Eric (TR Technology)
Is there an instance in the core language/runtime where a closure literal is used as part of an annotation but not for an AST transformation? I'm not sure what the compiler does when it encounters a closure expression as the value for an annotation attribute (of type Class). But the AST transf

Alternatives to try/finally code structure

2020-11-21 Thread Milles, Eric (TR Technology)
Groovy Devs, I have been pondering how to automate the writing of try/finally blocks used to unconditionally restore object state. Does anyone know of a Groovier way to do something like this before I pursue a macro method, an AST transformation, or something more involved? It currently requi

RE: Alternatives to try/finally code structure

2020-11-21 Thread Milles, Eric (TR Technology)
quot;) } } def main() { new Foo().withCloseable { // baz() println("Hello!") } } main() Cheers, Leo On Sat, Nov 21, 2020 at 11:29 AM Milles, Eric (TR Technology) mailto:eric.mil...@thomsonreuters.com>> wrote: Groovy Devs, I have been pondering

RE: Alternatives to try/finally code structure

2020-11-22 Thread Milles, Eric (TR Technology)
Yes, snapshot and rollback. Here is a concrete example of the pattern: https://github.com/groovy/groovy-eclipse/blob/master/base/org.eclipse.jdt.groovy.core/src/org/eclipse/jdt/groovy/search/TypeInferencingVisitorWithRequestor.java#L430

RE: Alternatives to try/finally code structure

2020-11-22 Thread Milles, Eric (TR Technology)
I'm not understanding how inlining a closure expression could help reduce the burden of saving state to a temporary variable and then restoring it after execution, unless there was some additional AST processing. macro method take 2: class Foo { def bar() { push { field1 = value, field2 -

RE: Alternatives to try/finally code structure

2020-11-22 Thread Milles, Eric (TR Technology)
Or an alternative where the method creates an AutoCloseable instance that fits into a try-with-resources: class Foo { def bar() { try (push(field1 = value); push(field2)) { baz() } } } "push" would create something that has read/write access to "field1". Assignment "field1 =

RE: Alternatives to try/finally code structure

2020-11-22 Thread Milles, Eric (TR Technology)
> Now imagine that try-catch-finally wrapper method was an inlined closure, and > it inlines the closure it receives, then you get a solution to your problem > with very little overhead. This may be in alignment with what you are saying. If I had a method "auto(oldValue, newValue)" that creats

RE: Alternatives to try/finally code structure

2020-11-22 Thread Milles, Eric (TR Technology)
Or I could still call it "push" and it could look like this: try (field.push(value)) { ... } -- > Now imagine that try-catch-finally wrapper method was an inlined closure, and > it inlines the closure it receives, then you get a solution to your problem > with very little overhead. Thi

RE: Alternatives to try/finally code structure

2020-11-24 Thread Milles, Eric (TR Technology)
> since you seemed to say in the beginning that you did not want to create > objects (if I read this correctly), why creating AutoCloseable instances here > would not pose a problem ?) Best case scenario is that I get the same performance and memory footprint of the original code (included belo

RE: [VOTE] Release Apache Groovy 2.5.14

2020-11-30 Thread Milles, Eric (TR Technology)
+1 From: Paul King Sent: Sunday, November 29, 2020 11:55 PM To: Groovy_Developers Subject: [VOTE] Release Apache Groovy 2.5.14 Dear development community, I am happy to start the VOTE thread for a Groovy 2.5.14 release! This release includes 34 bug fixes/improvements as outlined in the chang

RE: [VOTE] Release Apache Groovy 3.0.7

2020-11-30 Thread Milles, Eric (TR Technology)
+1 From: Paul King Sent: Monday, November 30, 2020 1:00 AM To: Groovy_Developers Subject: [VOTE] Release Apache Groovy 3.0.7 Dear development community, I am happy to start the VOTE thread for a Groovy 3.0.7 release! This release includes 52 bug fixes/improvements as outlined in the changelo

Local variable declaration enhancements -- statement scoping

2020-12-02 Thread Milles, Eric (TR Technology)
Traditional "for" (first example) and ARM "try" (last example) support local variable declarations that are scoped to the statement. In light of the upcoming "instanceof" enhancement in Java, I was thinking about possible alternatives for declaring local variables that have statement scope. fo

RE: Local variable declaration enhancements -- statement scoping

2020-12-02 Thread Milles, Eric (TR Technology)
Maybe the "if" could forward declare the name(s) like this when not relying on Groovy truth: if (def x; (x = ...) != null) { } - if (def x = ...) { // tests Groovy truth in this form; may be wrapped in parens to check something else about "x" }

RE: Proposal: Change behavior of AST getMemberClassValue() and equivalents

2021-01-06 Thread Milles, Eric (TR Technology)
I think it is implemented this way because it must support an unresolved annotation. That is, you may have a transform that runs before ResolveVisitor fills in all the type information. The transform can only ask for what is present in the AST. If it wants to use the default values of any ann

RE: Ordering of AST transformations

2021-01-20 Thread Milles, Eric (TR Technology)
You can have a look at org.codehaus.groovy.transform.ASTTransformationVisitor, org.codehaus.groovy.transform.ASTTransformationCollectorCodeVisitor and ultimately org.codehaus.groovy.control.CompilationUnit. The compiler phase operation linked lists are what you are looking to order. Besides th

Groovy 3.0.8 release

2021-03-03 Thread Milles, Eric (TR Technology)
Should any of the JIRA issues listed below also be included in Groovy 3.0.8? I looked through JIRA for bug fixes in 4.0.0-alpha-2 and the upcoming 4.0.0-alpha-3 to see what could be fixed in Groovy 3.0.8 as well. Many fixes have been cherry picked already: https://github.com/apache/groovy/com

RE: [VOTE] Release Apache Groovy 4.0.0-alpha-3

2021-04-13 Thread Milles, Eric (TR Technology)
+1 From: Paul King Sent: Monday, April 12, 2021 9:57 PM To: Groovy_Developers Subject: [VOTE] Release Apache Groovy 4.0.0-alpha-3 Dear development community, I am happy to start the VOTE thread for a Groovy 4.0.0-alpha-3 release! This release includes 152 bug fixes/improvements as outlined in

RE: [VOTE] Release Apache Groovy 3.0.8

2021-04-16 Thread Milles, Eric (TR Technology)
+1 From: Paul King Sent: Friday, April 16, 2021 3:59 AM To: Groovy_Developers Subject: [VOTE] Release Apache Groovy 3.0.8 Dear development community, I am happy to start the VOTE thread for a Groovy 3.0.8 release! This release includes 92 bug fixes/improvements as outlined in the changelog:

RE: GDK retrofit for Java functional interfaces

2021-04-28 Thread Milles, Eric (TR Technology)
Is there any reason that these cannot exist side-by-side as extension methods? If they are safe to co-exist, then you can create each of the alternatives in turn within a sample project and try them out. The extension method mechanism is open and available. public static List collect

RE: GDK retrofit for Java functional interfaces

2021-04-28 Thread Milles, Eric (TR Technology)
g the GDK signature back to the more vanilla functional interface and interpreting a Closure as that interface when desired, as is already done for interop everywhere else. On Wed, Apr 28, 2021, 09:22 Milles, Eric (TR Technology) mailto:eric.mil...@thomsonreuters.com>> wrote: Is there any reason t

RE: GDK retrofit for Java functional interfaces

2021-04-28 Thread Milles, Eric (TR Technology)
ocess for doing this? I know how to open a ticket (heh), but can I just open a GitHub PR against apache/groovy? Looks like putting GROOVY-ABCD in the commit summary will auto-link it. On Wed, Apr 28, 2021 at 11:19 AM Milles, Eric (TR Technology) wrote: > > For any DGM that accepts Clo

RE: GDK retrofit for Java functional interfaces

2021-04-29 Thread Milles, Eric (TR Technology)
nal Message- From: Milles, Eric (TR Technology) Sent: Wednesday, April 28, 2021 12:07 PM To: dev@groovy.apache.org Subject: RE: GDK retrofit for Java functional interfaces It is best IMO to open a JIRA ticket first so that discussion and metadata can be tracked. Beyond that, opening a pull

RE: GDK retrofit for Java functional interfaces

2021-04-29 Thread Milles, Eric (TR Technology)
ng the API to take the interface and making the closure implement it requires handling that's already necessary for interop and is lightweight by default. On Thu, Apr 29, 2021, 09:33 Milles, Eric (TR Technology) mailto:eric.mil...@thomsonreuters.com>> wrote: Here are two alternat

RE: () call-type syntax for functional interfaces?

2021-04-29 Thread Milles, Eric (TR Technology)
Yes, this type of thing is possible. I think it would be limited to STC or SC since you would need to know the type of the receiver. org.codehaus.groovy.classgen.VariableScopeVisitor#visitMethodCallExpression is the bit of code that sees "var(...)" and replaces it with "var.call(...)". Maybe

RE: [DRAFT] Apache Groovy Board Report May 2021 (reporting on Feb/Mar/Apr)

2021-05-10 Thread Milles, Eric (TR Technology)
+1 From: Guillaume Laforge Sent: Monday, May 10, 2021 2:29 AM To: Groovy_Developers Cc: Paul King Subject: Re: [DRAFT] Apache Groovy Board Report May 2021 (reporting on Feb/Mar/Apr) +1 On Mon, May 10, 2021 at 9:08 AM Remko Popma mailto:remko.po...@gmail.com>> wrote: +1 On Mon, May 10, 2021

RE: [VOTE] Release Apache Groovy 4.0.0-beta-1

2021-05-21 Thread Milles, Eric (TR Technology)
I'm a little concerned with the recent ClassHelper changes that have impacted the meaning of "dynamic-typed" for fields, variables, parameters, etc. Previously "type == DYNAMIC_TYPE" was the test. For me this was true for "def x" and "public x" but false for "Object x". Now isDynamicTyped(Cla

RE: [EXT] [VOTE] Release Apache Groovy 2.5.15

2021-08-24 Thread Milles, Eric (TR Technology)
Two notes so far: 1) GROOVY-9966 was introduced to 2_5_X with this release. It is a pretty minor bug, but could be easily fixed if the release ends up being respun. 2) GROOVY-10159 was "fixed" in this release but it introduces a potentially more worrisome issue: public class Main { static f

RE: [EXT] [VOTE] Release Apache Groovy 2.5.15

2021-08-25 Thread Milles, Eric (TR Technology)
Subject: Re: [EXT] [VOTE] Release Apache Groovy 2.5.15 Comments below inline. Cheers, Paul. On Wed, Aug 25, 2021 at 3:53 AM Milles, Eric (TR Technology) mailto:eric.mil...@thomsonreuters.com>> wrote: Two notes so far: 1) GROOVY-9966 was introduced to 2_5_X with this release. It is a pretty

RE: [EXT] Re: [VOTE] Release Apache Groovy 2.5.15

2021-09-03 Thread Milles, Eric (TR Technology)
+1 (binding) From: Andres Almiray Sent: Friday, September 3, 2021 7:04 AM To: dev@groovy.apache.org Cc: Paul King Subject: [EXT] Re: [VOTE] Release Apache Groovy 2.5.15 External Email: Use caution with links and attachments. +1 (binding) Sent from my primitive tricorder On 3 Sep 2021, at 10:

RE: [EXT] Re: [VOTE] Release Apache Groovy 3.0.9

2021-09-03 Thread Milles, Eric (TR Technology)
+1 (binding) From: Guillaume Laforge Sent: Friday, September 3, 2021 3:16 AM To: Groovy_Developers Cc: Paul King Subject: [EXT] Re: [VOTE] Release Apache Groovy 3.0.9 External Email: Use caution with links and attachments. +1 (binding) Gradle build scan: https://gradle.com/s/25drhmojaaw7e

RE: [EXT] Re: [VOTE] Release Apache Groovy 4.0.0-beta-1

2021-09-04 Thread Milles, Eric (TR Technology)
+1 (binding) -Original Message- From: Daniel Sun Sent: Friday, September 3, 2021 10:03 PM To: dev@groovy.apache.org Subject: [EXT] Re: [VOTE] Release Apache Groovy 4.0.0-beta-1 External Email: Use caution with links and attachments. +1 (binding) Cheers, Daniel Sun On 2021/09/03 01:17

RE: [EXT] Re: [DISCUSS] Next Groovy 4 release should be RC-1

2021-09-17 Thread Milles, Eric (TR Technology)
If record grammar changes are indeed coming for Groovy 4, then I would vote for a beta 2. Release candidate for me would have only small bug fixes, no feature additions. From: Guillaume Laforge Sent: Wednesday, September 15, 2021 4:51 AM To: Groovy_Developers ; Paul King Subject: [EXT] Re: [D

RE: [EXT] Re: [DISCUSS] Some potential additional system properties/CompilerConfiguration flags for Groovy 4

2021-09-22 Thread Milles, Eric (TR Technology)
I am not in favor of more system properties to switch behavior all around. If sealed classes are of interest, then a Java 17 JVM is a reasonable requirement. I think this can be applied to records, switch expressions, etc. To keep it simple, require the minimum Java version that supports a fe

Groovy 4 and the new integrated query module

2021-09-27 Thread Milles, Eric (TR Technology)
Is there still time to reconsider the name of the new integrated query module (groovy-ginq) before Groovy 4 is released and the choice is locked in? I ask for a couple of reasons: 1) the "g" is redundant; groovy-ginq implies "groovy groovy integrated query". When gcontracts was

RE: [EXT] [VOTE] Release Apache Groovy 4.0.0-beta-2

2021-11-06 Thread Milles, Eric (TR Technology)
+1 binding Can the new methods in ClassNode be named getRecordComponents and setRecordComponents? The "Node" seems unnecessary and verbose. ClassNode doesn't offer getFieldNodes() or getFieldNode(String) and so on. The elevation of target bytecode does have implications for tooling. If you

RE: [EXT] [VOTE] Release Apache Groovy 4.0.0-beta-2

2021-11-09 Thread Milles, Eric (TR Technology)
e, further responses inline below. Cheers, Paul. On Sun, Nov 7, 2021 at 4:24 AM Milles, Eric (TR Technology) wrote: > > +1 binding > > Can the new methods in ClassNode be named getRecordComponents and > setRecordComponents? The "Node" seems unnecessary and v

RE: [EXT] Re: Record enhancements

2021-11-09 Thread Milles, Eric (TR Technology)
A couple questions regarding record types: record Person(String name, Date dob) { public Person { // ... } } 1) Was it by design to have Person(String) and Person() constructors created for the example above? I would prefer to see the canonical constructor and the map constructor only.

RE: [EXT] Re: A feature request: comparing LocalDate and LocalDateTime using built-in operators.

2021-11-17 Thread Milles, Eric (TR Technology)
Is there a path forward where the language runtime does not need to embed this handling, but the extension mechanisms in place can be used by your project so your users get the ease of comparison of these two types? As soon as Groovy takes on the assumption that it is okay to compare LocalDate

RE: [EXT] Re: A feature request: comparing LocalDate and LocalDateTime using built-in operators.

2021-11-17 Thread Milles, Eric (TR Technology)
now see no harm in supplying this functionality. Cheers, mg On 17/11/2021 17:26, Milles, Eric (TR Technology) wrote: Is there a path forward where the language runtime does not need to embed this handling, but the extension mechanisms in place can be used by your project so your users ge

RE: [EXT] [VOTE] Release Apache Groovy 4.0.0-rc-1

2021-11-27 Thread Milles, Eric (TR Technology)
+1 (binding) -Original Message- From: Paul King Sent: Friday, November 26, 2021 7:13 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 4.0.0-rc-1 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread

RE: [EXT] Re: [VOTE] Release Apache Groovy 4.0.0-rc-2

2021-12-24 Thread Milles, Eric (TR Technology)
+1 (binding) From: Andres Almiray Sent: Friday, December 24, 2021 3:43 AM To: dev@groovy.apache.org Cc: Paul King Subject: [EXT] Re: [VOTE] Release Apache Groovy 4.0.0-rc-2 External Email: Use caution with links and attachments. +1 (binding) Sent from my primitive tricorder On 24 Dec 2021, a

RE: [VOTE] Release Apache Groovy 4.0.0

2022-01-25 Thread Milles, Eric (TR Technology)
+1 -Original Message- From: Paul King Sent: Tuesday, January 25, 2022 5:49 AM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 4.0.0 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread for a Groovy 4

RE: [EXT] [VOTE] Release Apache Groovy 4.0.1

2022-03-02 Thread Milles, Eric (TR Technology)
Paul, groovy-4.0.1.jar!META-INF/services/org.codehaus.groovy.transform.ASTTransformation is empty. This stops the Grab global transform from running. -Original Message- From: Paul King Sent: Tuesday, March 1, 2022 11:33 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Gr

RE: [EXT] [VOTE] Release Apache Groovy 2.5.16 (real version)

2022-03-02 Thread Milles, Eric (TR Technology)
+1 -Original Message- From: Paul King Sent: Tuesday, March 1, 2022 10:41 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 2.5.16 (real version) External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread

RE: [EXT] [VOTE] Release Apache Groovy 3.0.10

2022-03-02 Thread Milles, Eric (TR Technology)
groovy-3.0.10-indy.jar!META-INF/services/org.codehaus.groovy.transform.ASTTransformation is empty. This stops the Grab global transform from running. -Original Message- From: Paul King Sent: Tuesday, March 1, 2022 10:42 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Gro

RE: [EXT] [VOTE] Release Apache Groovy 3.0.10 (take 2 after jarjar fix)

2022-03-03 Thread Milles, Eric (TR Technology)
+1 -Original Message- From: Paul King Sent: Thursday, March 3, 2022 4:19 AM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 3.0.10 (take 2 after jarjar fix) External Email: Use caution with links and attachments. Dear development community, I am happy to start the V

RE: [EXT] [VOTE] Release Apache Groovy 4.0.1 (take 2)

2022-03-03 Thread Milles, Eric (TR Technology)
+1 From: Paul King Sent: Thursday, March 3, 2022 8:18 AM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 4.0.1 (take 2) External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread for a Groovy 4.0.1 release! This

RE: [EXT] [VOTE] Release Apache Groovy 4.0.1 (take 3)

2022-03-05 Thread Milles, Eric (TR Technology)
+1 From: Paul King Sent: Saturday, March 5, 2022 5:30 AM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 4.0.1 (take 3) External Email: Use caution with links and attachments. I checked all files under META_INF/services this time. All looks okay. ===

RE: [EXT] Re: [VOTE] Release Apache Groovy 4.0.2

2022-04-19 Thread Milles, Eric (TR Technology)
+1 From: Andres Almiray Sent: Tuesday, April 19, 2022 1:45 PM To: dev@groovy.apache.org Cc: Paul King Subject: [EXT] Re: [VOTE] Release Apache Groovy 4.0.2 External Email: Use caution with links and attachments. +1 (binding) Sent from my primitive tricorder On 19 Apr 2022, at 10:36, Guillaum

RE: [EXT] Re: [DISCUSS] Groovy 5 planning

2022-05-11 Thread Milles, Eric (TR Technology)
Is there a compelling reason to drop support for Java 8? I don't see it holding us back quite like Java 7 support in Groovy 2.5 means no use of lambdas, optional, functional interfaces, etc. From: Paul King Sent: Wednesday, May 11, 2022 7:58 AM To: Groovy_Developers Subject: [EXT] Re: [DISCUS

RE: [EXT] [VOTE] Release Apache Groovy 4.0.3

2022-05-30 Thread Milles, Eric (TR Technology)
+1 -Original Message- From: Paul King Sent: Saturday, May 28, 2022 11:26 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 4.0.3 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread for a Groovy 4.0

RE: [EXT] [VOTE] Release Apache Groovy 3.0.11

2022-05-30 Thread Milles, Eric (TR Technology)
+1 -Original Message- From: Paul King Sent: Saturday, May 28, 2022 9:50 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 3.0.11 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread for a Groovy 3.0

RE: [EXT] [VOTE] Release Apache Groovy 2.5.17

2022-05-31 Thread Milles, Eric (TR Technology)
+1 -Original Message- From: Paul King Sent: Saturday, May 28, 2022 9:19 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 2.5.17 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread for a Groovy 2.5

RE: [EXT] Re: StackTrace sanitization list

2022-06-23 Thread Milles, Eric (TR Technology)
Groovy-Eclipse uses this list to "shade" (not remove) stack trace elements: com.sun groovy.lang groovyjarjarasm java.lang.reflect jdk.internal org.apache.groovy org.codehaus.groovy sun I add java.util.stream in my workspace for the internal iteration of collect, etc. Also lambdas tend to creat

RE: [EXT] Re: [DISCUSS] Groovy 5 planning

2022-07-05 Thread Milles, Eric (TR Technology)
I was interested in native interface default/private/static methods (GROOVY-8299, GROOVY-9801, GROOVY-1) for Groovy 5. There was discussion on what was needed for this at one point. Does anyone remember if Java 8 was holding us back in this area? https://issues.apache.org/jira/browse/GROO

Re: [DISCUSS] Renumber Groovy 2.6 to 2.9

2018-05-23 Thread Milles, Eric (TR Technology & Ops)
I'm not sure if this has been stated as I have not had a chance to read this thread in the last couple days, but here's my 2 cents: I would stick with 2.6 as it has already been setup for builds, discussed in conferences and can be seen on the groovy-lang downloads page w/ release notes. I fi

Groovy Web Console - Groovy version

2018-06-01 Thread Milles, Eric (TR Technology & Ops)
In trying out some Groovy 2.5 examples, I noticed that the Groovy Web Console at https://groovyconsole.appspot.com/ is running Groovy 2.4.4 (confirmed by 'GroovySystem.version' property). Could this deployment be updated to Groovy 2.5.0? Is there a way to indicate and possibly select other Gro

NamedVariant on constructor

2018-06-01 Thread Milles, Eric (TR Technology & Ops)
Tried this example and got cast exception converting Map to Integer. Should the print statement at the end use the generated map constructor as expected? (Note: I am compiling with indy variant; tried to use web console to try vanilla MOP...) import groovy.transform.* import groovy.transfor

Re: [DISCUSS] trait behavior with instance and static methods of otherwise same signature

2018-08-03 Thread Milles, Eric (TR Technology & Ops)
Shouldn't an instance method always win out over a static method? I too would always expect a compile error for attempting to override static with instance method or vice-versa. What would/should happen if trait adds method in future that is in conflict with legal compiled state of implementi

Re: suggestion: ImplicitSafeNavigation annotation

2018-08-15 Thread Milles, Eric (TR Technology & Ops)
Does your requested change amount to setting the "isSafe" condition on all PropertyExpression instances in a block? That is the AST equivalent of adding the '?' to each '.' From: ocs@ocs Sent: Wednesday, August 15, 2018 7:55 AM To: h...@abula.org Cc: dev@groovy

Re: Updates on JaCoCo support

2018-08-15 Thread Milles, Eric (TR Technology & Ops)
Andreas, One place to start is everywhere that "AnnotatedNode.setSynthetic(true)" is currently called. I think this misses the methods added for a property. But it does cover several AST transforms. And maybe the transforms that add methods and don't call this method could do so in addition

Re: Updates on JaCoCo support

2018-08-15 Thread Milles, Eric (TR Technology & Ops)
Actually, Verifier.visitProperty(PropertyNode) does call setSynthetic(true). From: Milles, Eric (TR Technology & Ops) Sent: Wednesday, August 15, 2018 3:43 PM To: dev@groovy.apache.org Subject: Re: Updates on JaCoCo support Andreas, One place to star

Re: Updates on JaCoCo support

2018-08-15 Thread Milles, Eric (TR Technology & Ops)
Aug 2018, at 22:43, Milles, Eric (TR Technology & Ops) mailto:eric.mil...@thomsonreuters.com>> wrote: Andreas, One place to start is everywhere that "AnnotatedNode.setSynthetic(true)" is currently called. I think this misses the methods added for a property. But it do

Re: Inconsistent overriding of Interger methods

2018-08-20 Thread Milles, Eric (TR Technology & Ops)
You may want to disable the int optimization (on by default; off for indy). I think then primitives would get converted to wrappers and MOP would be available consistently. From: mg Sent: Monday, August 20, 2018 7:17 AM To: dev@groovy.apache.org Subject: Re: I

Re: Constructor call short-hand syntax

2018-09-07 Thread Milles, Eric (TR Technology & Ops)
I checked a couple quick examples and the AST represents these as CastExpressions, not ConstructorCallExpressions. That may help shed some light on the case for @Newify which inserts actual CCEs into the AST. date = Date[year: 1990] // cast date = (Date) [year: 1990] // cast date = [year: 1990

Help with traits compilation

2018-09-14 Thread Milles, Eric (TR Technology & Ops)
Groovy devs, I am looking into these issues: https://github.com/groovy/groovy-eclipse/issues/714 https://github.com/grails/grails-testing-support/issues/31 When grails.testing.services.ServiceUnitTest is compiled, it produces the following class files in the build directory: - ServiceUnitTest.

DGM for first or default

2018-10-18 Thread Milles, Eric (TR Technology & Ops)
I see there are the following DGMs for getting first element of a "collection": static T first(T[] self) static T first(List self) static T first(Iterable self) Is there a simple sequence for getting the first element or a default value if the "collection" is empty? If not, may I pr

Re: DGM for first or default

2018-10-18 Thread Milles, Eric (TR Technology & Ops)
"list?.first() ?: defaultValue" is not the equivalent. If the collection is empty, first() throws an IndexOutOfBoundsException is thrown. That's why I'm asking if there is a simple equivalent. I suppose this is the equivalent now that I think about it: list ? list.first() : defaultValue _

Re: DGM for first or default

2018-10-18 Thread Milles, Eric (TR Technology & Ops)
y other small idioms like this that anyone has added as a template to improve the editing experience? ____________ From: Milles, Eric (TR Technology & Ops) Sent: Thursday, October 18, 2018 12:19:42 PM To: dev@groovy.apache.org Subject: Re: DGM for first or default &qu

Re: DGM for first or default

2018-10-18 Thread Milles, Eric (TR Technology & Ops)
first is smart enough to return null for an empty list, same as my firstObject in Cocoa does. If it throws, what's on earth point of having the thing at all? In that case it can be replaced by list[0] without any drawback at all. All the best, OC On 18 Oct 2018, at 7:19 PM, Milles, Eri

Re: DGM for first or default

2018-10-19 Thread Milles, Eric (TR Technology & Ops)
18, 2018 1:20 PM To: dev@groovy.apache.org<mailto:dev@groovy.apache.org> Subject: Re: DGM for first or default Well I thought first is smart enough to return null for an empty list, same as my firstObject in Cocoa does. If it throws, what's on earth point of having the thing at all? I

RE: [EXT] [VOTE] Release Apache Groovy 2.5.18

2022-07-20 Thread Milles, Eric (TR Technology) via dev
+1 (binding) -Original Message- From: Paul King Sent: Tuesday, July 19, 2022 8:33 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 2.5.18 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread for a

RE: [EXT] [VOTE] Release Apache Groovy 3.0.12

2022-07-20 Thread Milles, Eric (TR Technology) via dev
+1 (binding) -Original Message- From: Paul King Sent: Tuesday, July 19, 2022 9:08 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 3.0.12 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread for a

RE: [EXT] [VOTE] Release Apache Groovy 4.0.4

2022-07-20 Thread Milles, Eric (TR Technology) via dev
+1 (binding) -Original Message- From: Paul King Sent: Wednesday, July 20, 2022 1:40 AM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 4.0.4 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread for a

RE: [EXT] [VOTE] Release Apache Groovy 4.0.5

2022-09-06 Thread Milles, Eric (TR Technology) via dev
+1 (binding)

RE: [EXT] Re: Groovy 4 parser bug?

2022-09-08 Thread Milles, Eric (TR Technology) via dev
Best to open a new Jira ticket for this. There were a number of scenarios that had to be handled for safe-indexing versus ternary expression. Looks like there are still some out there. Here is one example: https://issues.apache.org/jira/browse/GROOVY-9561 https://issues.apache.org/jira/projec

RE: [EXT] [VOTE] Release Apache Groovy 3.0.13

2022-09-15 Thread Milles, Eric (TR Technology) via dev
+1 (binding)

RE: [EXT] indexing inconsistecy: bug or intentional?

2022-09-19 Thread Milles, Eric (TR Technology) via dev
This has been reported under a few different guises. There are some other tickets for ranges and negative indexes. https://issues.apache.org/jira/browse/GROOVY-6193 https://issues.apache.org/jira/browse/GROOVY-4652 https://issues.apache.org/jira/browse/GROOVY-1740 https://issues.apache.org/jira/b

RE: [EXT] GRECLIPSE: ASTT processing through later compile phases

2022-09-21 Thread Milles, Eric (TR Technology) via dev
I think these are the relevant cites (below). Long story short, due to the potential for circular dependencies, the Groovy is processed minimally to be able to generate “stub” information that the Java compiler can use to make links. I have run some experiments where there is more stages of co

RE: [EXT] Re: [DISCUSS] Groovy 5 planning

2022-10-13 Thread Milles, Eric (TR Technology) via dev
ort such a change onto a newly created 5_0_X branch. Thoughts? Cheers, Paul. On Wed, Jul 6, 2022 at 1:44 AM Remi Forax wrote: > > - Original Message - > > From: "Milles, Eric (TR Technology)" > > > > To: "dev" > > Sent: Tuesday,

RE: [EXT] [VOTE] Release Apache Groovy 2.5.19

2022-10-13 Thread Milles, Eric (TR Technology) via dev
+1 (binding) -Original Message- From: Paul King Sent: Wednesday, October 12, 2022 10:59 PM To: Groovy_Developers Subject: [EXT] [VOTE] Release Apache Groovy 2.5.19 External Email: Use caution with links and attachments. Dear development community, I am happy to start the VOTE thread

RE: [EXT] Re: [VOTE] Release Apache Groovy 4.0.6

2022-10-14 Thread Milles, Eric (TR Technology) via dev
+1 (binding) From: Guillaume Laforge Sent: Friday, October 14, 2022 1:23 AM To: dev@groovy.apache.org Subject: [EXT] Re: [VOTE] Release Apache Groovy 4.0.6 External Email: Use caution with links and attachments. +1 (binding) On Thu, Oct 13, 2022 at 8:46 PM Andres Almiray mailto:aalmi...@gmail

RE: [EXT] Re: Disabling auto inferencing

2022-12-05 Thread Milles, Eric (TR Technology) via dev
GROOVY-9064 [1] has further discussion on this topic. It is also the cause for GROOVY-10120 [2] for us. The interface type carries proper generics info but the override method on the implementation class has none (for some odd reason). [1] https://issues.apache.org/jira/browse/GROOVY-9064 [2]

RE: [EXT] Possible additional DGM collectEntries variants

2022-12-19 Thread Milles, Eric (TR Technology) via dev
True, no direct equivalents for associateBy and associateWithValue. But "collectEntries{ [it.toLowerCase(), it] }" is pretty succinct. If you wanted to extend with just one new extension of collectEntries, I think ".collectEntries(keyFun, Function.identity())" and ".collectEntries(Function.ide

RE: [EXT] Re: [VOTE] Release Apache Groovy 2.5.20

2022-12-22 Thread Milles, Eric (TR Technology) via dev
+1 (binding)

RE: [EXT] Re: [VOTE] Release Apache Groovy 3.0.14

2022-12-22 Thread Milles, Eric (TR Technology) via dev
+1 (binding)

RE: [EXT] Re: [VOTE] Release Apache Groovy 4.0.7

2022-12-22 Thread Milles, Eric (TR Technology) via dev
+1 (binding)

RE: [EXT] Re: Request for 4.0.8

2023-01-03 Thread Milles, Eric (TR Technology) via dev
You have the option of rolling back to 4.0.6 if 4.0.7 is a blocker. And in the specific case of GROOVY-10890, you can provide type arguments instead of using diamond constructor. I would like to get some more burn in time for 4.0.7 -- there are lots of users on holiday break in December. Migh

RE: [EXT] Next releases

2023-01-12 Thread Milles, Eric (TR Technology) via dev
I had a developer comment that Java 19 required an update from Groovy 3 to Groovy 4 (due to ASM). Where are we with regards to ASM versions for Groovy 2.5, 3.0, 4.0 and 5.0?

RE: [EXT] Next releases

2023-01-13 Thread Milles, Eric (TR Technology) via dev
> quite a lot of changes are required to support Java 16+ Yes, for proper proxy and default method support there are a lot of changes. Not asking for a backport on that stuff. ASM 9.4 is required to parse the class files created by Java 19 target. FYI, I updated ASM from 9.3 to 9.4 for Groov

RE: [EXT] [VOTE] Release Apache Groovy 4.0.8

2023-01-19 Thread Milles, Eric (TR Technology) via dev
+1 (binding)

  1   2   3   >