Repository navigation
refactor: convert grails-data-neo4j-core to Groovy - #16593
borinquenkid wants to merge 17 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor/java-to-groovy-grails-data-mongodb #16593 +/- ##
================================================================================
Coverage 63.3807% 63.3807%
+ Complexity 30906 30901 -5
================================================================================
Files 2239 2239
Lines 109404 109404
Branches 20395 20395
================================================================================
Hits 69341 69341
+ Misses 30550 30546 -4
- Partials 9513 9517 +4 🚀 New features to boost your workflow:
|
…to-groovy-grails-data-neo4j
…to-groovy-grails-data-neo4j
…to-groovy-grails-data-neo4j
…to-groovy-grails-data-neo4j
This comment has been minimized.
This comment has been minimized.
Rebuild CypherBuilder, RelationshipPendingDelete, Neo4jMappingContext, PlingStemmer, HashcodeEqualsAwareProxyFactory, and TypeDirectionPair from their original .java content with semicolons kept and CodeNarc UnnecessarySemicolon suppressed, so GitHub's default-threshold rename detection recognizes these as moves rather than delete+add (see matrei's review on #16576). HashcodeEqualsAwareProxyFactory remains below the 50% threshold (R034): its anonymous inner MethodHandler hand-implements GroovyObject with its own metaClass field, which needs @pojo together with @CompileStatic to avoid a "this.mc is null" NPE during construction (same root cause documented on GrailsApplicationContext in module 6). Groovy has no syntax to annotate an anonymous class literal, so the handler had to be extracted into a named static nested class with an explicit constructor replacing the captured locals. That's a genuine, necessary structural change, not a stylistic/semicolon artifact, so no suppression trick recovers the similarity without reverting a correctness fix. Left as a known, documented exception, same as JsonScanner in module 14. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tor/java-to-groovy-grails-data-neo4j
…tor/java-to-groovy-grails-data-neo4j
…tor/java-to-groovy-grails-data-neo4j
…tor/java-to-groovy-grails-data-neo4j
…tor/java-to-groovy-grails-data-neo4j
…tor/java-to-groovy-grails-data-neo4j
|
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 |
…tor/java-to-groovy-grails-data-neo4j
e035056 to
68b4247
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 ( |
…tor/java-to-groovy-grails-data-neo4j
…/java-to-groovy-grails-data-neo4j
…tor/java-to-groovy-grails-data-neo4j
…tor/java-to-groovy-grails-data-neo4j
What
Converts the remaining Java sources of
grails-data-neo4j-coreto Groovy: 25.javafiles removed, 30.groovyfiles added (36 files changed, 4232 insertions(+), 3621 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 15 of 30 in the next stack (base:refactor/java-to-groovy-grails-data-mongodb). 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-data-neo4j-core: 25 deleted .java, 0 differences requiring actionSee also the notes below. Remaining informational entries (widened visibility, e.g. Groovy property accessors): 4.
Verification
classesandtestClasses(plusast/cli/testFixturessource sets where present) of the converted project(s) and of their direct dependents compile: ['grails-data-neo4j', 'grails-data-neo4j-spring-boot']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