jamesfredley commented on PR #15557: URL: https://github.com/apache/grails-core/pull/15557#issuecomment-4192335002
## Groovy 5.0.5 unblocked — GROOVY-11907 workaround applied Commit `708e03c` bumps Groovy from 5.0.3 back to **5.0.5** by working around [GROOVY-11907](https://issues.apache.org/jira/browse/GROOVY-11907) on the Grails side. ### Root cause Paul King identified the grails-geb testFixtures compilation failure as [GROOVY-11907](https://issues.apache.org/jira/browse/GROOVY-11907) — a regression from [GROOVY-11817](https://issues.apache.org/jira/browse/GROOVY-11817) where `TraitReceiverTransformer` generates invalid bytecode for `@CompileStatic` traits with static fields when method-level `DYNAMIC_RESOLUTION` is present. The Groovy fix is in [apache/groovy#2443](https://github.com/apache/groovy/pull/2443) (open, not yet merged). ### What changed (temporary workaround) The only affected code in grails-core is the `ContainerSupport` trait (`grails-geb/src/testFixtures/`), which has two static fields (`container`, `downloadSupport`) and was annotated with `@CompileStatic`. Switching it to `@CompileDynamic` makes its trait helper class compile via the dynamic code path, which generates valid bytecode that ASM 9.9.1 accepts. The implementing class `ContainerGebSpec` keeps `@CompileStatic` — its delegate stubs are simple forwarding calls unaffected by the bug. **This is a temporary workaround.** Once [apache/groovy#2443](https://github.com/apache/groovy/pull/2443) ships in a Groovy release, `ContainerSupport` should be restored to `@CompileStatic`. ### Verification `./gradlew :grails-geb:compileTestFixturesGroovy` passes cleanly on Groovy 5.0.5 with this change (BUILD SUCCESSFUL, 118 tasks). -- 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]
