GROOVY-11907: SC: trait static field helper generates invalid bytecod…#2443
Open
paulk-asert wants to merge 1 commit intoapache:GROOVY_5_0_Xfrom
Open
GROOVY-11907: SC: trait static field helper generates invalid bytecod…#2443paulk-asert wants to merge 1 commit intoapache:GROOVY_5_0_Xfrom
paulk-asert wants to merge 1 commit intoapache:GROOVY_5_0_Xfrom
Conversation
…e when method-level DYNAMIC_RESOLUTION is present (GROOVY-11817 regression)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## GROOVY_5_0_X #2443 +/- ##
======================================================
- Coverage 67.1318% 67.1304% -0.0014%
+ Complexity 29431 29430 -1
======================================================
Files 1382 1382
Lines 116800 116804 +4
Branches 20473 20474 +1
======================================================
+ Hits 78410 78411 +1
+ Misses 31905 31904 -1
- Partials 6485 6489 +4
🚀 New features to boost your workflow:
|
jamesfredley
added a commit
to apache/grails-core
that referenced
this pull request
Apr 6, 2026
Groovy 5.0.4+ bundles ASM 9.9.1 which rejects the invalid bytecode generated by TraitReceiverTransformer for @CompileStatic traits with static fields when method-level DYNAMIC_RESOLUTION is present (GROOVY-11907, a regression from GROOVY-11817). The only affected trait in grails-geb testFixtures is ContainerSupport (static fields: container, downloadSupport). Switch it from @CompileStatic to @CompileDynamic so its helper class compiles via the dynamic code path, which generates valid bytecode. ContainerGebSpec retains @CompileStatic - its delegate stubs are simple forwarding calls unaffected by the bug. This unblocks the Groovy 5.0.3 -> 5.0.5 upgrade. Revert to @CompileStatic once the Groovy fix (apache/groovy#2443) ships. Assisted-by: Claude Code <Claude@Claude.ai>
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.
…e when method-level DYNAMIC_RESOLUTION is present (GROOVY-11817 regression)