groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <>
Subject Re: @Immutable backwards compatibility
Date Wed, 26 Sep 2018 02:01:36 GMT
I'll have to look a little more closely. There is some provision for
handling backwards compatibility. The string value of the class name of
Annotations is compared with "groovy.transform.Immutable", which will
handle some cases but we've removed the annotation attributes like
knownClasses so that is probably going to impact the ability of those
annotations to be even read. We don't need those annotation attributes any
more but I am unsure whether we can add them back in a way that won't
impact our annotation collector usage. I'll have to research unless someone
else knows off the top of their head.

Cheers, Paul.

On Tue, Sep 25, 2018 at 4:39 PM C├ędric Champeau <>

> Hi folks,
> Gradle 5 is migrating to Groovy 2.5 (yay!). However, we discovered several
> regressions (in @CompileStatic, in covariant return type checking, ...)
> that may make the migration painful. One of them is unexpected for our
> users: the @Immutable AST transformation changed the runtime checks, so a
> class compiled with 2.4 running on 2.5 would suddenly fail. An example of
> such a problem has been reported at
> Our partners at Netflix already mentioned they had to fork several plugins
> to accommodate the problem. While the new checks are legit, the fact that
> it's an AST xform (happening at compile time) and that the additional check
> happens at runtime can be surprising.
> I'm not sure if we need to change this, but having an incompatibility may
> be annoying.

View raw message