[jira] [Updated] (GROOVY-9775) Rework gradle build to use modern conventions - doc remediation

2020-10-12 Thread Paul King (Jira)


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

Paul King updated GROOVY-9775:
--
Description: 
The various build scripts and associated artifacts have been written by 
numerous folks targeting numerous versions of Gradle over many years. The 
styles have drifted apart and some places use very old conventions/style. We 
should consolidate/update as needed.

*Cloned* to track some differences in doc generation results. We aren't 
necessarily attempting to get like for like if what was done previously can be 
improved.

(/) The groovy-jdk documentation is not populated FIXED
(/) The old allgroovydoc/alljavadoc contents included doc for classes from 
optional modules which wasn't correct and is now fixed. However, the doc zip 
should include such doc for all files like it previously did but no longer does.
(x) package.html file information isn't being produced

  was:
The various build scripts and associated artifacts have been written by 
numerous folks targeting numerous versions of Gradle over many years. The 
styles have drifted apart and some places use very old conventions/style. We 
should consolidate/update as needed.

*Cloned* to track some differences in doc generation results. We aren't 
necessarily attempting to get like for like if what was done previously can be 
improved.

(/) The groovy-jdk documentation is not populated FIXED
(/) The old allgroovydoc/alljavadoc contents included doc for classes from 
optional modules which wasn't correct and is now fixed. However, the doc zip 
should include such doc for all files like it previously did but no longer does.


> Rework gradle build to use modern conventions - doc remediation
> ---
>
> Key: GROOVY-9775
> URL: https://issues.apache.org/jira/browse/GROOVY-9775
> Project: Groovy
>  Issue Type: Task
>Reporter: Paul King
>Assignee: Cédric Champeau
>Priority: Major
> Fix For: 4.0.0-alpha-2
>
>
> The various build scripts and associated artifacts have been written by 
> numerous folks targeting numerous versions of Gradle over many years. The 
> styles have drifted apart and some places use very old conventions/style. We 
> should consolidate/update as needed.
> *Cloned* to track some differences in doc generation results. We aren't 
> necessarily attempting to get like for like if what was done previously can 
> be improved.
> (/) The groovy-jdk documentation is not populated FIXED
> (/) The old allgroovydoc/alljavadoc contents included doc for classes from 
> optional modules which wasn't correct and is now fixed. However, the doc zip 
> should include such doc for all files like it previously did but no longer 
> does.
> (x) package.html file information isn't being produced



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Eric Milles (Jira)


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

Eric Milles commented on GROOVY-9779:
-

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

> Inconsistency with callable properties in static context
> 
>
> Key: GROOVY-9779
> URL: https://issues.apache.org/jira/browse/GROOVY-9779
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.6
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:title=playground.groovy}
> class C {
> def call() {
> 42
> }
> }
> class Container {
> static final staticC   = new C()
> def  instanceC = new C()
> }
> assert Container.staticC() == 42 // works fine
> def container = new Container()
> assert container.staticC() == 42 // MissingMethodException
> assert container.instanceC() == 42 // MissingMethodException
> {code}
> I'd expect the invocations to fail or to work in both static and instance 
> contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [groovy] eric-milles opened a new pull request #1403: GROOVY-9779: before missing method, try "call" method of property value

2020-10-12 Thread GitBox


eric-milles opened a new pull request #1403:
URL: https://github.com/apache/groovy/pull/1403


   - this change expands upon the check for Script binding variable "call"
   
   https://issues.apache.org/jira/browse/GROOVY-9779



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [groovy] melix opened a new pull request #1402: Fix missing roles in POM files

2020-10-12 Thread GitBox


melix opened a new pull request #1402:
URL: https://github.com/apache/groovy/pull/1402


   This commit fixes the roles which were missing from the POM files.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Eric Milles (Jira)


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

Eric Milles commented on GROOVY-9779:
-

In general "()" is considered the "call" operator and can be used to invoke the 
call method of its receiver.  
https://docs.groovy-lang.org/latest/html/documentation/#Operator-Overloading

I don't see any roadblocks to making the instance case work like the class 
case.  But I have to run through some tests to be sure.

> Inconsistency with callable properties in static context
> 
>
> Key: GROOVY-9779
> URL: https://issues.apache.org/jira/browse/GROOVY-9779
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.6
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Major
>
> {code:title=playground.groovy}
> class C {
> def call() {
> 42
> }
> }
> class Container {
> static final staticC   = new C()
> def  instanceC = new C()
> }
> assert Container.staticC() == 42 // works fine
> def container = new Container()
> assert container.staticC() == 42 // MissingMethodException
> assert container.instanceC() == 42 // MissingMethodException
> {code}
> I'd expect the invocations to fail or to work in both static and instance 
> contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Daniil Ovchinnikov (Jira)


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

Daniil Ovchinnikov edited comment on GROOVY-9779 at 10/12/20, 2:44 PM:
---

In @CS it fails to compile in all 3 cases.

I'd actually expect the static case ({{Container.staticC()}}) to fail as well. 
There is a reason why Closure properties are callable, AFAIU in the early times 
it was common to define a property with Closure type instead of a method. If 
the instance case ({{container.instanceC()}}) will work, then what should 
happen here?
{code:groovy}
class Callable {
def call() {
42
}
} 

class C {
def call = new Callable()
}

class Container {
def c = new C()
}

def container = new Container()
container.c() // ?
// try container.c()
// then try container.c.call() as if it was written explicitly
// which in turn should try container.c.call.call() 
// which in turn should try container.c.call.call.call()
// ...
{code}


was (Author: daniilo):
In @CS it fails to compile in all 3 cases.

I'd actually expect the static case ({{Container.staticC()}}) to fail as well. 
There is a reason why properties are callable, AFAIU in the early times it was 
common to define a property with Closure type instead of a method. If the 
instance case ({{container.instanceC()}}) will work, then what should happen 
here?
{code:groovy}
class Callable {
def call() {
42
}
} 

class C {
def call = new Callable()
}

class Container {
def c = new C()
}

def container = new Container()
container.c() // ?
// try container.c()
// then try container.c.call() as if it was written explicitly
// which in turn should try container.c.call.call() 
// which in turn should try container.c.call.call.call()
// ...
{code}

> Inconsistency with callable properties in static context
> 
>
> Key: GROOVY-9779
> URL: https://issues.apache.org/jira/browse/GROOVY-9779
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.6
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Major
>
> {code:title=playground.groovy}
> class C {
> def call() {
> 42
> }
> }
> class Container {
> static final staticC   = new C()
> def  instanceC = new C()
> }
> assert Container.staticC() == 42 // works fine
> def container = new Container()
> assert container.staticC() == 42 // MissingMethodException
> assert container.instanceC() == 42 // MissingMethodException
> {code}
> I'd expect the invocations to fail or to work in both static and instance 
> contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Daniil Ovchinnikov (Jira)


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

Daniil Ovchinnikov commented on GROOVY-9779:


In @CS it fails to compile in all 3 cases.

I'd actually expect the static case ({{Container.staticC()}}) to fail as well. 
There is a reason why properties are callable, AFAIU in the early times it was 
common to define a property with Closure type instead of a method. If the 
instance case ({{container.instanceC()}}) will work, then what should happen 
here?
{code:groovy}
class Callable {
def call() {
42
}
} 

class C {
def call = new Callable()
}

class Container {
def c = new C()
}

def container = new Container()
container.c() // ?
// try container.c()
// then try container.c.call() as if it was written explicitly
// which in turn should try container.c.call.call() 
// which in turn should try container.c.call.call.call()
// ...
{code}

> Inconsistency with callable properties in static context
> 
>
> Key: GROOVY-9779
> URL: https://issues.apache.org/jira/browse/GROOVY-9779
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.6
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Major
>
> {code:title=playground.groovy}
> class C {
> def call() {
> 42
> }
> }
> class Container {
> static final staticC   = new C()
> def  instanceC = new C()
> }
> assert Container.staticC() == 42 // works fine
> def container = new Container()
> assert container.staticC() == 42 // MissingMethodException
> assert container.instanceC() == 42 // MissingMethodException
> {code}
> I'd expect the invocations to fail or to work in both static and instance 
> contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Eric Milles (Jira)


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

Eric Milles commented on GROOVY-9779:
-

I'm going to try out the "invokeStaticMissingMethod" logic for the instance 
case.  Also, what is the behavior for static compilation?

> Inconsistency with callable properties in static context
> 
>
> Key: GROOVY-9779
> URL: https://issues.apache.org/jira/browse/GROOVY-9779
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.6
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Major
>
> {code:title=playground.groovy}
> class C {
> def call() {
> 42
> }
> }
> class Container {
> static final staticC   = new C()
> def  instanceC = new C()
> }
> assert Container.staticC() == 42 // works fine
> def container = new Container()
> assert container.staticC() == 42 // MissingMethodException
> assert container.instanceC() == 42 // MissingMethodException
> {code}
> I'd expect the invocations to fail or to work in both static and instance 
> contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Daniil Ovchinnikov (Jira)


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

Daniil Ovchinnikov commented on GROOVY-9779:


Eric, so what the fix will be? Will invocations in both contexts fail or work?

> Inconsistency with callable properties in static context
> 
>
> Key: GROOVY-9779
> URL: https://issues.apache.org/jira/browse/GROOVY-9779
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.6
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Major
>
> {code:title=playground.groovy}
> class C {
> def call() {
> 42
> }
> }
> class Container {
> static final staticC   = new C()
> def  instanceC = new C()
> }
> assert Container.staticC() == 42 // works fine
> def container = new Container()
> assert container.staticC() == 42 // MissingMethodException
> assert container.instanceC() == 42 // MissingMethodException
> {code}
> I'd expect the invocations to fail or to work in both static and instance 
> contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Eric Milles (Jira)


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

Eric Milles reassigned GROOVY-9779:
---

Assignee: Eric Milles

> Inconsistency with callable properties in static context
> 
>
> Key: GROOVY-9779
> URL: https://issues.apache.org/jira/browse/GROOVY-9779
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.6
>Reporter: Daniil Ovchinnikov
>Assignee: Eric Milles
>Priority: Major
>
> {code:title=playground.groovy}
> class C {
> def call() {
> 42
> }
> }
> class Container {
> static final staticC   = new C()
> def  instanceC = new C()
> }
> assert Container.staticC() == 42 // works fine
> def container = new Container()
> assert container.staticC() == 42 // MissingMethodException
> assert container.instanceC() == 42 // MissingMethodException
> {code}
> I'd expect the invocations to fail or to work in both static and instance 
> contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Eric Milles (Jira)


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

Eric Milles commented on GROOVY-9779:
-

{{MetaClassImpl#invokeStaticMethod}} does this at the end:
{code:java}
if (prop != null) {
MetaClass propMC = registry.getMetaClass(prop.getClass());
return propMC.invokeMethod(prop, CLOSURE_CALL_METHOD, arguments);
}

return invokeStaticMissingMethod(sender, methodName, arguments);
}
{code}

This is where a non-closure property is tried as a callable.  {{invokeMethod}} 
ends with 
[{{invokePropertyOrMissing}}|https://github.com/apache/groovy/blob/master/src/main/java/groovy/lang/MetaClassImpl.java#L1315]
 which does not try the property as callable unless it is a closure or a script 
binding variable.

> Inconsistency with callable properties in static context
> 
>
> Key: GROOVY-9779
> URL: https://issues.apache.org/jira/browse/GROOVY-9779
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.6
>Reporter: Daniil Ovchinnikov
>Priority: Major
>
> {code:title=playground.groovy}
> class C {
> def call() {
> 42
> }
> }
> class Container {
> static final staticC   = new C()
> def  instanceC = new C()
> }
> assert Container.staticC() == 42 // works fine
> def container = new Container()
> assert container.staticC() == 42 // MissingMethodException
> assert container.instanceC() == 42 // MissingMethodException
> {code}
> I'd expect the invocations to fail or to work in both static and instance 
> contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (GROOVY-9775) Rework gradle build to use modern conventions - doc remediation

2020-10-12 Thread Paul King (Jira)


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

Paul King updated GROOVY-9775:
--
Description: 
The various build scripts and associated artifacts have been written by 
numerous folks targeting numerous versions of Gradle over many years. The 
styles have drifted apart and some places use very old conventions/style. We 
should consolidate/update as needed.

*Cloned* to track some differences in doc generation results. We aren't 
necessarily attempting to get like for like if what was done previously can be 
improved.

(/) The groovy-jdk documentation is not populated FIXED
(/) The old allgroovydoc/alljavadoc contents included doc for classes from 
optional modules which wasn't correct and is now fixed. However, the doc zip 
should include such doc for all files like it previously did but no longer does.

  was:
The various build scripts and associated artifacts have been written by 
numerous folks targeting numerous versions of Gradle over many years. The 
styles have drifted apart and some places use very old conventions/style. We 
should consolidate/update as needed.

*Cloned* to track some differences in doc generation results. We aren't 
necessarily attempting to get like for like if what was done previously can be 
improved.

(/) The groovy-jdk documentation is not populated FIXED
(x) The old allgroovydoc/alljavadoc contents included doc for classes from 
optional modules which wasn't correct and is now fixed. However, the doc zip 
should include such doc for all files like it previously did but no longer does.


> Rework gradle build to use modern conventions - doc remediation
> ---
>
> Key: GROOVY-9775
> URL: https://issues.apache.org/jira/browse/GROOVY-9775
> Project: Groovy
>  Issue Type: Task
>Reporter: Paul King
>Assignee: Cédric Champeau
>Priority: Major
> Fix For: 4.0.0-alpha-2
>
>
> The various build scripts and associated artifacts have been written by 
> numerous folks targeting numerous versions of Gradle over many years. The 
> styles have drifted apart and some places use very old conventions/style. We 
> should consolidate/update as needed.
> *Cloned* to track some differences in doc generation results. We aren't 
> necessarily attempting to get like for like if what was done previously can 
> be improved.
> (/) The groovy-jdk documentation is not populated FIXED
> (/) The old allgroovydoc/alljavadoc contents included doc for classes from 
> optional modules which wasn't correct and is now fixed. However, the doc zip 
> should include such doc for all files like it previously did but no longer 
> does.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [groovy] paulk-asert commented on pull request #1401: Fix distribution missing javadocs for optional modules

2020-10-12 Thread GitBox


paulk-asert commented on pull request #1401:
URL: https://github.com/apache/groovy/pull/1401#issuecomment-707115578


   Merged. Thanks!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [groovy] asfgit closed pull request #1401: Fix distribution missing javadocs for optional modules

2020-10-12 Thread GitBox


asfgit closed pull request #1401:
URL: https://github.com/apache/groovy/pull/1401


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Created] (GROOVY-9779) Inconsistency with callable properties in static context

2020-10-12 Thread Daniil Ovchinnikov (Jira)
Daniil Ovchinnikov created GROOVY-9779:
--

 Summary: Inconsistency with callable properties in static context
 Key: GROOVY-9779
 URL: https://issues.apache.org/jira/browse/GROOVY-9779
 Project: Groovy
  Issue Type: Bug
Affects Versions: 3.0.6
Reporter: Daniil Ovchinnikov


{code:title=playground.groovy}
class C {
def call() {
42
}
}

class Container {
static final staticC   = new C()
def  instanceC = new C()
}

assert Container.staticC() == 42 // works fine
def container = new Container()
assert container.staticC() == 42 // MissingMethodException
assert container.instanceC() == 42 // MissingMethodException
{code}

I'd expect the invocations to fail or to work in both static and instance 
contexts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [groovy] melix opened a new pull request #1401: Fix distribution missing javadocs for optional modules

2020-10-12 Thread GitBox


melix opened a new pull request #1401:
URL: https://github.com/apache/groovy/pull/1401


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Updated] (GROOVY-9775) Rework gradle build to use modern conventions - doc remediation

2020-10-12 Thread Paul King (Jira)


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

Paul King updated GROOVY-9775:
--
Description: 
The various build scripts and associated artifacts have been written by 
numerous folks targeting numerous versions of Gradle over many years. The 
styles have drifted apart and some places use very old conventions/style. We 
should consolidate/update as needed.

*Cloned* to track some differences in doc generation results. We aren't 
necessarily attempting to get like for like if what was done previously can be 
improved.

(/) The groovy-jdk documentation is not populated FIXED
(x) The old allgroovydoc/alljavadoc contents included doc for classes from 
optional modules which wasn't correct and is now fixed. However, the doc zip 
should include such doc for all files like it previously did but no longer does.

  was:
The various build scripts and associated artifacts have been written by 
numerous folks targeting numerous versions of Gradle over many years. The 
styles have drifted apart and some places use very old conventions/style. We 
should consolidate/update as needed.

*Cloned* to track some differences in doc generation results. We aren't 
necessarily attempting to get like for like if what was done previously can be 
improved.

* The groovy-jdk documentation is not populated
* The old allgroovydoc/alljavadoc contents included doc for classes from 
optional modules which wasn't correct and is now fixed. However, the doc zip 
should include such doc for all files like it previously did but no longer does.


> Rework gradle build to use modern conventions - doc remediation
> ---
>
> Key: GROOVY-9775
> URL: https://issues.apache.org/jira/browse/GROOVY-9775
> Project: Groovy
>  Issue Type: Task
>Reporter: Paul King
>Assignee: Cédric Champeau
>Priority: Major
> Fix For: 4.0.0-alpha-2
>
>
> The various build scripts and associated artifacts have been written by 
> numerous folks targeting numerous versions of Gradle over many years. The 
> styles have drifted apart and some places use very old conventions/style. We 
> should consolidate/update as needed.
> *Cloned* to track some differences in doc generation results. We aren't 
> necessarily attempting to get like for like if what was done previously can 
> be improved.
> (/) The groovy-jdk documentation is not populated FIXED
> (x) The old allgroovydoc/alljavadoc contents included doc for classes from 
> optional modules which wasn't correct and is now fixed. However, the doc zip 
> should include such doc for all files like it previously did but no longer 
> does.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)