The GitHub Actions job "CI" on 
grails-core.git/fix/compile-static-service-injection has failed.
Run started by GitHub user jamesfredley (triggered by jamesfredley).

Head commit for run:
3a7c0f99a576f45f32336e13e16e6d3e64842fa3 / James Fredley 
<[email protected]>
fix: remove @CompileStatic-incompatible lazy getters from @Service abstract 
classes

ServiceTransformation generated lazy getters on abstract class PropertyNodes
that referenced varX('datastore') — a field only present on the generated
$ServiceImplementation class. Under @CompileStatic, this caused:
1. Unresolvable variable reference (datastore field not in abstract class scope)
2. StaticTypeCheckingVisitor 'Unexpected return statement' in property getter 
blocks

Fix: Remove lazy getter block from abstract class PropertyNodes entirely. The
generated setDatastore() method on the impl class already eagerly populates all
@Service-typed properties during initialization, making the lazy fallback 
redundant.

Adds 6 Spock tests covering:
- @CompileStatic + single/multiple @Service-typed properties
- @CompileStatic + custom methods with complex return statements
- Regression: dynamic mode still works
- Regression: no datastore infrastructure when no @Service-typed properties
- Impl class has correct setDatastore/getDatastore/datastore field

Report URL: https://github.com/apache/grails-core/actions/runs/22085939333

With regards,
GitHub Actions via GitBox

Reply via email to