groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <>
Subject [jira] [Commented] (GROOVY-8107) Binary incompatibility problems between compiled code in Groovy 2.4.7 vs 2.4.9
Date Mon, 06 Mar 2017 00:14:32 GMT


Paul King commented on GROOVY-8107:

Traits compiled with 2.4.8 or 2.4.9 will work with 2.4.8+ (apart from the GROOVY-8048 bug)
but not 2.4.7 and before. We'll need to document that in known issues. It was a short-coming
in my fix for GROOVY-7584. In hindsight, both GROOVY-7584 and GROOVY-8048 should probably
have been done just in the 2.5 branch and maintaining compatibility both ways should have
been factored into the design. But given the current state of play, I'd suggest merging the
fix into 2.4.10 and we can decide later whether in 3.0 we'd drop supporting the old style
field naming convention.

> Binary incompatibility problems between compiled code in Groovy 2.4.7 vs 2.4.9
> ------------------------------------------------------------------------------
>                 Key: GROOVY-8107
>                 URL:
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.9
>            Reporter: Graeme Rocher
>         Attachments:,
> There are currently various binary incompatibility problems that are presenting a challenge
for us moving forward with upgrading to Groovy 2.4.9 in Grails.
> One of them is Groovy traits compiled with Groovy 2.4.9 are not usable in Groovy 2.4.7
due to the following exception:
> {code}
> Error:Groovyc: While compiling tests of grails-datastore-gorm-hibernate5_test: BUG! exception
in phase 'semantic analysis' in source unit '/Users/graemerocher/grails/gorm-hibernate5/grails-datastore-gorm-hibernate5/src/test/groovy/grails/gorm/tests/jpa/SimpleJpaEntitySpec.groovy'
> 	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(
> 	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(
> 	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(
> 	at org.codehaus.groovy.control.CompilationUnit.compile(
> ...
> Caused by: java.lang.NullPointerException
> 	at org.codehaus.groovy.ast.expr.VariableExpression.<init>(
> 	at org.codehaus.groovy.transform.trait.TraitComposer.applyTrait(
> 	at org.codehaus.groovy.transform.trait.TraitComposer.doExtendTraits(
> 	at org.grails.compiler.gorm.GormEntityTransformation.visit(GormEntityTransformation.groovy:338)
> 	at org.grails.compiler.gorm.JpaGormEntityTransformation.visit(JpaGormEntityTransformation.groovy:50)
> 	at org.grails.compiler.gorm.GlobalJpaEntityTransform.visitClass(GlobalJpaEntityTransform.groovy:43)
> 	at org.grails.compiler.gorm.GlobalJpaEntityTransform.visit(GlobalJpaEntityTransform.groovy:35)
> 	at org.codehaus.groovy.transform.ASTTransformationVisitor$
> 	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(
> 	... 22 more
> {code}
> This is an issue and IMO there should never be binary incompatible breaking changes between
different patch releases of Groovy 2.4.x.
> The other issue is
> Which is marked as fixed, but currently code already compiled in Groovy 2.4.7 is throwing
a NPE using 2.4.9 such as:
> {code}
> Caused by: java.lang.NullPointerException: null
>         at org.codehaus.groovy.runtime.DefaultGroovyMethods.leftShift(
>         at grails.artefact.Interceptor$Trait$Helper.matchAll(Interceptor.groovy:109)
> {code}
> We can't really ask people to start recompiling existing published libraries for a patch
release of Groovy so are looking for a path forward with these problems.
> It is my opinion that we should be aim to never break binary compatibility in a major
release let alone in a patch release.

This message was sent by Atlassian JIRA

View raw message