groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C├ędric Champeau <>
Subject @Immutable backwards compatibility
Date Tue, 25 Sep 2018 06:39:02 GMT
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