[jira] [Created] (GROOVY-8502) Stricter checks required for AST transformations creating methods/constructors

2018-03-08 Thread Paul King (JIRA)
Paul King created GROOVY-8502:
-

 Summary: Stricter checks required for AST transformations creating 
methods/constructors
 Key: GROOVY-8502
 URL: https://issues.apache.org/jira/browse/GROOVY-8502
 Project: Groovy
  Issue Type: Task
Reporter: Paul King


AST transforms like TupleConstructor now have a more relaxed approach to 
checking for existing constructors - effectively ignoring @Generated ones. We 
should make sure that two identical ones aren't added and give a nicer message 
- rather than the error we currently get about duplicate signatures..



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (GROOVY-8501) Switch internal details of @ImmutableBase existing constructor validation

2018-03-08 Thread Paul King (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-8501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King resolved GROOVY-8501.
---
   Resolution: Fixed
 Assignee: Paul King
Fix Version/s: 2.5.0-rc-1

Proposed PR merged.

> Switch internal details of @ImmutableBase existing constructor validation
> -
>
> Key: GROOVY-8501
> URL: https://issues.apache.org/jira/browse/GROOVY-8501
> Project: Groovy
>  Issue Type: Task
>Reporter: Paul King
>Assignee: Paul King
>Priority: Major
> Fix For: 2.5.0-rc-1
>
>
> Currently @ImmutableBase validates that no existing constructors are present. 
> It requires @ImmutableBase to appear before @TupleConstructor and 
> @MapConstructor. It allows @Builder with the InitializerStrategy to have been 
> processed earlier and uses some node metadata tracking to allow this to 
> happen. If we change to instead checking for the @Generated annotation 
> instead of node metadata, these ordering restrictions can be relaxed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8501) Switch internal details of @ImmutableBase existing constructor validation

2018-03-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GROOVY-8501:


Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/673


> Switch internal details of @ImmutableBase existing constructor validation
> -
>
> Key: GROOVY-8501
> URL: https://issues.apache.org/jira/browse/GROOVY-8501
> Project: Groovy
>  Issue Type: Task
>Reporter: Paul King
>Priority: Major
>
> Currently @ImmutableBase validates that no existing constructors are present. 
> It requires @ImmutableBase to appear before @TupleConstructor and 
> @MapConstructor. It allows @Builder with the InitializerStrategy to have been 
> processed earlier and uses some node metadata tracking to allow this to 
> happen. If we change to instead checking for the @Generated annotation 
> instead of node metadata, these ordering restrictions can be relaxed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] groovy pull request #673: GROOVY-8501: Switch internal details of @Immutable...

2018-03-08 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/groovy/pull/673


---


[jira] [Updated] (GROOVY-8291) Bump XStream version to 1.4.10

