Add Groovy 6 (alpha) executor variant with no-Spock fallback#957
Merged
Conversation
Decouple Spock from the executor core behind a ServiceLoader-based SpecSupport SPI. The Spock implementation (gwc.spock.*) moves to a profile-gated source root (src/spock) compiled only into the Groovy 3/4/5 variants via build-helper. The new groovy_6_0_alpha Maven profile ships without spock-core; when no provider is present, Spock specs and the AST view return a clear 'not supported on this Groovy version yet' message while plain Groovy runs normally. - SpecSupport SPI + SpockSpecSupport provider (runSpec/renderAst/spockVersion) - ExecutionInfo no longer references Spock directly (defaults spockVersion=n/a) - pom: gate spock-core + byte-buddy/objenesis/junit-platform-launcher to 3/4/5; add groovy.6.version and groovy_6_0_alpha profile (JDK 17, no Spock) - tests: G6 fallback tests in src/no-spock-test (plain JUnit 5) - CI: add groovy_6_0_alpha (java 17) to build + deploy matrices - frontend: nicer label for pre-release ids (id contains 'alpha' so the existing view.ts logic never selects it as the default) - README + design spec updated
There was a problem hiding this comment.
Pull request overview
Adds a Groovy 6.0.0-alpha executor variant that ships without Spock by decoupling Spock-dependent functionality behind a ServiceLoader SPI and providing clear fallback behavior when the provider is absent.
Changes:
- Introduces
gwc.spi.SpecSupportand switchesGFunctionExecutor+ExecutionInfoto use an optional provider (fallback messaging when absent). - Moves Spock implementation into a profile-gated source root (
src/spock/) and registers it viaMETA-INF/services. - Adds a Groovy 6 alpha Maven profile (no Spock deps) + JUnit fallback tests and updates CI matrices + frontend version labeling.
Reviewed changes
Copilot reviewed 12 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/frontend/src/ts/groovy-console.ts | Improves runtime label formatting for pre-release IDs (e.g., 6_0_alpha → 6.0-alpha). |
| README.md | Documents the new Groovy 6 alpha profile, Spock absence, and profile switching caveat. |
| functions/pom.xml | Adds groovy.6.version property for the new alpha variant. |
| functions/groovy-executor/src/main/java/gwc/spi/SpecSupport.java | Adds SPI interface to decouple Spock support from core executor. |
| functions/groovy-executor/src/main/java/gwc/GFunctionExecutor.java | Loads SpecSupport via ServiceLoader, adds fallback messages when absent. |
| functions/groovy-executor/src/main/java/gwc/representations/ExecutionInfo.java | Removes direct Spock reference; defaults spockVersion to n/a. |
| functions/groovy-executor/src/spock/resources/META-INF/services/gwc.spi.SpecSupport | Registers the Spock-backed SPI provider for Spock-enabled builds. |
| functions/groovy-executor/src/spock/java/gwc/spock/SpockSpecSupport.java | Implements SpecSupport using Spock runtime and AST tooling. |
| functions/groovy-executor/src/spock/java/gwc/spock/ScriptRunner.java | Spock spec execution runner (JUnit Platform launcher integration). |
| functions/groovy-executor/src/spock/java/gwc/spock/ScriptCompiler.java | Compiles Groovy scripts into spec classes for execution. |
| functions/groovy-executor/src/spock/java/gwc/spock/AstRenderer.java | Renders/transpiles AST using Spock’s embedded compiler utilities. |
| functions/groovy-executor/src/spock/java/gwc/spock/output/* | Adds tree-printing listener/printer utilities for rendered spec output. |
| functions/groovy-executor/src/no-spock-test/groovy/gwc/GFunctionExecutorFallbackTest.groovy | Adds JUnit fallback tests for the no-Spock (Groovy 6) variant. |
| functions/groovy-executor/pom.xml | Adds Groovy 6 alpha profile (no Spock deps) and profile-gated Spock sources/deps for 3/4/5. |
| .github/workflows/build-groovy-executor.yml | Adds groovy_6_0_alpha to build matrix. |
| .github/workflows/deploy-groovy-executor.yml | Adds groovy_6_0_alpha to deploy matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cf47098 to
7ee6ce6
Compare
glaforge
approved these changes
May 30, 2026
Collaborator
glaforge
left a comment
There was a problem hiding this comment.
Nice, great idea to already let users experience Groovy 6, although it's just an alpha!
Any ETA on when the Spock support will be added too?
Collaborator
Author
|
spockframework/spock#2356 still has some issues to resolve |
leonard84
added a commit
that referenced
this pull request
May 31, 2026
…support * origin/main: Declare type in package.json to get rid of rsbuild warning Update frontend runtime to Java 21 in app.yaml Add a History modal with session switching and snapshot restore (#960) Pass required environment secrets to Cloud Function Update gcloud function deploy runtime to java21 for gen2 support Add Groovy 6 (alpha) executor variant with no-Spock fallback (#957) # Conflicts: # .github/workflows/deploy-github-access.yml # services/frontend/src/ts/view.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Groovy 6.0.0-alpha-1 is out, but Spock has no Groovy 6-compatible release yet, and disabling Spock's Groovy version check (as we do for Groovy 5) is not viable here — there are real incompatibilities. This adds a Groovy 6 variant that ships without Spock and falls back gracefully.
What
Decouple Spock from the executor core behind a
ServiceLoaderSPIgwc.spi.SpecSupportinterface (runSpec/renderAst/spockVersion);GFunctionExecutorno longer imports any Spock type.gwc.spock.*moves to a profile-gated source rootsrc/spock/, compiled only into the Groovy 3/4/5 variants viabuild-helper-maven-plugin, and registered as a provider (SpockSpecSupport) throughMETA-INF/services.gwc.representations.ExecutionInfoalso referenced Spock directly (SpockReleaseInfo); it now defaultsspockVersionton/aand is filled from the provider when present.Fallback behavior (no provider on the classpath)
Build (Maven)
groovy.6.versionproperty andgroovy_6_0_alphaprofile (nospock-core).spock-core+ its runtime helpers (byte-buddy,objenesis,junit-platform-launcher) gated to the 3/4/5 profiles. The packaged G6 artifact containsgroovy-6.0.0-alpha-1and no Spock jars.groovy.6.version, so bumping alpha-1 → alpha-2 is a one-line change deployed to the samegroovy_6_0_alphafunction.Tests — G6 fallback tests (plain JUnit 5, no Spock) in
src/no-spock-test/via a gmavenplustestSourcesoverride; existing Spock tests unchanged for 3/4/5.CI —
groovy_6_0_alpha(java 21) added to build + deploy matrices.Frontend — nicer label for pre-release ids ("Groovy 6.0-alpha"). Because the runtime id contains
alpha, the existingview.tsselection logic never picks it as the default version. Runtime discovery (list_runtimes) and labeling pick it up automatically.Verification
All variants build green locally:
G6
target/deployment/libsconfirmed free ofspock-core/byte-buddy/objenesis. Frontend lint passes.