The thrown() issue still exists in spock-core-2.4-M6
ContractsSpec > contracted method with precondition violation > contracted
method with precondition violation [dir: 42, file: , path: null, #0] FAILED
groovy.lang.MissingMethodException: No signature of method: thrownImpl for
class: org.apache.groovy.contracts.spock.ContractsSpec is applicable for
argument types: (null, null, Class) values: [null, null, class
org.apache.groovy.contracts.PreconditionViolation]
Possible solutions: thrown()
at org.apache.groovy.contracts.spock.ContractsSpec.contracted method
with precondition violation(SpockIntegrationTests.groovy:35)
I think this method needs to be protected or public:
https://github.com/spockframework/spock/blob/c55a81856bd1c790abe0fac3de6acbe436a43664/spock-core/src/main/java/org/spockframework/lang/SpecInternals.java#L73
________________________________
From: Paul King <[email protected]>
Sent: Thursday, August 14, 2025 7:33 PM
To: [email protected] <[email protected]>
Subject: [EXT] Re: [DISCUSS] Groovy 5 release
External Email: Use caution with links and attachments.
Yes, let's add that to the list of items to look at and fix if we can.
On Fri, Aug 15, 2025 at 8:13 AM James Daugherty
<[email protected]<mailto:[email protected]>> wrote:
Is it possible the spock thrown() issue could be addressed before a 5.0 release?
There’s an ignored test for this in the codeline:
https://github.com/apache/groovy/blob/bf78a8645f8de436167ca581412908dffc023281/subprojects/groovy-contracts/src/test/groovy/org/apache/groovy/contracts/spock/SpockIntegrationTests.groovy#L31<https://urldefense.com/v3/__https://github.com/apache/groovy/blob/bf78a8645f8de436167ca581412908dffc023281/subprojects/groovy-contracts/src/test/groovy/org/apache/groovy/contracts/spock/SpockIntegrationTests.groovy*L31__;Iw!!GFN0sa3rsbfR8OLyAw!YEemJW7idgmFfWMEAEcXpAxBLemfRezHj04xDTg7WkpicQwIhrvc3dEKxIfZ3SCxkGmZm5V5_JQ6Pj-YGjUZDg$>
I am guessing most will want to be able to use spock once Groovy 5 is released.
-James
On Thu, Aug 14, 2025 at 5:48 PM Paul King
<[email protected]<mailto:[email protected]>> wrote:
Hi folks,
I think we are (almost) ready for a Groovy 5 release. We only have a handful of
changes since RC1. Mostly the changes are to do with groovysh which could
certainly do with some more testing. If folks are happy to test groovysh by
building on master (installGroovy task), I can wait until folks have found time
to do that. Alternatively, if folks would like an RC2 release to test I can go
ahead with such a release first.
There are still things we are working on:
* OSGi work to support two flavours of usage that our users seem to have
* looking at a serialization issue which might make an edge case more robust
* some performance issues
* some upstream JLine fixes we have submitted
If anyone has time to work on any of those, let me know and I can go into more
details and point you to issues. We'll obviously include any advancements on
those topics if we make progress.
But otherwise, I think we can go ahead with a GA release and fix the above
things in the normal way with our point releases. Folks not impacted by the
above can start using Groovy 5 in the meantime. Most of our users won't be
affected by those issues and they could also give us further feedback in
parallel.
Thoughts?
Cheers,
Paul.