Repository navigation
refactor: convert grails-datamapping-core to Groovy - #16588
borinquenkid wants to merge 17 commits into
Conversation
…e classes AutoTimestampEventListener.insertOverwrite and cacheAutoTimestampAnnotations were public fields in Java and became properties; declare them public again. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…va-to-groovy-grails-datamapping-core
…va-to-groovy-grails-datamapping-core
…va-to-groovy-grails-datamapping-core
…factor/java-to-groovy-grails-datamapping-core
Rebuild CriteriaBuilder, PagedResultList, DomainEventListener, DynamicFinderInvocation, ListResultFinder, MethodExpression, DataSourceBuilder, AbstractResultList, and AbstractDatastorePersistenceContextInterceptor from their original .java sources, keeping semicolons and other Java-isms so git recognizes the .java -> .groovy conversion as a rename instead of delete+add (see matrei's review on #16576). CodeNarc violations from the kept semicolons are suppressed with scoped @SuppressWarnings; a later groovyism-cleanup PR removes them for real. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…factor/java-to-groovy-grails-datamapping-core
…factor/java-to-groovy-grails-datamapping-core
…factor/java-to-groovy-grails-datamapping-core
…factor/java-to-groovy-grails-datamapping-core
…factor/java-to-groovy-grails-datamapping-core
|
SUPERSEDED: the Temporary CI flag on this stacked branch (BLOCKER before merge). This Java-to-Groovy chain is a stack of PRs, and every push to any of them starts the full CI matrix, which is more runner time than the ASF allows us. Every PR in the stack except the one closest to its release branch (#16576) therefore carries one temporary commit, With it, CI on this PR compiles but does not run tests or code style. The full build runs on #16576 (closest to 10.0.x), and each PR gets it when the PR below it has merged. Condition for merging this PR: that |
…factor/java-to-groovy-grails-datamapping-core
5b06fc3 to
7c083d3
Compare
|
Update: this branch now carries a different temporary CI commit (BLOCKER before merge). The earlier In its place, every PR in this stack except #16576 (the one closest to 10.0.x) carries one temporary commit, Condition for merging this PR: that commit must be reverted on this branch first ( |
…factor/java-to-groovy-grails-datamapping-core
…/java-to-groovy-grails-datamapping-core
…factor/java-to-groovy-grails-datamapping-core
…factor/java-to-groovy-grails-datamapping-core # Conflicts: # grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/multitenancy/MultiTenantEventListener.groovy
🔎 No tests executed 🔎🏷️ Commit: 9258cfb Learn more about TestLens at testlens.app/docs. |
What
Converts the remaining Java sources of
grails-datamapping-coreto Groovy: 68.javafiles removed, 76.groovyfiles added (90 files changed, 7604 insertions(+), 6377 deletions(-)).Why
The maintainers asked on #16351 for the Java-to-Groovy migration to land one Gradle project at a time as a stack of PRs, bottom-up in dependency order. #16572 did
grails-data-hibernate7; this PR is 10 of 30 in the next stack (base:refactor/java-to-groovy-datamapping-validation). The end state of every file is taken from the9.0.x-java-to-groovybranch, which already carries the regression fixes found by CI.Commits:
Changed outside the converted sources
Java-facing API sweep
Every deleted
.javawas compared with its Groovy twin viajavap -v -protected(class declaration, public/protected fields, constructors, methods incl. modifiers/throws/generics, interface default methods, nested class modifiers, and the annotations callers see). Result:grails-datamapping-core: 68 deleted .java, 6 difference(s) found and fixed in this PR (see thefix:commit), 0 leftSee also the notes below. Remaining informational entries (widened visibility, e.g. Groovy property accessors): 13.
Verification
classesandtestClasses(plusast/cli/testFixturessource sets where present) of the converted project(s) and of their direct dependents compile: ['grails-converters', 'grails-data-graphql-core', 'grails-data-mongodb-bson', 'grails-data-mongodb-core', 'grails-data-mongodb-ext', 'grails-data-mongodb-spring-boot', 'grails-data-neo4j-core', 'grails-data-simple', 'grails-datamapping-async', 'grails-datamapping-core-test', 'grails-datamapping-rx', 'grails-datamapping-support', 'grails-datamapping-tck', 'grails-datasource', 'grails-datastore-core', 'grails-domain-class', 'grails-events-transforms', 'grails-geb', 'grails-redis', 'grails-spring-security', 'grails-spring-security-oauth2', 'grails-testing-support-core', 'grails-testing-support-datamapping']codeStyle,ratand a whole-repobuild -PskipTestsare run once on the tip of the stack.Notes
MIN_VALUE/MAX_VALUE/next()/previous(), property accessors appear for formerly package-private members, nested static classes with implicit constructors become public (they wereprotected), and generic type parameters that Groovy erases in constructors/methods (descriptors identical).static finalwithoutpubliccreates a property;==callsequals(); Closure/SAM coercions;@CompileStaticwith nested classes. All CI regression fixes found on the umbrella branch are included in the end state.🤖 Generated with Claude Code