2018-03-08 Thread Paul King (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-8291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King updated GROOVY-8291:
--
Issue Type: Dependency upgrade  (was: Task)

> Bump XStream version to 1.4.10
> --
>
> Key: GROOVY-8291
> URL: https://issues.apache.org/jira/browse/GROOVY-8291
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Paul King
>Assignee: Daniel Sun
>Priority: Minor
> Fix For: 3.0.0-alpha-1, 2.6.0-alpha-1, 2.5.0-beta-2, 2.4.13
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (GROOVY-8291) Bump XStream version to 1.4.10

2018-03-08 Thread Paul King (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-8291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King closed GROOVY-8291.
-
Resolution: Fixed

> Bump XStream version to 1.4.10
> --
>
> Key: GROOVY-8291
> URL: https://issues.apache.org/jira/browse/GROOVY-8291
> Project: Groovy
>  Issue Type: Dependency upgrade
>Reporter: Paul King
>Assignee: Daniel Sun
>Priority: Minor
> Fix For: 2.4.13, 2.5.0-beta-2, 2.6.0-alpha-1, 3.0.0-alpha-1
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (GROOVY-8291) Bump XStream version to 1.4.10

2018-03-08 Thread Paul King (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-8291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King reopened GROOVY-8291:
---

> Bump XStream version to 1.4.10
> --
>
> Key: GROOVY-8291
> URL: https://issues.apache.org/jira/browse/GROOVY-8291
> Project: Groovy
>  Issue Type: Task
>Reporter: Paul King
>Assignee: Daniel Sun
>Priority: Minor
> Fix For: 3.0.0-alpha-1, 2.6.0-alpha-1, 2.5.0-beta-2, 2.4.13
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (GROOVY-8473) Bump asm version to 6.1-beta2

2018-03-08 Thread Paul King (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-8473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King updated GROOVY-8473:
--
Fix Version/s: (was: 3.0.0-alpha-2)
   (was: 2.6.0-alpha-3)

> Bump asm version to 6.1-beta2
> -
>
> Key: GROOVY-8473
> URL: https://issues.apache.org/jira/browse/GROOVY-8473
> Project: Groovy
>  Issue Type: Improvement
>Reporter: Daniel Sun
>Assignee: Daniel Sun
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GROOVY-8501) Switch internal details of @ImmutableBase existing constructor validation

2018-03-08 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GROOVY-8501:


GitHub user paulk-asert opened a pull request:

https://github.com/apache/groovy/pull/673

GROOVY-8501: Switch internal details of @ImmutableBase existing const…

…ructor validation

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/paulk-asert/groovy groovy8501

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/673.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #673


commit 5fe29c30ba2b96badcf8bfb9a6f147b2f1f5114e
Author: paulk 
Date:   2018-03-08T13:25:24Z

GROOVY-8501: Switch internal details of @ImmutableBase existing constructor 
validation




> Switch internal details of @ImmutableBase existing constructor validation
> -
>
> Key: GROOVY-8501
> URL: https://issues.apache.org/jira/browse/GROOVY-8501
> Project: Groovy
>  Issue Type: Task
>Reporter: Paul King
>Priority: Major
>
> Currently @ImmutableBase validates that no existing constructors are present. 
> It requires @ImmutableBase to appear before @TupleConstructor and 
> @MapConstructor. It allows @Builder with the InitializerStrategy to have been 
> processed earlier and uses some node metadata tracking to allow this to 
> happen. If we change to instead checking for the @Generated annotation 
> instead of node metadata, these ordering restrictions can be relaxed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] groovy pull request #673: GROOVY-8501: Switch internal details of @Immutable...

2018-03-08 Thread paulk-asert
GitHub user paulk-asert opened a pull request:

https://github.com/apache/groovy/pull/673

GROOVY-8501: Switch internal details of @ImmutableBase existing const…

…ructor validation

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/paulk-asert/groovy groovy8501

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/673.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #673


commit 5fe29c30ba2b96badcf8bfb9a6f147b2f1f5114e
Author: paulk 
Date:   2018-03-08T13:25:24Z

GROOVY-8501: Switch internal details of @ImmutableBase existing constructor 
validation




---


[jira] [Resolved] (GROOVY-8493) Native lambdas with @CompileStatic at method level

2018-03-08 Thread Daniel Sun (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-8493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Sun resolved GROOVY-8493.

   Resolution: Fixed
Fix Version/s: 2.6.0-alpha-4
   3.0.0-alpha-2

Fixed by: 
https://github.com/apache/groovy/commit/3f41484e512a196149b9ec26e39958a436df56c4

> Native lambdas with @CompileStatic at method level
> --
>
> Key: GROOVY-8493
> URL: https://issues.apache.org/jira/browse/GROOVY-8493
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 2.6.0-alpha-3
>Reporter: Paul King
>Assignee: Daniel Sun
>Priority: Major
> Fix For: 3.0.0-alpha-2, 2.6.0-alpha-4
>
>
> This code:
> {code}
> import groovy.transform.CompileStatic
> import java.util.stream.Collectors
> @CompileStatic
> class Main {
> static void main(String[] args) {
> assert [2, 3, 4] == [1, 2, 3].stream().map(e -> e.plus 
> 1).collect(Collectors.toList())
> }
> }
> {code}
> works and produces a native lambda with the following bytecode within it's 
> {{doCall}} method:
> {code}
> INVOKESTATIC org/codehaus/groovy/runtime/dgmimpl/NumberNumberPlus.plus 
> (Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;
> {code}
> but moving the {{@compileStatic}} to the {{main}} method only, results in the 
> following error:
> {code}
> java.lang.NoSuchMethodError: 
> java.lang.Number.plus(Ljava/lang/Number;)Ljava/lang/Number;
> {code}
> and the following bytecode in the {{doCall}} method:
> {code}
> INVOKESTATIC java/lang/Number.plus (Ljava/lang/Number;)Ljava/lang/Number;
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)