Skip to content

Conversation

@jrepp
Copy link

@jrepp jrepp commented Nov 30, 2025

Summary

Enables building TinkerPop with Java 25 by updating Groovy and fixing annotation processor configuration.

Changes

Build Configuration

  1. pom.xml: Updated groovy.version to 4.0.30-SNAPSHOT (includes ASM 9.9 for Java 25 support)
  2. gremlin-groovy/pom.xml: Added explicit annotationProcessorPaths for GremlinDslProcessor

Test Fixes

  1. LambdaRestrictionStrategy.java: Use case-insensitive lambda detection (Java 25 changed class naming from $$Lambda$N/... to $$Lambda/0x...)
  2. ImportGremlinPluginTest.java: Handle Math.TAU field added in Java 19

Build Instructions

mvn clean install -DskipTests -Denforcer.skip=true -Dmaven.javadoc.skip=true

Prerequisites: Local Groovy 4.0.30-SNAPSHOT with ASM 9.9 - see apache/groovy#2346

Test Results

Module Tests Failures Skipped
gremlin-core 8500 0 45
gremlin-server 8723 0 24
hadoop-gremlin 846 3 700

Note: hadoop-gremlin failures are pre-existing Hadoop + Java 25 incompatibility issues, not related to this PR.

Blocking Dependency

⚠️ This PR cannot be merged until apache/groovy#2346 lands in a Groovy 4.x release.

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 IllegalArgumentException errors during bytecode analysis.

Once that Groovy PR is released (likely as 4.0.25 or later), update the groovy.version in pom.xml from 4.0.30-SNAPSHOT to the actual release version.

Notes for Maintainers

  • The annotationProcessorPaths change is backward compatible and follows Maven best practices
  • The enforcer plugin's Java version restriction [11,18) will need updating for official Java 25 support

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
@jrepp jrepp force-pushed the jrepp/java-25-groovy-asm-compat branch from b159185 to b8734ac Compare November 30, 2025 00:52
- 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
@jrepp jrepp changed the title Add Java 25 build compatibility Add Java 25 build compatibility for TinkerPop 3.8 Nov 30, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (3.8-dev@59b68cf). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants