You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2019/05/10 16:11:24 UTC

2.5.7 regression with references?

Hi guys,

using anonymous classes with 2.5.7 does not handle references properly
compared to 2.5.6:

error I get:

static java.nio.file.Files.copy() is applicable for argument types:
(sun.nio.fs.UnixPath, Reference)

Code implements a new SimpleFileVisitor<Path>() {...} inline and uses a
reference defined before the class (~final in java).

Is it known?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>

Re: 2.5.7 regression with references?

Posted by "Daniel.Sun" <su...@apache.org>.
GROOVY-9115 is fixed in 3.0.0 beta-2 and 2.5.8

Cheers,
Daniel.Sun



-----
Apache Groovy committer & PMC member 
Blog: http://blog.sunlan.me 
Twitter: @daniel_sun 

--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: 2.5.7 regression with references?

Posted by Paolo Di Tommaso <pa...@gmail.com>.
Just got a weird compilation error always using Path arguments.

https://issues.apache.org/jira/browse/GROOVY-9115


p

On Fri, May 10, 2019 at 6:38 PM Romain Manni-Bucau <rm...@gmail.com>
wrote:

> Sure, the class is there:
> https://github.com/Talend/component-runtime/blob/component-runtime-1.1.9/sample-parent/documentation-sample/_src/build/Bundles.groovy#L71 and
> the reference issue is at the line before.
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>
>
> Le ven. 10 mai 2019 à 18:35, Milles, Eric (TR Tech, Content & Ops) <
> eric.milles@thomsonreuters.com> a écrit :
>
>> There were some anon. inner fixes in 2.5.7.  Can you show a small example
>> of the AIC you are seeing an error for?
>>
>>
>> ------------------------------
>> *From:* Romain Manni-Bucau <rm...@gmail.com>
>> *Sent:* Friday, May 10, 2019 11:11 AM
>> *To:* dev@groovy.apache.org
>> *Subject:* 2.5.7 regression with references?
>>
>> Hi guys,
>>
>> using anonymous classes with 2.5.7 does not handle references properly
>> compared to 2.5.6:
>>
>> error I get:
>>
>> static java.nio.file.Files.copy() is applicable for argument types:
>> (sun.nio.fs.UnixPath, Reference)
>>
>> Code implements a new SimpleFileVisitor<Path>() {...} inline and uses a
>> reference defined before the class (~final in java).
>>
>> Is it known?
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=6Rk3wlQs2NcR0P2nDz86G01h-m6VQbnYumb8tKUEvm0&e=>
>> |  Blog
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__rmannibucau.metawerx.net_&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=lyJ1DiGt_7lfPoBsZe4V3M1nQG0YJmo_xjPsNV4Hnn0&e=> |
>> Old Blog
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__rmannibucau.wordpress.com&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=UWnVLBl9lTyYgMWRJqb_NzGBibfwQF0R4h8fdLshk70&e=>
>> | Github
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=X6ovp5Ps9eaW1rF70nvxb3v9LEUuimx2sMthr-DfpZk&e=> |
>> LinkedIn
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_in_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=6DCaJqQilo4OF6QZWHebsxVgEX3lMI28oV-pN1oELy0&e=> |
>> Book
>>
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.packtpub.com_application-2Ddevelopment_java-2Dee-2D8-2Dhigh-2Dperformance&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=4SDP3yPvs8hudabotb8fjmI2_qq4fPTwdP-YMxHhjm0&e=>
>>
>

Re: 2.5.7 regression with references?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Done at https://issues.apache.org/jira/browse/GROOVY-9120

Le sam. 11 mai 2019 à 18:28, Romain Manni-Bucau <rm...@gmail.com> a
écrit :

>
>
> Le sam. 11 mai 2019 à 18:02, Daniel.Sun <su...@apache.org> a écrit :
>
>> I'm a bit confused because I see the build result of upgrading groovy to
>> 2.5.7 is green:
>>
>>
>> https://travis-ci.org/Talend/component-runtime/builds/530836768?utm_source=github_status&utm_medium=notification
>
>
>
> I dropped the anonymous class in favor of a nested class to avoid the
> reference.
>
>
>>
>>
>> Would you please submit a jira ticket and provide some standalone sample
>> code?  Here is the link to JIRA:
>>
>> https://issues.apache.org/jira/projects/GROOVY/summary
>
>
> Will do tonight
>
>
>
>>
>>
>> Cheers,
>> Daniel.Sun
>>
>>
>>
>> -----
>> Apache Groovy committer & PMC member
>> Blog: http://blog.sunlan.me
>> Twitter: @daniel_sun
>>
>> --
>> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>>
>

Re: 2.5.7 regression with references?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Le sam. 11 mai 2019 à 18:02, Daniel.Sun <su...@apache.org> a écrit :

> I'm a bit confused because I see the build result of upgrading groovy to
> 2.5.7 is green:
>
>
> https://travis-ci.org/Talend/component-runtime/builds/530836768?utm_source=github_status&utm_medium=notification



I dropped the anonymous class in favor of a nested class to avoid the
reference.


>
>
> Would you please submit a jira ticket and provide some standalone sample
> code?  Here is the link to JIRA:
>
> https://issues.apache.org/jira/projects/GROOVY/summary


Will do tonight



>
>
> Cheers,
> Daniel.Sun
>
>
>
> -----
> Apache Groovy committer & PMC member
> Blog: http://blog.sunlan.me
> Twitter: @daniel_sun
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>

Re: 2.5.7 regression with references?

Posted by "Daniel.Sun" <su...@apache.org>.
I'm a bit confused because I see the build result of upgrading groovy to
2.5.7 is green:

https://travis-ci.org/Talend/component-runtime/builds/530836768?utm_source=github_status&utm_medium=notification


Would you please submit a jira ticket and provide some standalone sample
code?  Here is the link to JIRA:

https://issues.apache.org/jira/projects/GROOVY/summary


Cheers,
Daniel.Sun



-----
Apache Groovy committer & PMC member 
Blog: http://blog.sunlan.me 
Twitter: @daniel_sun 

--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: 2.5.7 regression with references?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Sure, the class is there:
https://github.com/Talend/component-runtime/blob/component-runtime-1.1.9/sample-parent/documentation-sample/_src/build/Bundles.groovy#L71
and
the reference issue is at the line before.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 10 mai 2019 à 18:35, Milles, Eric (TR Tech, Content & Ops) <
eric.milles@thomsonreuters.com> a écrit :

> There were some anon. inner fixes in 2.5.7.  Can you show a small example
> of the AIC you are seeing an error for?
>
>
> ------------------------------
> *From:* Romain Manni-Bucau <rm...@gmail.com>
> *Sent:* Friday, May 10, 2019 11:11 AM
> *To:* dev@groovy.apache.org
> *Subject:* 2.5.7 regression with references?
>
> Hi guys,
>
> using anonymous classes with 2.5.7 does not handle references properly
> compared to 2.5.6:
>
> error I get:
>
> static java.nio.file.Files.copy() is applicable for argument types:
> (sun.nio.fs.UnixPath, Reference)
>
> Code implements a new SimpleFileVisitor<Path>() {...} inline and uses a
> reference defined before the class (~final in java).
>
> Is it known?
>
> Romain Manni-Bucau
> @rmannibucau
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=6Rk3wlQs2NcR0P2nDz86G01h-m6VQbnYumb8tKUEvm0&e=>
> |  Blog
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__rmannibucau.metawerx.net_&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=lyJ1DiGt_7lfPoBsZe4V3M1nQG0YJmo_xjPsNV4Hnn0&e=> |
> Old Blog
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__rmannibucau.wordpress.com&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=UWnVLBl9lTyYgMWRJqb_NzGBibfwQF0R4h8fdLshk70&e=>
> | Github
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=X6ovp5Ps9eaW1rF70nvxb3v9LEUuimx2sMthr-DfpZk&e=> |
> LinkedIn
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_in_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=6DCaJqQilo4OF6QZWHebsxVgEX3lMI28oV-pN1oELy0&e=> |
> Book
>
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.packtpub.com_application-2Ddevelopment_java-2Dee-2D8-2Dhigh-2Dperformance&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=4SDP3yPvs8hudabotb8fjmI2_qq4fPTwdP-YMxHhjm0&e=>
>

Re: 2.5.7 regression with references?

Posted by "Milles, Eric (TR Tech, Content & Ops)" <er...@thomsonreuters.com>.
There were some anon. inner fixes in 2.5.7.  Can you show a small example of the AIC you are seeing an error for?


________________________________
From: Romain Manni-Bucau <rm...@gmail.com>
Sent: Friday, May 10, 2019 11:11 AM
To: dev@groovy.apache.org
Subject: 2.5.7 regression with references?

Hi guys,

using anonymous classes with 2.5.7 does not handle references properly compared to 2.5.6:

error I get:

static java.nio.file.Files.copy() is applicable for argument types: (sun.nio.fs.UnixPath, Reference)

Code implements a new SimpleFileVisitor<Path>() {...} inline and uses a reference defined before the class (~final in java).

Is it known?

Romain Manni-Bucau
@rmannibucau<https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=6Rk3wlQs2NcR0P2nDz86G01h-m6VQbnYumb8tKUEvm0&e=> |  Blog<https://urldefense.proofpoint.com/v2/url?u=https-3A__rmannibucau.metawerx.net_&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=lyJ1DiGt_7lfPoBsZe4V3M1nQG0YJmo_xjPsNV4Hnn0&e=> | Old Blog<https://urldefense.proofpoint.com/v2/url?u=http-3A__rmannibucau.wordpress.com&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=UWnVLBl9lTyYgMWRJqb_NzGBibfwQF0R4h8fdLshk70&e=> | Github<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=X6ovp5Ps9eaW1rF70nvxb3v9LEUuimx2sMthr-DfpZk&e=> | LinkedIn<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.linkedin.com_in_rmannibucau&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=6DCaJqQilo4OF6QZWHebsxVgEX3lMI28oV-pN1oELy0&e=> | Book
<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.packtpub.com_application-2Ddevelopment_java-2Dee-2D8-2Dhigh-2Dperformance&d=DwMFaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=tPJuIuL_GkTEazjQW7vvl7mNWVGXn3yJD5LGBHYYHww&m=c1PZq6tGIcZGJOp3LfDNfj6HhVKV1_Yb2_Qajzuoqh4&s=4SDP3yPvs8hudabotb8fjmI2_qq4fPTwdP-YMxHhjm0&e=>