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

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

GitHub user paulk-asert opened a pull request:

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

    GROOVY-8107: Binary incompatibility problems between compiled code in…

    … Groovy 2.4.7 vs 2.4.9

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

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

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

    https://github.com/apache/groovy/pull/508.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 #508
    
----
commit dbaabcac0e34341c19796d02bfd8c53a02ff2bbc
Author: paulk <[email protected]>
Date:   2017-03-05T21:52:26Z

    GROOVY-8107: Binary incompatibility problems between compiled code in 
Groovy 2.4.7 vs 2.4.9

----


> Binary incompatibility problems between compiled code in Groovy 2.4.7 vs 2.4.9
> ------------------------------------------------------------------------------
>
>                 Key: GROOVY-8107
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8107
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.9
>            Reporter: Graeme Rocher
>         Attachments: groovy-npe-test.zip, interceptor-issue.zip
>
>
> 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'
>  null
>       at 
> org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:932)
>       at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:590)
>       at 
> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:566)
>       at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:543)
> ...
> Caused by: java.lang.NullPointerException
>       at 
> org.codehaus.groovy.ast.expr.VariableExpression.<init>(VariableExpression.java:64)
>       at 
> org.codehaus.groovy.transform.trait.TraitComposer.applyTrait(TraitComposer.java:247)
>       at 
> org.codehaus.groovy.transform.trait.TraitComposer.doExtendTraits(TraitComposer.java:111)
>       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$3.call(ASTTransformationVisitor.java:319)
>       at 
> org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:928)
>       ... 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 https://issues.apache.org/jira/browse/GROOVY-8048
> 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(DefaultGroovyMethods.java:12204)
>         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
(v6.3.15#6346)

Reply via email to