spockframework / spock Public
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
Comments
The same occurrs with M2 and Groovy 3.0.1:
JDK12, gmavenplus-plugin:1.8.1:compileTests it seems M2 is unusable with Groovy 3 for now Full trace:
|
@eXsio I could run spock-example with:
Java 8 does not work (JVM crash), looks like a groovy problem not really spock. |
Hmm thanks for quick reply. I will investigate further. |
I suspect, you you can have some incompatible versions of Spock and Groovy. Please check you Spock/Groovy dependencies:
or if using a modern Linux distro:
|
Or
:-) |
I had the same issue as @eXsio with importing groovy-all 3.0.2 but then realized that Gradle downloaded groovy 2.5.x instead of 3. So I imported all the groovy modules separately instead of using -all and it worked fine also in combination with spock 2.0-M2-groovy-3.0 |
@hedgehog1833 FYI, the next Spock milestone will fetch transitively only In the meantime, as a preparation for that, as mentioned along the way of talking about another problem in my blog post, you might want to exclude all Groovy dependencies provided by Spock and add what you need from Groovy separately, e.g:
possibly with |
I spent some time explaining the original problem and it seems to be on the Groovy side. I created an issues https://issues.apache.org/jira/browse/GROOVY-9469 and a PR to fix it: apache/groovy#1193 |
A try to Spock 2.0-M1 with Groovy 3.0.0-RC2 (manually playing with Groovy dependencies) results in very cryptic error message:
Having Groovy 2.4 and Spock 1.3-groovy-2.5 returns much more verbose:
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)?
The text was updated successfully, but these errors were encountered: