jamesfredley commented on PR #15557:
URL: https://github.com/apache/grails-core/pull/15557#issuecomment-4844629871

   ### GROOVY-12117: tested the dedicated transform-order fix locally - GraphQL 
inline must stay
   
   The `withDelegate` trait-static gap now has its own ticket, 
[GROOVY-12117](https://issues.apache.org/jira/browse/GROOVY-12117) ("resolution 
of inherited static trait method from sub-trait body is transform-order 
dependent"), and the fix landed on `GROOVY_5_0_X` as commit `fcab925d21`. The 
Apache snapshot publish for it failed in CI ([run 
28402000859](https://github.com/apache/groovy/actions/runs/28402000859/job/84155342637)),
 so it never reached `repository.apache.org` - the published `5.0.7-SNAPSHOT` 
(build 19, `5.0.7-20260629.205749-19`) does **not** contain it. I therefore 
tested the fix from a local build.
   
   **What I did:**
   
   - Checked out `GROOVY_5_0_X` tip at `fcab925d21` (the GROOVY-12117 fix) and 
`./gradlew publishToMavenLocal` (5.0.7-SNAPSHOT).
   - Purged every `org.apache.groovy:*:5.0.7-SNAPSHOT` artifact from the Gradle 
cache so nothing remote could shadow it.
   - Removed the `Arguable` / `ComplexTyped` inline and restored the plain 
`withDelegate(closure, (Object)…)` call.
   - Compiled with `GRAILS_INCLUDE_MAVEN_LOCAL=1`, which puts `mavenLocal()` 
first in dependency resolution. Confirmed via `dependencyInsight` + an empty 
remote-snapshot cache that groovy resolved from mavenLocal (the fix build).
   
   **Result:**
   
   | Configuration (groovy = local `fcab925d21` build) | 
`:grails-data-graphql-core:compileGroovy` |
   |---|---|
   | Workaround removed (plain `withDelegate(closure, (Object)…)`) | **FAILS** 
- `Cannot find matching method Arguable#withDelegate(Closure, Object)` / 
`ComplexTyped#withDelegate(Closure, Object)` |
   | Workaround kept (inline `DELEGATE_ONLY`) | **compiles green** |
   
   So the GROOVY-12117 fix, as it currently stands on `GROOVY_5_0_X`, still 
does not cover the Grails sub-trait-before-super-trait module layout 
(`Arguable`/`ComplexTyped` sort alphabetically before `ExecutesClosures`, so 
they are transformed before the super-trait's `$Trait$Helper` exists and 
`TraitReceiverTransformer` skips the rewrite the fixed STC branch keys off). 
The inline workaround stays for now.
   
   Updated the workarounds table at the top of the PR and the in-code `// 
GROOVY-12117` markers to cite this ticket and the local-build verification. The 
inline can drop to the byte-identical `8.0.x` `withDelegate(closure, 
(Object)…)` call once GROOVY-12117 is fixed for the transform-order case and a 
fixed snapshot publishes.
   
   Assisted-by: claude-code:claude-4.8-opus
   


-- 
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]

Reply via email to