Skip to content

fix(forge): keep the Grails Data plugin off the generated buildscript classpath - #16575

Merged
jdaugherty merged 2 commits into
8.0.xfrom
fix/forge-grails-data-buildscript-classpath
Oct 16, 2026
Merged

jdaugherty merged 2 commits into
8.0.xfrom
fix/forge-grails-data-buildscript-classpath

Conversation

@borinquenkid

@borinquenkid borinquenkid commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

What

Grails Forge no longer adds grails-data-hibernate5 / grails-data-hibernate7 to the generated build.gradle buildscript classpath (nor to buildSrc). The plugin stays an ordinary application dependency. GrailsDataHibernate5/7 features and their specs are updated; whatsNew and the 8.0.x upgrade guide (§86) gain a note telling existing builds to drop the entry.

Why

The entry was a leftover from when the CLI found a plugin's commands through the build classpath; commands now ship in companion -cli artifacts that the Grails Gradle plugin discovers from the application's dependencies. With the plugin on the buildscript classpath, grails-datamapping-core's global AST transformations run inside the Groovy that Gradle embeds while compiling build.gradle; once those transformations are compiled by Groovy 6 that fails at configuration time (NoSuchMethodError ... NumberMath.remainder, seen in the Build Grails Forge job: CreateDomainClassCommandSpec and the other command specs).

This is independent of the Java-to-Groovy migration (#16351) but surfaced while splitting it. The buildscript entry has been generated since 8.0.x and the Grails Gradle plugin on every 8.x branch already discovers commands from the application's dependencies, so the fix targets 8.0.x and merges up.

Verification

  • Cherry-pick of the fix verified on the migration branch; the Forge build is a separate Gradle build and its specs are run by the Forge CI job (no local test run).

🤖 Generated with Claude Code

@borinquenkid
borinquenkid requested review from jamesfredley and jdaugherty and a balanced review from Copilot October 10, 2026 19:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.9855%. Comparing base (c948a63) to head (a9b6541).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                9.0.x     #16575        +/-   ##
==================================================
- Coverage     60.9953%   60.9855%   -0.0099%     
+ Complexity      26642      26640         -2     
==================================================
  Files            2249       2249                
  Lines          111561     111561                
  Branches        20207      20207                
==================================================
- Hits            68047      68036        -11     
- Misses          34527      34537        +10     
- Partials         8987       8988         +1     

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@testlens-app

This comment has been minimized.

jdaugherty added a commit that referenced this pull request Oct 16, 2026
…ert buildSrc still renders, reword the feature comments
borinquenkid and others added 2 commits October 16, 2026 12:25
… classpath

Generated builds declared grails-data-hibernate5/7 as a buildscript classpath
entry (and a buildSrc implementation dependency), a leftover from when the CLI
found plugin commands through the build classpath; commands now ship in the
companion -cli artifacts the Grails Gradle plugin discovers from the
application's dependencies. The plugin pulls in grails-datamapping-core, which
registers global AST transformations, so Gradle's embedded Groovy 4 ran them
while compiling build.gradle. With the transformations now compiled by Groovy
6 that fails at configuration time (NoSuchMethodError NumberMath.remainder,
Build Grails Forge job: CreateDomainClassCommandSpec and the other command
specs); with the Java-compiled transformations it merely ran them for nothing.

The plugin stays an application dependency only. The upgrade guide tells
existing builds to drop the classpath entry and names the symptom.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 7322d81)
…or, place the What's New note with it, assert buildSrc still renders, reword the feature comments
@jdaugherty
jdaugherty force-pushed the fix/forge-grails-data-buildscript-classpath branch from 945b132 to 71a64db Compare October 16, 2026 16:36
@jdaugherty
jdaugherty changed the base branch from 9.0.x to 8.0.x October 16, 2026 16:36
@jdaugherty
jdaugherty changed the base branch from 8.0.x to 8.1.x October 16, 2026 16:39
@jdaugherty
jdaugherty changed the base branch from 8.1.x to 8.0.x October 16, 2026 16:39
@jdaugherty
jdaugherty merged commit 0808279 into 8.0.x Oct 16, 2026
@jdaugherty
jdaugherty deleted the fix/forge-grails-data-buildscript-classpath branch October 16, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants