You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jamesfredley (via GitHub)" <gi...@apache.org> on 2026/04/30 17:24:46 UTC

[I] CI - Groovy Joint Validation Build is broken: spock-core:2.4-groovy-5.0 incompatible with Groovy 4.x snapshot [grails-core]

jamesfredley opened a new issue, #15613:
URL: https://github.com/apache/grails-core/issues/15613

   ## Summary
   
   The `CI - Groovy Joint Validation Build` workflow (`build_grails` job) has been **failing on every push to `8.0.x` since 2026-04-29** with a Spock vs. Groovy major-version mismatch:
   
   ```
   > Task :grails-test-examples-issue-11767:compileIntegrationTestGroovy
   startup failed:
   
   Could not instantiate global transform class
   org.spockframework.compiler.SpockTransform specified at
   jar:file:.../spock-core/2.4-groovy-5.0/.../spock-core-2.4-groovy-5.0.jar!/META-INF/services/...
   because of exception
   org.spockframework.util.IncompatibleGroovyVersionException:
   The Spock compiler plugin cannot execute because Spock 2.4.0-groovy-5.0
   is not compatible with Groovy 4.0.32-SNAPSHOT.
   
   Spock artifact: file:.../spock-core-2.4-groovy-5.0.jar
   Groovy artifact: file:.../groovy-4.0.32-SNAPSHOT.jar
   
   > Task :grails-test-examples-issue-11767:compileIntegrationTestGroovy FAILED
   > Task :grails-test-examples-micronaut:compileIntegrationTestGroovy FAILED
   ```
   
   ## Affected runs (10 most recent `8.0.x` runs of the workflow)
   
   | Run | Commit | Result |
   |---|---|---|
   | [25144143636](https://github.com/apache/grails-core/actions/runs/25144143636) | 7cf1d19 | failure |
   | [25134285481](https://github.com/apache/grails-core/actions/runs/25134285481) | 1b33cf8 | failure |
   | [25086923954](https://github.com/apache/grails-core/actions/runs/25086923954) | 7174dd2 | failure |
   | [25086897319](https://github.com/apache/grails-core/actions/runs/25086897319) | 919802e | failure |
   | [25082518134](https://github.com/apache/grails-core/actions/runs/25082518134) | 6e4c6a3 | failure |
   
   The same failure is reproduced on every PR that merges latest `8.0.x` (e.g. [PR #15467 / run 25170545059](https://github.com/apache/grails-core/actions/runs/25170545059/job/73789008877)).
   
   ## Root cause
   
   Commit [ae7ee513ec](https://github.com/apache/grails-core/commit/ae7ee513ecefdc391e27563a4fdd934744c8cb0a) (`Override spock to match the micronaut bom's version`) bumped the Spock artifact to `spock-core:2.4-groovy-5.0` because the Micronaut BOM moved to Groovy 5. `spock-core:2.4-groovy-5.0` ships an AST-transform with a hard-coded major-version check that rejects Groovy 4.x at compile time.
   
   The Joint Validation Build (`.github/workflows/groovy-joint-workflow.yml`) deliberately swaps the Groovy artifact to the Apache Groovy 4.x main snapshot (currently `4.0.32-SNAPSHOT`) so we catch breakages before Groovy ships them. With the Spock-5 artifact pinned in the BOM, every Spock spec compiled in the joint build now fails the version check.
   
   ## Existing precedent
   
   Commit [5d71eb4035](https://github.com/apache/grails-core/commit/5d71eb4035de02016162ef98eb681cdc691624a5) (`fix(forge): bypass Spock Groovy-version check in generated app build.gradle`) already adopted Spock's documented escape hatch for **forge-generated apps**:
   
   ```
   tasks.withType(GroovyCompile).configureEach {
       options.forkOptions.jvmArgs = (options.forkOptions.jvmArgs ?: []) +
           ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
   }
   tasks.withType(Test).configureEach {
       systemProperty 'spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true'
   }
   ```
   
   The same workaround was **not** applied to the grails-core build itself. `grep -r 'disableGroovyVersionCheck' origin/8.0.x` returns nothing on the framework build files - only the rocker template carries it.
   
   ## Suggested options (please pick one)
   
   1. **Apply the existing forge bypass to the framework build.** Add `-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true` to the shared compile/test conventions used by the test-examples and the grails-core integration-test compile classpaths (`gradle/test-config.gradle`, `build-logic/.../CompilePlugin.groovy`). Lowest-risk: matches what the forge templates already do, restores the joint build immediately.
   2. **Publish or pin a Groovy-4-compatible Spock alongside the Groovy-5 one.** Use a Gradle resolution rule (or a `spock.version` override) so when `groovy.version` resolves to 4.x the dependency picks `spock-core:2.3-groovy-4.0` (already on the classpath) instead of `2.4-groovy-5.0`. Keeps the framework on a sanctioned Spock build for the Joint matrix; requires more BOM logic.
   3. **Drop the Joint Groovy 4 matrix.** If the project is consciously moving to Groovy 5 for 8.0.x, retire the joint validation against `apache/groovy:GROOVY_4_0_X` and validate against the 5.x main only.
   
   ## Repro
   
   ```
   ./gradlew :grails-test-examples-issue-11767:compileIntegrationTestGroovy
   ```
   
   with the local Maven repo populated by `mvn install -P -groovydoc,jaxb,asciidoctor,nodoc -DskipTests` from the `apache/groovy` 4.0.x branch (mirroring what the workflow does).
   
   ## Related
   
   - `apache/grails-core#15467` (PR currently bouncing off this failure)
   - Spock issue: spockframework/spock#1916 (`IncompatibleGroovyVersionException` rationale)
   - Apache Groovy 4.x main: https://github.com/apache/groovy/tree/GROOVY_4_0_X
   
   cc @jamesfredley @jdaugherty


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CI - Groovy Joint Validation Build is broken: spock-core:2.4-groovy-5.0 incompatible with Groovy 4.x snapshot [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley closed issue #15613: CI - Groovy Joint Validation Build is broken: spock-core:2.4-groovy-5.0 incompatible with Groovy 4.x snapshot
URL: https://github.com/apache/grails-core/issues/15613


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] CI - Groovy Joint Validation Build is broken: spock-core:2.4-groovy-5.0 incompatible with Groovy 4.x snapshot [grails-core]

Posted by "jamesfredley (via GitHub)" <gi...@apache.org>.
jamesfredley commented on issue #15613:
URL: https://github.com/apache/grails-core/issues/15613#issuecomment-5076001998

   Closing as fixed by PR #15615 (`5184f82c`, May 1, 2026). The Groovy joint validation workflow excludes the Groovy 5 Grails-Micronaut island from the Groovy 4 job, removing the reported incompatible Spock compile path. The fix shipped in Grails 8.0.0-M1.
   
   <!-- project-487-remaining-15613 -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org