The GitHub Actions job "CI" on grails-core.git/grails8-groovy6-canary has 
failed.
Run started by GitHub user jamesfredley (triggered by jamesfredley).

Head commit for run:
7156ed8e3a588fe47c2c77da37425d7dc7ab8565 / James Fredley 
<[email protected]>
fix(ci): resolve 3 of 4 distinct CI failure categories on grails8-groovy6-canary

Four mechanical fixes addressing CI failures observed on the merged
canary branch. Each is scoped to the smallest change that restores the
failing job to green; all were verified locally on
Groovy 6.0.0-SNAPSHOT / JDK 21 / Windows before committing.

1. Code Style / Forge Projects: `org.jline:[email protected]` license

   `:grails-core:grails-shell-cli:cyclonedxDirectBom` and the same task
   in `:grails-console` and `:grails-dependencies-starter-web` failed
   with:

       Unpermitted License found for bom dependency:
       pkg:maven/org.jline/[email protected]?type=jar : BSD-4-Clause

   jline 4.1.0 LICENSE.txt
   (https://github.com/jline/jline3/blob/jline-parent-4.1.0/LICENSE.txt)
   confirms BSD-3-Clause. CycloneDX misreports as BSD-4-Clause per
   cyclonedx-core-java#205, identical to the existing 4.0.12 entry
   already in `SbomPlugin.LICENSE_MAPPING`. Added the 4.1.0 entry with
   the same justification.

   Verified

       .\gradlew :grails-shell-cli:cyclonedxDirectBom    # BUILD SUCCESSFUL

2. Validate Dependency Versions: asm 9.10 vs 9.9.1 in 4 micronaut
   test-examples

   `:grails-test-examples-micronaut:validateDependencyVersions` and the
   same task in `-micronaut-groovy-only`, `-issue-11767`, and
   `-plugins-micronaut-singleton` failed with:

       org.ow2.asm:asm - resolved 9.10, expected 9.9.1
       org.ow2.asm:asm-util - resolved 9.10, expected 9.9.1

   Groovy 6.0.0-SNAPSHOT requires asm 9.10 (for JDK 27 bytecode
   support); Spring Boot 4 / Micronaut platform's BOM pin is still
   9.9.1. The divergence is intentional on this canary.

   Added `ext.allowedBomOverrides = ['org.ow2.asm:asm', 'org.ow2.asm:asm-util']`
   to each of the 4 affected projects' `build.gradle`. This uses the
   existing contract documented on
   `GrailsDependencyValidatorPlugin.ALLOWED_OVERRIDES_EXT`.

   Verified

       .\gradlew :grails-test-examples-micronaut:validateDependencyVersions     
  \
                 
:grails-test-examples-micronaut-groovy-only:validateDependencyVersions \
                 :grails-test-examples-issue-11767:validateDependencyVersions   
  \
                 
:grails-test-examples-plugins-micronaut-singleton:validateDependencyVersions
       # BUILD SUCCESSFUL

3. Code Style / Core Projects: `TemplateRenderer.groovy` 5 abstract
   render() methods

   `:grails-views-gson:compileGroovy` failed at
   `TemplateRenderer.groovy:33` with 5 errors of the form:

       Can't have an abstract method in a non-abstract class. The class
       'grails.plugin.json.view.api.internal.TemplateRenderer' must be
       declared abstract or the method
       'grails.plugin.json.builder.JsonOutput$JsonWritable 
render(java.util.Map)'
       must be implemented.

   (+ 4 more `render(...)` overloads, all returning the inner abstract
   class `JsonOutput.JsonWritable`.)

   Under Groovy 6.0.0-SNAPSHOT + `@CompileStatic`, the `@Delegate` AST
   transform on `GrailsJsonViewHelper jsonViewHelper` does not satisfy
   the abstract-method-implementation check for interface methods whose
   return type is an inner abstract class. The 5 `inline(...)`
   overloads return void and are unaffected, so `@Delegate` still
   handles them.

   Added explicit forwarders for the 5 `GrailsJsonViewHelper#render(...)`
   overloads, each one a single-line delegate to `jsonViewHelper`.
   Behaviour is identical to what `@Delegate` generates on Groovy 5.

   This fix surfaces the next compile error in `grails-views-gson` at
   `DefaultGrailsJsonViewHelper.groovy:67`, which is the same class of
   Groovy 6 STC bug applied to a class that inherits from
   `DefaultJsonViewHelper` and implements `GrailsJsonViewHelper`. That
   one does not yield to the same fix (explicit overloads, fully
   qualified return types, removing @CompileStatic from the interface
   were all attempted and rejected); it is deferred as a follow-up
   workaround item on this PR.

   Verified

       .\gradlew :grails-views-gson:compileGroovy
       # progresses past TemplateRenderer; now fails at 
DefaultGrailsJsonViewHelper

4. Build Grails-Core: `BeanPropertyAccessorImpl` Map constructor

   `:grails-fields:compileGroovy` failed at
   `BeanPropertyAccessorFactory.groovy:83` with:

       Target constructor for constructor call expression hasn't been set

   The call site is `new BeanPropertyAccessorImpl(params)` where
   `params` is a `Map<String, Object>`. The target class is annotated
   `@Canonical @TupleConstructor(includes = [...])`. Under Groovy 6
   `@Canonical` no longer implicitly includes `@MapConstructor` under
   `@CompileStatic`, so the named-arg call site can't bind to a
   constructor.

   Declared `@MapConstructor` explicitly. Restores the Groovy 4 / 5
   behaviour without changing the positional `@TupleConstructor` or the
   `@Canonical`-generated toString / equals / hashCode contract.

   Verified

       .\gradlew :grails-fields:compileGroovy    # BUILD SUCCESSFUL

Remaining CI failures after this commit

The merge of grails8-groovy5-sb4 + these 4 fixes also fixes the
graphql-java 24.3 vs 25.0 BOM mismatch (2 docs projects) and the 3
`cyclonedxDirectBom` license failures (all sites resolve via the
single `LICENSE_MAPPING` entry). The remaining red CI category is the
`DefaultGrailsJsonViewHelper`-flavoured Groovy 6 STC bug on
`grails-views-gson`, which will cascade into the Build Grails-Core /
Functional Tests / Mongodb / Hibernate5 matrix until it is resolved.
The test failures (`:grails-core:test`,
`:grails-testing-support-http-client:test`) are post-compile and
expected to clear once the views-gson compile is restored.

Assisted-by: claude-code:claude-opus-4-7

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

With regards,
GitHub Actions via GitBox

Reply via email to