tinkerpop icon indicating copy to clipboard operation
tinkerpop copied to clipboard

Add Java 25 build compatibility for TinkerPop 3.8

Open jrepp opened this issue 1 month ago • 2 comments

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 https://github.com/apache/groovy/pull/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

jrepp avatar Nov 30 '25 00:11 jrepp

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :warning: 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           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Nov 30 '25 19:11 codecov-commenter

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.

Cole-Greer avatar Dec 02 '25 00:12 Cole-Greer