Skip to content

Commit 12867f8

Browse files
authored
Merge pull request #15829 from apache/cleanup/8.0-h7-todo-doc-cleanup
Clean up Grails 8 Hibernate 7 TODO drift
2 parents 3ee8f5a + 7eb91ad commit 12867f8

32 files changed

Lines changed: 61 additions & 83 deletions

File tree

‎.agents/skills/grails-developer/SKILL.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more contributor l
1313

1414
- Provide detailed guidance for building current Grails web applications and REST APIs.
1515
- Assist with GORM for data modeling, controllers for request handling, services for business logic, and views (GSP, JSON, Markup).
16-
- Support testing with Spock 2.3 (unit/integration tests) and Geb for browser automation.
16+
- Support testing with Spock 2.4 (unit/integration tests) and Geb for browser automation.
1717
- Guide plugin usage and development, security implementation, and deployment strategies.
1818
- Help with configuration, internationalization, async programming, and performance optimization.
1919

@@ -31,11 +31,11 @@ Activate this skill when developing with current Grails, including:
3131
## Technology Stack
3232

3333
Current Grails is built on:
34-
- **Spring Boot**: 4.0.x
34+
- **Spring Boot**: 4.1.x
3535
- **Spring Framework**: 7.0.x
36-
- **Groovy**: 4.0.x
37-
- **Gradle**: 8.14.x
38-
- **Spock**: 2.3-groovy-4.0
36+
- **Groovy**: 5.0.x
37+
- **Gradle**: 9.6.x
38+
- **Spock**: 2.4-groovy-5.0
3939
- **Jakarta EE**: 10 (migrated from javax.*)
4040
- **Micronaut**: Optional via `grails-micronaut` plugin
4141

@@ -865,6 +865,6 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
865865
- **Grails User Guide**: https://grails.apache.org/docs/latest/guide/single.html
866866
- **GORM Documentation**: https://grails.apache.org/docs/latest/grails-data/
867867
- **Grails Plugins**: https://grails.apache.org/plugins.html
868-
- **Groovy 4 Documentation**: https://docs.groovy-lang.org/docs/groovy-4.0.30/html/documentation/
869-
- **Spock Framework**: https://spockframework.org/spock/docs/2.3/all_in_one.html
868+
- **Groovy 5 Documentation**: https://docs.groovy-lang.org/docs/groovy-5.0.7/html/documentation/
869+
- **Spock Framework**: https://spockframework.org/spock/docs/2.4/all_in_one.html
870870
- **Geb Manual**: https://groovy.apache.org/geb/manual/current/

‎.agents/skills/groovy-developer/SKILL.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: groovy-developer
3-
description: Expert guide for Groovy 4 development, covering concise syntax, closures, DSLs, metaprogramming, static compilation, and integration with Java 17 and Grails
3+
description: Expert guide for Groovy 5 development, covering concise syntax, closures, DSLs, metaprogramming, static compilation, and integration with Java 21 and Grails
44
license: Apache-2.0
55
---
66
<!--
@@ -11,11 +11,11 @@ Licensed to the Apache Software Foundation (ASF) under one or more contributor l
1111

1212
## What I Do
1313

14-
- Provide deep expertise in Groovy 4.0, including core language features: syntax, closures, traits, GStrings, operators, and Groovy Truth.
14+
- Provide deep expertise in Groovy 5.0, including core language features: syntax, closures, traits, GStrings, operators, and Groovy Truth.
1515
- Guide metaprogramming techniques: runtime (categories, ExpandoMetaClass, extension modules) and compile-time (AST transformations like @Immutable, @Builder, @Delegate, @Singleton, @Log, @Memoized).
1616
- Assist with DSL creation and usage (MarkupBuilder, JsonBuilder, builders for configuration).
1717
- Support testing with Spock Framework (BDD, data-driven tests, mocking) and built-in power assertions.
18-
- Help integrate Groovy with Java 17: joint compilation, Gradle builds, Grails, and Spring Boot.
18+
- Help integrate Groovy with Java 21: joint compilation, Gradle builds, Grails, and Spring Boot.
1919
- Cover data handling: JSON/XML parsing and building, Groovy SQL, collection processing.
2020
- Advise on performance: @CompileStatic, @TypeChecked, @GrailsCompileStatic for optimal execution.
2121

@@ -27,11 +27,11 @@ Activate this skill for any Groovy-related task, including:
2727
- Building or enhancing Gradle build scripts (build.gradle).
2828
- Creating DSLs for configuration, testing, or business rules.
2929
- Writing Spock specifications for unit and integration tests.
30-
- Migrating from older Groovy versions (2.x/3.x) to 4.0.
30+
- Migrating from older Groovy versions (2.x/3.x/4.x) to 5.0.
3131
- Performance optimization with static compilation.
3232
- Working with JSON/XML data, GORM criteria queries, or builders.
3333

34-
## Groovy 4 Key Features
34+
## Groovy 5 Key Features
3535

3636
### Concise Syntax
3737
```groovy
@@ -499,7 +499,7 @@ sql.execute("INSERT INTO books (title) VALUES ($title)")
499499

500500
## Resources
501501

502-
- **Groovy 4 Documentation**: https://docs.groovy-lang.org/docs/groovy-4.0.30/html/documentation/
502+
- **Groovy 5 Documentation**: https://docs.groovy-lang.org/docs/groovy-5.0.7/html/documentation/
503503
- **Groovy Style Guide**: https://groovy-lang.org/style-guide.html
504504
- **GORM Documentation**: https://grails.apache.org/docs/latest/grails-data/
505-
- **Spock Framework**: https://spockframework.org/spock/docs/2.3/all_in_one.html
505+
- **Spock Framework**: https://spockframework.org/spock/docs/2.4/all_in_one.html

‎.agents/skills/java-developer/SKILL.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: java-developer
3-
description: Guide for developing in Java 17 LTS, including modern features, best practices, and integration with Groovy/Grails projects
3+
description: Guide for developing on the Java 21 baseline, including modern features, best practices, and integration with Groovy/Grails projects
44
license: Apache-2.0
55
---
66
<!--
@@ -11,8 +11,8 @@ Licensed to the Apache Software Foundation (ASF) under one or more contributor l
1111

1212
## What I Do
1313

14-
- Provide guidance on Java 17 LTS syntax, features, and APIs for use in Grails/Groovy projects.
15-
- Assist with code generation, refactoring, and debugging using Java 17 enhancements like records, sealed classes, pattern matching, and text blocks.
14+
- Provide guidance on Java 21 syntax, features, and APIs for use in Grails/Groovy projects.
15+
- Assist with code generation, refactoring, and debugging using modern Java features like records, sealed classes, pattern matching, and text blocks.
1616
- Recommend best practices for Java code that interoperates with Groovy in mixed-language projects.
1717
- Guide on tooling: Gradle builds, JDK setup, testing with JUnit 5/Spock, and profiling.
1818

@@ -21,11 +21,11 @@ Licensed to the Apache Software Foundation (ASF) under one or more contributor l
2121
Use this skill when working on Java code within this repository, especially for:
2222
- Writing Java classes that will be used alongside Groovy code.
2323
- Implementing features using records, sealed classes, or pattern matching for instanceof.
24-
- Migrating older Java code (e.g., Java 8/11) to Java 17 idioms.
24+
- Migrating older Java code (e.g., Java 8/11/17) to Java 21 idioms.
2525
- Performance optimization, security hardening, or module system (JPMS) questions.
2626
- Understanding how Java code integrates with Groovy's dynamic features.
2727

28-
## Java 17 Key Features
28+
## Java 21 Baseline Features
2929

3030
### Records (JEP 395)
3131
Immutable data carriers with auto-generated constructors, accessors, equals, hashCode, and toString:
@@ -61,13 +61,13 @@ public non-sealed class Rectangle implements Shape {
6161
### Pattern Matching for instanceof (JEP 394)
6262
Eliminate redundant casts:
6363
```java
64-
// Before Java 17
64+
// Before pattern matching
6565
if (obj instanceof String) {
6666
String s = (String) obj;
6767
System.out.println(s.length());
6868
}
6969

70-
// Java 17
70+
// Modern Java
7171
if (obj instanceof String s) {
7272
System.out.println(s.length());
7373
}
@@ -200,7 +200,7 @@ def "Java record should work in Spock tests"() {
200200

201201
## Performance and Profiling
202202

203-
### JVM Options for Java 17
203+
### JVM Options for Java 21
204204
```bash
205205
# Recommended GC for most workloads
206206
-XX:+UseG1GC
@@ -266,6 +266,6 @@ List<String> copy = List.copyOf(mutableList);
266266

267267
## Resources
268268

269-
- **Java 17 Documentation**: https://docs.oracle.com/en/java/javase/17/
270-
- **Java Language Updates**: https://docs.oracle.com/en/java/javase/17/language/
269+
- **Java 21 Documentation**: https://docs.oracle.com/en/java/javase/21/
270+
- **Java Language Updates**: https://docs.oracle.com/en/java/javase/21/language/
271271
- **JEP Index**: https://openjdk.org/jeps/0

‎AGENTS.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ export GRADLE_OPTS="-Xms2G -Xmx5G"
7373
| Skill | Path | Use For |
7474
|-------|------|---------|
7575
| **grails-developer** | `.agents/skills/grails-developer/SKILL.md` | Current Grails apps, GORM, controllers, views |
76-
| **groovy-developer** | `.agents/skills/groovy-developer/SKILL.md` | Groovy 4 syntax, closures, DSLs, Spock |
76+
| **groovy-developer** | `.agents/skills/groovy-developer/SKILL.md` | Groovy 5 syntax, closures, DSLs, Spock |
7777
| **grails-8-upgrade** | `.agents/skills/grails-8-upgrade/SKILL.md` | Upgrading Grails applications from 7.x to 8 |
78-
| **java-developer** | `.agents/skills/java-developer/SKILL.md` | Java 17 features, Groovy interop |
78+
| **java-developer** | `.agents/skills/java-developer/SKILL.md` | Java 21 features, Groovy interop |
7979
| **hibernate-developer** | `.agents/skills/hibernate-developer/SKILL.md` | Hibernate 7 mapping, binders, generators |
8080
| **violation-fixer** | `.agents/skills/violation-fixer/SKILL.md` | Fix style/analysis violations (CodeNarc, Checkstyle, PMD, SpotBugs) |
8181
| **test-fixer** | `.agents/skills/test-fixer/SKILL.md` | Aggregate and fix test failures |
@@ -85,11 +85,11 @@ export GRADLE_OPTS="-Xms2G -Xmx5G"
8585
| Component | Version |
8686
|-----------|---------|
8787
| JDK | 21+ (baseline 21) |
88-
| Groovy | 4.0.x |
89-
| Spring Boot | 4.0.x |
88+
| Groovy | 5.0.x |
89+
| Spring Boot | 4.1.x |
9090
| Spring Framework | 7.0.x |
91-
| Spock | 2.4-groovy-4.0 |
92-
| Gradle | 8.14.x |
91+
| Spock | 2.4-groovy-5.0 |
92+
| Gradle | 9.6.x |
9393
| Jakarta EE | 10 |
9494

9595
## Project Structure
@@ -290,8 +290,8 @@ and known non-findings — before reporting issues.
290290
## Resources
291291

292292
- **Grails Guide**: https://grails.apache.org/docs/latest/guide/single.html
293-
- **Groovy 4 Docs**: https://docs.groovy-lang.org/docs/groovy-4.0.30/html/documentation/
294-
- **Spock 2.3 Docs**: https://spockframework.org/spock/docs/2.3/all_in_one.html
293+
- **Groovy 5 Docs**: https://docs.groovy-lang.org/docs/groovy-5.0.7/html/documentation/
294+
- **Spock 2.4 Docs**: https://spockframework.org/spock/docs/2.4/all_in_one.html
295295
- **GORM Docs**: https://grails.apache.org/docs/latest/grails-data/
296296
- **Issues**: https://github.com/apache/grails-core/issues
297297
- **Slack**: https://grails.slack.com

‎grails-bom/hibernate5-micronaut/build.gradle‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ dependencies {
7575
// Re-export the Micronaut platform so consumers inherit Micronaut's managed versions
7676
// transitively. Exclude Groovy since we declare the required version explicitly via
7777
// customBomDependencies. Exclude Spock since we manage that version ourselves.
78-
// Exclude Jackson 3 (tools.jackson) since spring-boot-dependencies manages that version,
79-
// and Micronaut can lag behind Spring Boot's patch bumps (e.g. SB 4.0.6 ships
80-
// jackson-bom 3.1.2 while micronaut-platform 5.0.0-M2 still pins 3.1.0).
78+
// Exclude Jackson 3 (tools.jackson) since spring-boot-dependencies manages that version
79+
// and the two platforms routinely disagree on the patch (e.g. SB 4.0.6 ships
80+
// jackson-bom 3.1.2 while micronaut-platform 5.0.0 pins 3.1.3). Let Spring Boot
81+
// remain the single source of truth so the dependency-version validator does not
82+
// see drift between probe and project resolution.
8183
api(platform("io.micronaut.platform:micronaut-platform:$micronautPlatformVersion")) {
8284
exclude group: 'org.apache.groovy'
8385
exclude group: 'org.spockframework'

‎grails-bom/hibernate7-micronaut/build.gradle‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ dependencies {
7575
// Re-export the Micronaut platform so consumers inherit Micronaut's managed versions
7676
// transitively. Exclude Groovy since we declare the required version explicitly via
7777
// customBomDependencies. Exclude Spock since the base BOM manages that version.
78-
// Exclude Jackson 3 (tools.jackson) since spring-boot-dependencies manages that version,
79-
// and Micronaut can lag behind Spring Boot's patch bumps (e.g. SB 4.0.6 ships
80-
// jackson-bom 3.1.2 while micronaut-platform 5.0.0-M2 still pins 3.1.0).
78+
// Exclude Jackson 3 (tools.jackson) since spring-boot-dependencies manages that version
79+
// and the two platforms routinely disagree on the patch (e.g. SB 4.0.6 ships
80+
// jackson-bom 3.1.2 while micronaut-platform 5.0.0 pins 3.1.3). Let Spring Boot
81+
// remain the single source of truth so the dependency-version validator does not
82+
// see drift between probe and project resolution.
8183
api(platform("io.micronaut.platform:micronaut-platform:$micronautPlatformVersion")) {
8284
exclude group: 'org.apache.groovy'
8385
exclude group: 'org.spockframework'

‎grails-data-hibernate7/boot-plugin/build.gradle‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ ext {
3939
}
4040

4141
dependencies {
42-
// TODO: Clarify and clean up dependencies
4342
implementation platform(project(':grails-hibernate7-bom'))
4443

4544
compileOnly project(':grails-shell-cli'), {

‎grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/GrailsSessionContext.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class GrailsSessionContext implements CurrentSessionContext {
6060
protected final SessionFactoryImplementor sessionFactory;
6161
protected CurrentSessionContext jtaSessionContext;
6262

63-
// TODO make configurable?
63+
// Match Spring's default: currentSession() must not create a Session outside an active transaction.
6464
protected boolean allowCreate = false;
6565

6666
/**

‎grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateDatastore.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*/
1919
package org.grails.orm.hibernate;
2020

21-
// TODO: Refactor multi-datasource architecture to avoid the parent-child datastore map and anonymous subclasses.
22-
// Consider a single CompositeDatastore approach for the next major release.
21+
// Multi-datasource support currently uses a parent-child datastore map and child datastore instances.
22+
// A future major release can replace this with a single CompositeDatastore approach.
2323

2424
import java.io.Closeable;
2525
import java.io.IOException;

‎grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormStaticApi.groovy‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ import org.grails.orm.hibernate.support.HibernateRuntimeUtils
7474
*/
7575
@Slf4j
7676
@CompileStatic
77-
//TODO Duplication!!
7877
class HibernateGormStaticApi<D> extends GormStaticApi<D> {
7978

8079
protected GrailsHibernateTemplate hibernateTemplate

0 commit comments

Comments
 (0)