Skip to content

Micronaut island is excluded from Groovy 6 builds, making Groovy 6 snapshots incomplete #16161

Description

@jamesfredley

The Micronaut island is excluded from any build whose root Groovy version is not Groovy 5. On a Groovy 6 build - such as the Grails 9 / Groovy 6 canary (#15558) and any Groovy 6 snapshot produced from it - the following are silently dropped from the build and therefore absent from published artifacts:

  • grails-micronaut-bom
  • the Micronaut-dependent modules in the island
  • the grails-test-examples that consume grails-micronaut-bom

Why

settings.gradle gates the island on both the build JDK and the Groovy major version:

def buildGroovyVersionLine = file('dependencies.gradle').readLines().find { it.contains("'groovy.version'") }
def buildGroovySupportsMicronaut = buildGroovyVersionLine?.contains("'5.") ?: false
def skipMicronautProjects = explicitlySkipMicronaut ||
        ((!buildJdkSupportsMicronaut || !buildGroovySupportsMicronaut) && !explicitlyIncludeMicronaut)

The island builds against the Micronaut 5 platform, which pins Groovy 5 and Spock 2.4-groovy-5.0, so it cannot participate in the same build graph as a different root Groovy major. It also targets JVM 25 bytecode, which is the separate pre-existing reason it is excluded on a sub-25 JDK.

The gate is deliberate and correct as a stopgap: without it, a Groovy 6 build fails outright on the island's Groovy 5 constraints. But it means a Groovy 6 build is quietly incomplete rather than failing loudly.

What needs to happen

Someone needs to work out how the Micronaut island can participate in a Groovy 6 build, or how Grails should ship without it on that line. Open questions:

  1. Does the Micronaut 5 platform work on Groovy 6 at all, or does it need a Micronaut release built against Groovy 6?
  2. If the island cannot move, should grails-micronaut-bom and the Micronaut modules be published from a separate Groovy 5 build so Groovy 6 snapshots are still complete?
  3. Should a Groovy 6 build FAIL loudly when the island is skipped, instead of silently excluding it, so the incompleteness is not discovered downstream?
  4. The island also pins Spock 2.4-groovy-5.0, which is incompatible with Groovy 6 independently of Micronaut - see Groovy 6 compatibility: changes required in Grails, and when each can be removed #16157 for the Spock situation.

Workaround

-PincludeMicronautProjects force-includes the island on any JDK and any Groovy version. It is expected to fail on a Groovy 6 build; it exists for deliberate experimentation.

Context

Raised while preparing #15558 (Grails 9 on Groovy 6.0.0-beta-2). Groovy 6 RC1 is expected shortly, so Grails 9 needs a position on this. Accepting the exclusion is a conscious decision for now, and this issue records what was deferred rather than leaving it implicit in a settings.gradle predicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions