You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Leonard Brünings <gr...@bruenings-it.net> on 2018/07/07 18:40:23 UTC

Re: Get reference to enclosing closure

Hi Jochen,

it took me some time to get back to you ;)

You can check out the code here:
https://github.com/spockframework/spock/tree/closure-reference-expression

Here is the travis build
https://travis-ci.org/spockframework/spock/builds/401275894

If I run the tests in Idea it all works fine, but it blows up with gradle.

cheers

Leonard


Am 22.11.2017 um 09:17 schrieb Jochen Theodorou:
>
>
> Am 22.11.2017 um 02:11 schrieb Leonard Brünings:
>> Great now I run into another problem, spock uses groovy-all, which
>> repackages asm.
>> The BytecodeExpression has a MethodVisitor from asm, which is now in
>> groovyjarjarasm.asm.MethodVisitor
>> This compiles fine, but when the AST transforms are executed it
>> breaks down with this exception:
>>
>> Caused by: java.lang.LinkageError: loader constraint violation:
>> loader (instance of groovy/lang/GroovyClassLoader) previously
>> initiated loading for a different type with name
>> "groovyjarjarasm/asm/MethodVisitor"
>
>
> that hints you have 2 Groovy versions running and you did already load
> one and now try to load the other through the same class. Solcing that
> requires a look at your setup
>
> bye Jochen
>