Skip to content

Upgrade to Groovy 6 and fix test compatibility - #3470

Open
wborn wants to merge 1 commit into
mainfrom
groovy-6
Open

wborn wants to merge 1 commit into
mainfrom
groovy-6

Conversation

@wborn

@wborn wborn commented Oct 22, 2026

Copy link
Copy Markdown
Member

Description

Upgrade Groovy to 6.0.0, Spock to 2.5-groovy-6.0, and iCal4j to 4.4.0.

  • Add the groovy-callsite dependency for compatibility with iCal4j's legacy Groovy extensions.
  • Replace wildcard generic type arguments in constructor calls with the diamond operator.
  • Move JUL logging initialization from ContainerTrait's static initializer to the Spock TestFixture extension to avoid initialization failures with Groovy 6.

Groovy 6 release notes:
https://groovy-lang.org/releasenotes/groovy-6.0.html

Checklist

  • 1. Acceptance criteria of the linked issue(s) are met
  • 2. Tests are written and all tests pass
  • 3. Changes are manually tested by you and the reviewer
  • 4. Documentation is written or updated

@wborn
wborn requested a review from a team October 22, 2026 14:57
@wborn wborn added dependencies Pull requests that update a dependency file java Pull requests that update java code labels Oct 22, 2026
Upgrade Groovy to 6.0.0, Spock to 2.5-groovy-6.0, and iCal4j to 4.4.0.

- Add the groovy-callsite dependency for compatibility with iCal4j's legacy Groovy extensions.
- Replace wildcard generic type arguments in constructor calls with the diamond operator.
- Move JUL logging initialization from ContainerTrait's static initializer to the Spock TestFixture extension to avoid initialization failures with Groovy 6.

Groovy 6 release notes:
https://groovy-lang.org/releasenotes/groovy-6.0.html
@sonarqubecloud

Copy link
Copy Markdown

Comment thread gradle/libs.versions.toml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⚠️ This is an AI-assisted comment ⚠️

Rulesets recompile under Groovy 6. Groovy rules are compiled at runtime (RulesetDeployment), so existing user rules silently get Groovy 6 semantics: key in map is now key-based, for-in closure capture is per-iteration, unmatched switch expressions throw instead of returning null, val is now a keyword.
Please add release notes + the -Dgroovy.* porting flags.

Comment thread gradle/libs.versions.toml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⚠️ This is an AI-assisted comment ⚠️

iCal4j 4.4.0 changes recurrence results ("missing yearly recurrences for UTC DTSTART", "recurrence counts with repeated selectors"). Schedules/validity windows can shift. → please test yearly RRULEs and UNTIL cases.

@MartinaeyNL MartinaeyNL added the Breaking Change Indicates that a PR includes a breaking change label Oct 26, 2026
@MartinaeyNL
MartinaeyNL requested a review from a team October 26, 2026 13:47
@MartinaeyNL

Copy link
Copy Markdown
Member

Not sure if this touches with any work @ebariaux was doing for the Groovy sandboxing?

@MartinaeyNL
MartinaeyNL requested a review from ebariaux October 26, 2026 13:48
@MartinaeyNL

Copy link
Copy Markdown
Member

Maybe it's also worth to test several custom-project Groovy rules with version 6, to see if the breaking changes are major.
Just so we're aware of how much time it will take to migrate over.

This branch has not been deployed

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

Labels

Breaking Change Indicates that a PR includes a breaking change dependencies Pull requests that update a dependency file java Pull requests that update java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants