You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/03 06:02:00 UTC

[jira] [Commented] (GROOVY-8806) Immutable classes break in groovy 2.5.2

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

ASF GitHub Bot commented on GROOVY-8806:
----------------------------------------

GitHub user paulk-asert opened a pull request:

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

    GROOVY-8806: Immutable classes break in groovy 2.5.2

    

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

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

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

    https://github.com/apache/groovy/pull/803.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 #803
    
----
commit baeb7c05e58e8163646a7d4bf1cfc18eadea4a76
Author: Paul King <pa...@...>
Date:   2018-10-03T00:30:16Z

    GROOVY-8806: Immutable classes break in groovy 2.5.2

----


> Immutable classes break in groovy 2.5.2
> ---------------------------------------
>
>                 Key: GROOVY-8806
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8806
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>            Reporter: Roberto Perez Alcolea
>            Priority: Major
>
> We've being running tests of gradle plugins with latest gradle nightly release which upgraded to groovy 2.5.2
> Since then, we've seen multiple plugins breaking with errors around immutability:
>  
> {code:java}
> > Unsupported type (org.ajoberstar.grgit.Branch) found for field 'trackingBranch' while constructing immutable class org.ajoberstar.grgit.Branch.
> Immutable classes only support properties with effectively immutable types including:
> - Strings, primitive types, wrapper types, Class, BigInteger and BigDecimal, enums
> - classes annotated with @KnownImmutable and known immutables (java.awt.Color, java.net.URI)
> - Cloneable classes, collections, maps and arrays, and other classes with special handling
> (java.util.Date and various java.time.* classes and interfaces)
> Other restrictions apply, please see the groovydoc for ImmutableOptions for further details{code}
>  
> I was wondering if this change is related to [https://github.com/apache/groovy/commit/3471f55ea5839ab3c9dfa51cdca081bc7b4c020e#diff-8f745c460bc1abf332f21067b21ec551R754] 
>  
> And also,  looks like gradle plugins that use the gradleApi and are compiled with groovy 2.4 could break with groovy 2.5 with usages like this one



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