Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cryptic compilation error with Spock 2.0-M1 and Groovy 3.0.0-RC2 #1067

Open
szpak opened this issue Jan 2, 2020 · 0 comments
Open

Cryptic compilation error with Spock 2.0-M1 and Groovy 3.0.0-RC2 #1067

szpak opened this issue Jan 2, 2020 · 0 comments

Comments

@szpak
Copy link
Contributor

@szpak szpak commented Jan 2, 2020

A try to Spock 2.0-M1 with Groovy 3.0.0-RC2 (manually playing with Groovy dependencies) results in very cryptic error message:

> Task :compileTestGroovy FAILED
startup failed:
Could not instantiate global transform class org.spockframework.compiler.SpockTransform specified at
jar:file:/.../spock-core-2.0-M1-groovy-2.5.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation
because of exception java.lang.reflect.InvocationTargetException

1 error

Having Groovy 2.4 and Spock 1.3-groovy-2.5 returns much more verbose:

> Task :compileTestGroovy FAILED
startup failed:
Could not instantiate global transform class org.spockframework.compiler.SpockTransform specified at
jar:file:/.../spock-core-1.3-groovy-2.5.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation
because of exception org.spockframework.util.IncompatibleGroovyVersionException:
The Spock compiler plugin cannot execute because Spock 1.3.0-groovy-2.5 is not compatible
with Groovy 2.4.3. For more information, see http://versioninfo.spockframework.org
Spock artifact: file:/.../spock-core-1.3-groovy-2.5.jar
Groovy artifact: file:/.../groovy-2.4.3.jar

1 error

It would be good to try to detect that incompatibility earlier and fail with more verbose error message for Spock 2.0 and Groovy 3.0.

Btw, as at least basic tests pass with Spock 2.0-groovy-2.5-SNAPSHOT and Groovy 3.0.0-RC2 maybe it would be good to allow to run Spock 2.0-M2 with Groovy 3.x to facilitate testing that configuration (before Spock can be built and tested with Groovy 3)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.