-
Notifications
You must be signed in to change notification settings - Fork 843
Add Java 25 build compatibility for TinkerPop 3.8 #3283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.8-dev
Are you sure you want to change the base?
Conversation
This change enables building TinkerPop with Java 25 by: 1. Updating Groovy version to 4.0.30-SNAPSHOT which includes ASM 9.9 (required for Java 25 class file version 69 support) 2. Adding explicit annotationProcessorPaths to gremlin-groovy's maven-compiler-plugin configuration. This ensures the GremlinDsl annotation processor can load its dependencies (javapoet, gremlin-core) which is required due to stricter classloader isolation in Java 25. Build requirements: - Requires local installation of Groovy 4.0.30-SNAPSHOT with ASM 9.9 - Use -Denforcer.skip=true to bypass Java version check - Use -Dmaven.javadoc.skip=true due to Groovy source path issues
b159185 to
b8734ac
Compare
- LambdaRestrictionStrategy: Use case-insensitive check for lambda class names (Java 25 changed lambda naming to $$Lambda/ instead of $$lambda$) - ImportGremlinPluginTest: Handle Math.TAU field added in Java 19
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.8-dev #3283 +/- ##
==========================================
Coverage ? 77.31%
Complexity ? 15022
==========================================
Files ? 1159
Lines ? 71961
Branches ? 8031
==========================================
Hits ? 55639
Misses ? 13268
Partials ? 3054 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| <cucumber.version>7.21.1</cucumber.version> | ||
| <exp4j.version>0.4.8</exp4j.version> | ||
| <groovy.version>4.0.25</groovy.version> | ||
| <groovy.version>4.0.30-SNAPSHOT</groovy.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be upgraded to a SNAPSHOT version in order to work? I would like to stick to fully released versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I saw the reference to this in the PR description. I believe this PR will unfortunately remain blocked until groovy merges and releases their fix.
|
Hi @jrepp, thanks for opening this PR, as well as driving the necessary fixes in groovy as well. I will try to find some time to test these changes out locally. Unfortunately we probably can't move forward until the groovy fix is complete, but I will try to get a preliminary review completed soon. |
Summary
Enables building TinkerPop with Java 25 by updating Groovy and fixing annotation processor configuration.
Changes
Build Configuration
pom.xml: Updatedgroovy.versionto4.0.30-SNAPSHOT(includes ASM 9.9 for Java 25 support)gremlin-groovy/pom.xml: Added explicitannotationProcessorPathsforGremlinDslProcessorTest Fixes
LambdaRestrictionStrategy.java: Use case-insensitive lambda detection (Java 25 changed class naming from$$Lambda$N/...to$$Lambda/0x...)ImportGremlinPluginTest.java: HandleMath.TAUfield added in Java 19Build Instructions
Prerequisites: Local Groovy 4.0.30-SNAPSHOT with ASM 9.9 - see apache/groovy#2346
Test Results
Note: hadoop-gremlin failures are pre-existing Hadoop + Java 25 incompatibility issues, not related to this PR.
Blocking Dependency
The linked Groovy PR updates ASM from 9.7 to 9.9, which is required to parse Java 25 class files (class file version 69). Without this ASM update, Groovy cannot compile or load classes built with Java 25, causing
IllegalArgumentExceptionerrors during bytecode analysis.Once that Groovy PR is released (likely as 4.0.25 or later), update the
groovy.versioninpom.xmlfrom4.0.30-SNAPSHOTto the actual release version.Notes for Maintainers
annotationProcessorPathschange is backward compatible and follows Maven best practices[11,18)will need updating for official Java 25 support