Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
013cb13
canary: test Groovy 6.0.0-SNAPSHOT
jamesfredley Apr 5, 2026
4463494
fix: Groovy 6 VerifyError in DefaultConstraintFactory default parameter
jamesfredley Apr 5, 2026
ba0df88
Merge branch 'grails8-groovy5-sb4' into grails8-groovy6-canary
jamesfredley Apr 6, 2026
c19037d
fix: Groovy 6 compile fixes - Spock version check and CycloneDX license
jamesfredley Apr 6, 2026
ddd7325
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley Apr 6, 2026
0dcb652
fix: Groovy 6 genericGetMethod regression breaks property access on G…
jamesfredley Apr 6, 2026
a6d06f5
fix: GormEntity.get(String) throws MissingPropertyException when GORM…
jamesfredley Apr 6, 2026
99bf0be
fix: centralize Spock version check and add jline 4.0.7 CycloneDX ove…
jamesfredley Apr 6, 2026
8e4fba5
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley Apr 6, 2026
cfd7605
fix: Groovy 6 remaining test fixes
jamesfredley Apr 6, 2026
b2bd213
fix: resolve all remaining test failures on Groovy 6
jamesfredley Apr 6, 2026
24eb53d
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley Apr 6, 2026
027c203
fix: CodeNarc UnnecessaryDotClass in DefaultConstraintFactory
jamesfredley Apr 6, 2026
b225663
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley Apr 6, 2026
b9ac44c
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley Apr 6, 2026
52aad53
fix: GormEntity.get(String) delegates to staticPropertyMissing for GO…
jamesfredley Apr 6, 2026
ea41a40
Merge branch 'grails8-groovy5-sb4' into grails8-groovy6-canary
jamesfredley Apr 25, 2026
678bdf1
fix: harden Groovy 6 canary against snapshot drift and add regression…
jamesfredley Apr 25, 2026
c2aa269
fix: Groovy 6 closure dispatch regression in ControllerActionTransformer
jamesfredley Apr 25, 2026
8e9cdbc
fix: move Groovy 6 generic-getter guard from GormEntity trait to AST
jamesfredley Apr 25, 2026
ddc7ea2
fix: serialise GSP compilation under Groovy 6 to dodge ListHashMap race
jamesfredley Apr 25, 2026
95e9212
style: drop a leftover consecutive blank line in GormEntity
jamesfredley Apr 25, 2026
54b718b
fix(sbom): revert LICENSE_GROUP_MAPPING per @jdaugherty review
jamesfredley Apr 25, 2026
2619635
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley Apr 25, 2026
48598b4
test(forge): capture both stdout and stderr from generated-app gradle…
jamesfredley Apr 25, 2026
5d71eb4
fix(forge): bypass Spock Groovy-version check in generated app build.…
jamesfredley Apr 25, 2026
18b9e52
fix: serialise GSON/views template compilation under Groovy 6
jamesfredley Apr 25, 2026
3e9f517
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley Apr 25, 2026
de1cf4a
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley Apr 25, 2026
8af3b23
docs: drop incorrect GROOVY-11829 citation from GormEntity workaround…
jamesfredley Apr 26, 2026
3f485f3
Merge grails8-groovy5-sb4 audit work into grails8-groovy6-canary
jamesfredley Apr 27, 2026
ee77652
Add standalone reproducer link to GormEntity get(String) AST shim
jamesfredley Apr 27, 2026
fb717d3
Validateable: link standalone reproducer for the TraitReceiverTransfo…
jamesfredley Apr 27, 2026
e7f2478
Merge grails8-groovy5-sb4: link reproducer + Validateable javadoc + r…
jamesfredley Apr 27, 2026
e6332ed
ContainerSupport: link upstream PR #2495 (GROOVY-11968) and standalon…
jamesfredley Apr 27, 2026
367dad7
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
May 2, 2026
2a5e983
drop Groovy 6 workarounds whose upstream fixes have merged
May 2, 2026
4a51898
fix: workaround Groovy 6 stub generator regression in HibernateSettings
May 2, 2026
449c766
Merge branch 'grails8-groovy5-sb4' into grails8-groovy6-canary
jamesfredley May 2, 2026
a69a157
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley May 3, 2026
bd7a30a
Drop two more Groovy 6 workarounds - upstream fixes merged 2026-05-02
jamesfredley May 3, 2026
f8bb282
Merge remote-tracking branch 'origin/grails8-groovy5-sb4' into grails…
jamesfredley May 8, 2026
3cbd88b
Drop GORM generic-getter workaround - GROOVY-11986 fixed upstream
jamesfredley May 8, 2026
d3384e9
Merge branch 'grails8-groovy5-sb4' into grails8-groovy6-canary
jamesfredley May 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class CompilePlugin implements Plugin<Project> {
it.options.encoding = StandardCharsets.UTF_8.name()
it.options.fork = true
it.options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx2G']
it.options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
if (System.getenv('SUPPRESS_DEPRECATION_WARNINGS') == 'true') {
it.options.compilerArgs += ['-Xlint:-removal']
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,20 @@ class SbomPlugin implements Plugin<Project> {
'pkg:maven/com.oracle.coherence.ce/coherence-bom@25.03.1?type=pom': 'UPL-1.0', // does not have map based on license id
'pkg:maven/com.oracle.coherence.ce/coherence-bom@25.03.2?type=pom': 'UPL-1.0', // does not have map based on license id
'pkg:maven/com.oracle.coherence.ce/coherence-bom@22.06.2?type=pom': 'UPL-1.0', // does not have map based on license id
'pkg:maven/jline/jline@2.14.6?type=jar' : 'BSD-2-Clause', // maps incorrectly because of https://github.com/CycloneDX/cyclonedx-core-java/issues/205
'pkg:maven/jline/jline@2.14.6?type=jar' : 'BSD-2-Clause', // legacy jline:jline group, BSD-2; maps incorrectly because of https://github.com/CycloneDX/cyclonedx-core-java/issues/205
'pkg:maven/opensymphony/sitemesh@2.6.0?type=jar' : 'OpenSymphony', // custom license approved by legal LEGAL-707
'pkg:maven/org.antlr/antlr4-runtime@4.7.2?type=jar' : 'BSD-3-Clause', // maps incorrectly because of https://github.com/CycloneDX/cyclonedx-core-java/issues/205
'pkg:maven/org.jline/jansi@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline@3.30.6?type=jar' : 'BSD-3-Clause', // direct dependency declared at jline.version in dependencies.gradle
'pkg:maven/org.jline/jline-builtins@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline-console@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline-native@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline-reader@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline-style@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline-terminal@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline-terminal-jansi@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline-terminal-jna@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jline-terminal-jni@3.30.9?type=jar' : 'BSD-3-Clause', // jline group resolved at 3.30.9 transitively via groovy-groovysh; main org.jline:jline pinned at 3.30.6 directly
'pkg:maven/org.jline/jansi@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; cyclonedx misreports as BSD-4-Clause (cyclonedx-core-java#205); resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline@3.30.6?type=jar' : 'BSD-3-Clause', // jline 3.30.6 LICENSE at https://github.com/jline/jline3/blob/jline-parent-3.30.6/LICENSE.txt confirms BSD-3-Clause; direct dependency declared at jline.version in dependencies.gradle
'pkg:maven/org.jline/jline-builtins@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline-console@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline-console-ui@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline-native@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline-reader@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline-shell@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline-style@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline-terminal@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jline/jline-terminal-jni@4.0.12?type=jar' : 'BSD-3-Clause', // jline 4.0.12 LICENSE.txt at https://github.com/jline/jline3/blob/jline-parent-4.0.12/LICENSE.txt confirms BSD-3-Clause; resolved transitively via groovy-groovysh on Groovy 6
'pkg:maven/org.jruby/jzlib@1.1.5?type=jar' : 'BSD-3-Clause', // https://web.archive.org/web/20240822213507/http://www.jcraft.com/jzlib/LICENSE.txt shows it's a 3 clause
'pkg:maven/org.liquibase.ext/liquibase-hibernate5@4.27.0?type=jar': 'Apache-2.0', // maps incorrectly because of https://github.com/liquibase/liquibase/issues/2445 & the base pom does not define a license
]
Expand Down
6 changes: 3 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ext {
'commons-codec.version' : '1.21.0',
'commons-lang3.version' : '3.20.0',
'geb-spock.version' : '8.0.1',
'groovy.version' : '5.0.6-SNAPSHOT',
'groovy.version' : '6.0.0-SNAPSHOT',
'hibernate-groovy-proxy.version': '1.1',
'jakarta-servlet-api.version' : '6.1.0',
'jakarta-validation.version' : '3.1.1',
Expand Down Expand Up @@ -217,9 +217,9 @@ ext {
else if (project.name == 'grails-micronaut-bom') {
customBomVersions = [
// Keep aligned with bomDependencyVersions['groovy.version']; the main bom now uses
// Groovy 5, so the micronaut bom must match to avoid validateDependencyVersions
// Groovy 6, so the micronaut bom must match to avoid validateDependencyVersions
// failures from transitive dependencies upgrading groovy-bom past the pinned version.
'groovy.version' : '5.0.6-SNAPSHOT',
'groovy.version' : '6.0.0-SNAPSHOT',
'spock.version' : '2.4-groovy-5.0',
'protobuf.version': '4.30.2',
]
Expand Down
6 changes: 1 addition & 5 deletions gradle/functional-test-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ configurations.configureEach {
}
}

tasks.named('compileTestGroovy') {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

tasks.named('compileGroovy') {
tasks.withType(GroovyCompile).configureEach {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

Expand Down
4 changes: 4 additions & 0 deletions gradle/hibernate5-test-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ dependencies {
add('testRuntimeOnly', 'org.objenesis:objenesis')
}

tasks.withType(GroovyCompile).configureEach {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

tasks.withType(Test).configureEach {
// Honor DO_NOT_CACHE_TESTS=1 so developers can repeatedly invoke the same test command
// without --rerun-tasks (and without recompiling everything else).
Expand Down
4 changes: 4 additions & 0 deletions gradle/mongodb-forked-test-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ dependencies {
add('testRuntimeOnly', 'org.objenesis:objenesis')
}

tasks.withType(GroovyCompile).configureEach {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

tasks.named('compileTestGroovy', GroovyCompile) {
groovyOptions.forkOptions.jvmArgs = ['-Xmx768m']
}
Expand Down
4 changes: 4 additions & 0 deletions gradle/mongodb-test-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ dependencies {
add('testRuntimeOnly', 'org.objenesis:objenesis')
}

tasks.withType(GroovyCompile).configureEach {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

tasks.named('compileTestGroovy', GroovyCompile) {
groovyOptions.forkOptions.jvmArgs = ['-Xmx768m']
}
Expand Down
11 changes: 6 additions & 5 deletions gradle/test-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ dependencies {
add('testRuntimeOnly', 'org.objenesis:objenesis')
}

tasks.named('compileTestGroovy') {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

tasks.named('compileGroovy') {
// Disable Spock's compile-time Groovy version check on ALL Groovy compile
// tasks. Spock's SpockTransform is registered via META-INF services and
// the Groovy compiler loads every AST transform on the classpath, so even
// main source sets trip the version check when Groovy is newer than the
// Spock artifact's groovy variant.
tasks.withType(GroovyCompile).configureEach {
options.forkOptions.jvmArgs += ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import org.codehaus.groovy.classgen.GeneratorContext;
import org.codehaus.groovy.control.CompilationUnit;
import org.codehaus.groovy.control.SourceUnit;
import org.codehaus.groovy.runtime.DefaultGroovyMethods;
import org.codehaus.groovy.syntax.Token;
import org.codehaus.groovy.syntax.Types;
import org.codehaus.groovy.transform.trait.Traits;
Expand Down Expand Up @@ -267,12 +266,12 @@ private void processMethods(ClassNode classNode, SourceUnit source,
if (methodShouldBeConfiguredAsControllerAction(method)) {
final List<MethodNode> declaredMethodsWithThisName = classNode.getDeclaredMethods(method.getName());
if (declaredMethodsWithThisName != null) {
final int numberOfNonExceptionHandlerMethodsWithThisName = DefaultGroovyMethods.count((Iterable) declaredMethodsWithThisName, new Closure(this) {
@Override
public Object call(Object object) {
return !isExceptionHandlingMethod((MethodNode) object);
int numberOfNonExceptionHandlerMethodsWithThisName = 0;
for (MethodNode candidate : declaredMethodsWithThisName) {
if (!isExceptionHandlingMethod(candidate)) {
numberOfNonExceptionHandlerMethodsWithThisName++;
}
}).intValue();
}
if (numberOfNonExceptionHandlerMethodsWithThisName > 1) {
String message = "Controller actions may not be overloaded. The [" +
method.getName() +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import org.grails.datastore.mapping.model.types.ToOne
import org.grails.datastore.mapping.query.api.BuildableCriteria
import org.grails.datastore.mapping.query.api.Criteria
import org.grails.datastore.mapping.reflect.EntityReflector
import org.codehaus.groovy.runtime.InvokerHelper

/**
*
Expand Down Expand Up @@ -590,7 +591,7 @@ trait GormEntity<D> implements GormValidateable, DirtyCheckable, GormEntityApi<D
}

/**
* Retrieves an object from the datastore. eg. Book.get(1)
* Retrieves an object from the datastore. eg. {@code Book.get(1)}.
*/
@Generated
static D get(Serializable id) {
Expand Down Expand Up @@ -854,6 +855,10 @@ trait GormEntity<D> implements GormValidateable, DirtyCheckable, GormEntityApi<D
*/
@Generated
static Object staticPropertyMissing(String property) {
MetaProperty mp = InvokerHelper.getMetaClass(Class).hasProperty(this, property)
if (mp != null) {
return mp.getProperty(this)
}
try {
currentGormStaticApi().propertyMissing(property)
} catch (IllegalStateException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CommandSpec extends Specification {
pb.environment().put('JAVA_HOME', System.getenv('JAVA_HOME') ?: System.getProperty('java.home'))
pb.environment().put('GRAILS_REPO_URL', System.getenv('GRAILS_REPO_URL') ?: null)
process = pb.directory(dir).start()
process.consumeProcessOutputStream(output)
process.consumeProcessOutput(output, output)
process
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,21 @@ tasks.named('bootRun') {
}

@if (features.contains("spock")) {
// Spock 2.4-groovy-5.0 (managed by grails-bom while a Groovy 6-compatible
// Spock artifact is unreleased) refuses to load its compiler AST transform
// against Groovy 6 with IncompatibleGroovyVersionException. The runtime
// effect of this check is just a guard, so opt out on both the
// GroovyCompile classpath (where Spock's AST transform runs) and the Test
// JVM (where BeanBuilder.loadBeans() and similar compile Groovy at
// runtime). The flag is a no-op when Spock and Groovy major versions
// match, so it is safe to always set; remove this block once grails-bom
// pins a Spock artifact whose Groovy major matches groovy.version.
tasks.withType(GroovyCompile).configureEach {
options.forkOptions.jvmArgs = (options.forkOptions.jvmArgs ?: []) + ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
systemProperty 'spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true'
@if (features.contains("geb")) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,10 @@ trait Validateable {
* override semantics. Starting in Groovy 5, {@code TraitReceiverTransformer}
* rewrites {@code this.defaultNullable()} from another method inside the
* trait body to a direct call into the trait helper's static method,
* silently losing any implementing-class override.
* {@link java.lang.reflect.Method#invoke} is opaque to the transform so it
* dispatches to the implementing-class bytecode directly.
* silently losing any implementing-class override. The same regression
* is present in Groovy 6.0.0-SNAPSHOT. {@link java.lang.reflect.Method#invoke}
* is opaque to the transform so it dispatches to the implementing-class
* bytecode directly.
*
* Standalone reproducer:
* https://github.com/jamesfredley/groovy-trait-static-method-override-bug
Expand Down
Loading