jamesfredley commented on PR #15558: URL: https://github.com/apache/grails-core/pull/15558#issuecomment-4363810025
## Re-audit 2026-05-02 against Groovy 6.0.0-SNAPSHOT build #546 Pulled latest `grails8-groovy5-sb4` into the canary, resolved the two merge conflicts (`dependencies.gradle` keeping `groovy.version: 6.0.0-SNAPSHOT` while picking up base's new `hibernate-groovy-proxy` / `jakarta-servlet-api` / `jakarta-validation` / `junit` / `selenium 4.38.0` entries; `ContainerSupport.groovy` re-evaluated below), then re-checked every workaround against apache/groovy `master` HEAD `4654b1134b5c3f5d7a8277f150f16ae430521ad9` (2026-05-02 12:26 UTC) and the freshly-published `6.0.0-SNAPSHOT` build #546 (2026-05-02 11:47 UTC). ### Headline finding The three upstream PRs that the previous audit flagged as **OPEN** all merged on **2026-05-01**, after the previous canary baseline (build #518, 2026-04-27) was cut. Build #546 contains all three fixes: | JIRA | apache/groovy PR | Merged | Merge SHA | |---|---|---|---| | [GROOVY-11968](https://issues.apache.org/jira/browse/GROOVY-11968) | [#2495](https://github.com/apache/groovy/pull/2495) | 2026-05-01 03:40 UTC | `84f2f37c4f93d6ea44ad8bc76570704c84499c6b` | | [GROOVY-11967](https://issues.apache.org/jira/browse/GROOVY-11967) | [#2493](https://github.com/apache/groovy/pull/2493) | 2026-05-01 09:37 UTC | `406feaf5082f1741c318f924b520c4c27bfa0754` | | [GROOVY-11966](https://issues.apache.org/jira/browse/GROOVY-11966) | [#2492](https://github.com/apache/groovy/pull/2492) | 2026-05-01 18:58 UTC | `8dde1c84134ef6fdeecf26b5cbb5183d5aab4dac` | ### Workarounds removed in this push (5 sites, 1 commit: `2a5e983555`) - **`grails-geb/.../testFixtures/grails/plugin/geb/support/ContainerSupport.groovy`** - reverted from `@CompileDynamic` to `@CompileStatic` (GROOVY-11968 fix). The `Trait$Helper` static-setter VerifyError under `grailsIndy=false` no longer reproduces. - **`grails-datamapping-validation/.../DefaultConstraintFactory.groovy`** - collapsed the two-constructor split back to a single constructor with `List<Class> targetTypes = [Object]` (GROOVY-11967 fix). - **`grails-datamapping-core/.../MappingContextAwareConstraintFactory.groovy`** - same collapse. - **`grails-gsp/core/.../GroovyPageCompiler.groovy`** - dropped the parallelism guard, the `grails.gsp.compiler.parallelism` system property, the `computeGspCompilerParallelism()` helper and the `isGroovy6OrLater()` runtime probe; restored the original `Executors.newFixedThreadPool(availableProcessors() * 2)` and the matching `collationLevel` (GROOVY-11966 fix). 60 lines deleted. - **`grails-views-core/.../AbstractGroovyTemplateCompiler.groovy`** - same restoration; dropped the `grails.views.compiler.parallelism` system property. 59 lines deleted. Net diff: **5 files changed, 7 insertions(+), 146 deletions(-)**. ### Local verification Compiled all five touched modules under Java 21 / Groovy 6.0.0-SNAPSHOT build #546: ``` ./gradlew :grails-datamapping-validation:compileGroovy -> BUILD SUCCESSFUL ./gradlew :grails-datamapping-core:compileGroovy -> BUILD SUCCESSFUL ./gradlew :grails-gsp-core:compileGroovy -> BUILD SUCCESSFUL ./gradlew :grails-views-core:compileGroovy -> BUILD SUCCESSFUL ./gradlew :grails-geb:compileTestFixturesGroovy -> BUILD SUCCESSFUL ``` Runtime validation (parallel GSP / GSON template compilation surfacing the `ListHashMap.toMap` race; `ContainerGebSpec` class-init under `grailsIndy=false` exercising the trait-static-field VerifyError; validator constraint construction exercising the lower-arity bridge constructor VerifyError) is deferred to the canary CI matrix on this push. ### Workarounds re-evaluated and **kept** (no new upstream fix yet) Each was checked against the same build #546 / master HEAD; none has an upstream merge: 1. `grails-datamapping-core/.../GormEntityTransformation.groovy` - per-entity AST `Object get(String)` shim. `MetaClassImpl` `genericGetMethod` hijack on GORM entities. Reproducer: <https://github.com/jamesfredley/groovy6-get-as-generic-getter>. 2. `grails-validation/.../Validateable.groovy` - `resolveDefaultNullable(Class)` reflection dispatch. `TraitReceiverTransformer` static-method override loss. Reproducer: <https://github.com/jamesfredley/groovy-trait-static-method-override-bug>. 3. `grails-core/.../template/TemplateRendererImpl.groovy` + `grails-scaffolding/.../GenerateControllerCommand.groovy` - typed positional `render(Resource, File, Map, boolean)` instead of named-argument `render(Map)`. `@CompileStatic` overload resolution silent no-op on `render(Map)`. Reproducer: <https://github.com/jamesfredley/groovy5-compiledynamic-trait-bug>. 4. `grails-geb/.../testFixtures/grails/plugin/geb/ContainerGebConfiguration.groovy` - `IContainerGebConfiguration` as `trait` rather than `interface`. Interface `$getCallSiteArray()` `IncompatibleClassChangeError` under `grailsIndy=false`. Reproducer: <https://github.com/jamesfredley/groovy5-compiledynamic-trait-bug/blob/main/quick-checks/src/main/groovy/InterfaceDefaultsCheck.groovy>. 5. `grails-data-mongodb/core/.../PersistentEntityCodec.groovy` - two `ManyToMany.isAssignableFrom(...)` swaps. `@CompileStatic` smart-cast bug in the `else` branch of `if (cond && !(x instanceof Y))`. Reproducer: <https://github.com/jamesfredley/groovy5-compiledynamic-trait-bug/blob/main/quick-checks/src/main/groovy/SmartCastCheck.groovy>. 6. `grails-bootstrap/.../NavigableMap.groovy` - `containsKey + get` instead of `[]` operator. `ConfigObject` `[]` operator mutates on missing-key reads. 7. `grails-core/.../GrailsASTUtils.java`, `grails-datastore-core/.../AstUtils.groovy`, `grails-datamapping-core/.../AbstractMethodDecoratingTransformation.groovy`, `grails-rest-transforms/.../ResourceTransform.groovy` - try/catch around `VariableScopeVisitor` plus non-null `VariableScope` guard on `ClosureExpression`. `VariableScopeVisitor` NPE during canonicalisation on certain Grails AST transformation outputs. The four "no upstream PR yet" rows still need to be filed against apache/groovy with the standalone reproducers above. ### Heads-up: unrelated snapshot drift in build #546 While running local builds I hit one failure that is **not** caused by these removals and that I want to flag separately: ``` > Task :grails-data-hibernate5-core:compileGroovy .../HibernateConnectionSourceSettings.java:89: error: clone() in HibernateSettings cannot override clone() in HashMap @groovy.transform.Generated() public ...HibernateSettings clone() throws java.lang.CloneNotSupportedException { return null; } overridden method does not throw CloneNotSupportedException ``` The Groovy 6 stub generator now emits `throws java.lang.CloneNotSupportedException` on the `@Generated` `clone()` override of a class that `extends LinkedHashMap<String, String>`, but `LinkedHashMap.clone()` doesn't declare that exception, so `javac` rejects the stub. Confirmed by stashing my workaround removals: the failure reproduces against the merged state without my edits, so it's **a separate Groovy 6 SNAPSHOT regression that arrived between build #518 and build #546**, not a side effect of dropping these workarounds. Filing this as its own upstream issue is the right next step (likely a sibling of GROOVY-11823 / the `@Generated`-overrides-checked-exceptions family); for now `grails-data-hibernate5-core` will fail until the Groovy team revisits it or we add a narrowly-scoped workaround there. ### Files - Branch: `grails8-groovy6-canary` (head of #15558) - Canary commit: `2a5e983555` ("drop Groovy 6 workarounds whose upstream fixes have merged") - Merge commit: `367dad7213` (`grails8-groovy5-sb4` -> canary, conflicts: `dependencies.gradle`, `ContainerSupport.groovy`) - Snapshot baseline updated in PR description: build **#518** -> **#546** -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
