Skip to content

deps: bump Groovy to 6.0.0-RC-2 - #16300

Open
jamesfredley wants to merge 18 commits into
9.0.xfrom
deps/groovy-6.0.0-beta-3
Open

jamesfredley wants to merge 18 commits into
9.0.xfrom
deps/groovy-6.0.0-beta-3

Conversation

@jamesfredley

@jamesfredley jamesfredley commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrade 9.0.x from Groovy 6.0.0-beta-2 to 6.0.0-RC-2, retaining James Fredley’s class-value compatibility fixes and the changes already merged through #16342. The RC-2 bump and subsequent fixes remain separate commits.

RC-2 compatibility

  • Retain the class-value fixes in GrailsBanner, MongoDB testing support, and the OAuth2 service. Testing support passes the resolved class under test to Spring, and the SiteMesh mock uses a typed declaration. Compiler probes confirm RC-2 still rejects parameterized types and type variables used as runtime class values; generic declarations remain supported.
  • Remove three databinding logical-or guard hoists now that RC-2 fixes GROOVY-12393. Public binding regression tests cover existing instances, nested maps, and null elements.
  • Align the shared Ant pin with 1.10.18, the version resolved by RC-2, so BOM dependency validation passes without exclusions or overrides.

CI fixes

  • Async request cleanup: reset the worker’s thread-bound request state without removing servlet attributes owned by a dispatched request or touching a recycled servlet request. Two deterministic regression tests cover these cases.
  • Custom Geb drivers: perform scoped system-property lookups in a package-private Java helper. Groovy call-site initialization reads system properties and recursively entered the previous Groovy wrapper on both RC-1 and RC-2. The Firefox fixture covers property access from a fresh thread.
  • Groovydoc: serialize documentation tasks and run each in a fresh JVM, releasing parser and classloader memory between tasks. The shared Gradle heap still exhausted its memory with sequential execution alone. The child honors the Java launcher and memory limit and sets the Spock compatibility flag, including when Forge invokes an included build. Tests cover scheduling and real RC-2 HTML, formatting, and external links.
  • Canary: build Groovy’s GROOVY_6_0_X branch; master now publishes 7.0.0-SNAPSHOT.
  • Neo4j CI teardown: after two runs stalled following successful task completion, use --no-daemon and a bounded invocation. A 90-minute timeout is accepted only with a fresh success marker from the completed task graph; other failures remain failures. Ten command-line scenarios test these boundaries. All three current Neo4j jobs exited normally without timeout recovery.

Validation

The independent review found no actionable correctness issues and verified the retained Groovy fixes on RC-2. Its one cosmetic observation was addressed in isolated commit 7bc137f8f7, restoring the base test method name without changing its annotations or assertions. CI is validating that final head. Before this cleanup, head 3ecd2477e6 had 81 passing checks, 13 skipped, and none pending or failing. This includes core builds, functional tests, coverage, dependency validation, Forge, SiteMesh, and all Groovy canary shards.

Focused validation also passes: 65 build-logic tests plus plugin validation, 61 databinding tests, 14 async tests, testing-support and SiteMesh tests, and the custom Firefox fixture. Large aggregate and Hibernate documentation builds pass in CI.

The unchanged scaffolding login check required one rerun. Separate diagnostic runs passed, but did not establish its intermittent failure’s exact cause; no speculative login or security change is included.

AI assistance was used to investigate failures, implement changes, and prepare this description.

The BOM and every Groovy module follow groovy.version, including groovy-callsite.
Copilot AI lite review requested due to automatic review settings September 3, 2026 00:21

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.

🔵 Needs a closer look

A Groovy language version bump can have broad compile/runtime impact across many modules and should be validated by CI and targeted tests before approval.

Pull request overview

Updates the Grails framework BOM’s Groovy runtime pin on the 9.0.x line from 6.0.0-beta-2 to 6.0.0-beta-3, ensuring all Groovy modules (including groovy-callsite) follow the single managed version in dependencies.gradle.

Changes:

  • Bump groovy.version from 6.0.0-beta-2 to 6.0.0-beta-3 in the BOM version map.
File summaries
File Description
dependencies.gradle Updates the BOM-managed Groovy version to 6.0.0-beta-3.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dependencies.gradle Outdated
@bito-code-review

Copy link
Copy Markdown

The context provided is insufficient to identify the specific Jackson pin comment mentioned, as the InlineCode field is empty and no diff context was provided for that specific area. Please provide the relevant code snippet or diff hunk for the Jackson pin comment so I can assist with the update.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.3258%. Comparing base (f8477c6) to head (3ecd247).

Files with missing lines Patch % Lines
...testing/mongo/StartMongoGrailsUnitExtension.groovy 0.0000% 1 Missing ⚠️
.../grails/web/databinding/GrailsWebDataBinder.groovy 66.6667% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                9.0.x     #16300        +/-   ##
==================================================
+ Coverage     56.2445%   56.3258%   +0.0813%     
- Complexity      21773      21792        +19     
==================================================
  Files            2155       2155                
  Lines          102954     102951         -3     
  Branches        18228      18225         -3     
==================================================
+ Hits            57906      57988        +82     
+ Misses          37073      36965       -108     
- Partials         7975       7998        +23     
Files with missing lines Coverage Δ
...grails/plugins/web/async/GrailsAsyncContext.groovy 57.6923% <100.0000%> (+57.6923%) ⬆️
...re/src/main/groovy/grails/boot/GrailsBanner.groovy 75.0000% <100.0000%> (ø)
.../groovy/grails/util/AbstractTypeConvertingMap.java 81.2500% <ø> (ø)
.../grails/testing/ParameterizedGrailsUnitTest.groovy 0.0000% <ø> (ø)
...testing/mongo/StartMongoGrailsUnitExtension.groovy 45.6522% <0.0000%> (ø)
.../grails/web/databinding/GrailsWebDataBinder.groovy 37.8840% <66.6667%> (+7.8330%) ⬆️

... and 8 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.

Hoist remaining `||` collection-binding guards so static type checking no
longer infers void on ArrayList#leftShift. Document that Groovy 6 routes
Map subscript assignment through Map.put. Parse prerelease groovy.version
pins in the snapshot canary so it targets Groovy 6 instead of the Micronaut
island's Groovy 5 pin. Update Jackson pin comments from beta-2 to beta-3.
@jamesfredley

Copy link
Copy Markdown
Contributor Author

Addressed Copilot's Jackson pin comment and the shared CI failures on this Groovy 6.0.0-beta-3 bump:

  • Jackson comments now say Groovy YAML 6.0.0-beta-3.
  • :grails-web-databinding:compileGroovy — hoisted the remaining || collection-binding guard so STC no longer treats item as void.
  • :grails-taglib:test — Groovy 6 routes Map subscript assignment through Map.put. Dotted assignment still hits setGspTagSyntaxCall(boolean); the tests now cover both.
  • Groovy snapshot canary — the version regex skipped 6.0.0-beta-3 and fell through to the Micronaut island's Groovy 5 pin, which is why CI looked for groovy-callsite:5.0.9-SNAPSHOT. It now parses prerelease pins and targets Groovy 6 master.

Pushed as 19be0dd580. Copilot thread resolved.

The BOM and every Groovy module follow groovy.version, including groovy-callsite.

GROOVY-12319 no longer treats parameterized types as class literals, so
GrailsBanner, StartMongoGrailsUnitExtension, and the OAuth2 roleNames
lookup pass the raw List/Map types. GROOVY-12303 stops groovydoc from
aborting on missing jboss-logging during ClassNodeResolver lookup.
@jamesfredley jamesfredley changed the title deps: bump Groovy to 6.0.0-beta-3 deps: bump Groovy to 6.0.0-RC-1 Sep 9, 2026
Resolve the overlapping canary parser, taglib test, and databinding changes using the RC-1 branch versions while retaining incoming 9.0.x updates.

Validation: conflict and whitespace checks passed; canary parser resolves RC-1 to 6_0. Full validation encountered the existing ParameterizedGrailsUnitTest type-parameter compiler error. Passing-check requirement waived by the requester for this conflict-resolution merge.
Pass the resolved class under test to Spring bean lookup and declare the SiteMesh decorator mock with a typed variable. Groovy 6 RC-1 rejects generic type parameters and parameterized types used as class values.

Add ServiceUnitTest regression coverage for bean identity, autowiring, and instance reuse. Testing-support core passed 11 tests; SiteMesh passed 82 tests; all four violation reports are clean. The repository-wide local run was stopped at the requester's direction; full validation is delegated to GitHub Actions.
Keep the existing Groovy 6 compatibility fixes and align the dependency comments. Full validation runs in GitHub Actions at the requester’s direction; local diff checks pass.
@codeconsole codeconsole changed the title deps: bump Groovy to 6.0.0-RC-1 deps: bump Groovy to 6.0.0-RC-2 Sep 15, 2026
GROOVY-12393 fixes static type inference after inline logical-or guards. Restore the direct conditions in the array, collection, and map branches. Add public binding tests for existing instances, nested maps, and null elements.

Verified the original guard fails on RC-1 and passes on RC-2. All 61 grails-web-databinding tests and its codeStyle task pass. Broad validation is delegated to CI at the requester’s direction.
RC-2 resolves ant and ant-junit 1.10.18, exceeding the BOM-managed 1.10.17 and failing CI dependency validation. Bump the shared Ant pin to the resolved version. grails-core:validateDependencyVersions passes locally; full validation runs in CI.
An async worker can finish after dispatch or completion has transferred the request to another thread or recycled it. Unbind only the worker thread instead of removing the servlet request attribute. Always unbind even if requestCompleted throws.

Both new lifecycle tests fail before the fix; all 14 grails-async tests and module codeStyle pass afterward. This addresses the recycled RequestFacade trace seen alongside the SiteMesh async rendering failure. Full functional verification runs in CI.
@testlens-app

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants