Skip to content

fix(#5208): engine ANTLR 4.13.2 + Gremlin ANTLR relocation (coexistence)#5216

Merged
robfrank merged 15 commits into
mainfrom
feat/4647-antlr-engine-bump-gremlin-shading
Jul 12, 2026
Merged

fix(#5208): engine ANTLR 4.13.2 + Gremlin ANTLR relocation (coexistence)#5216
robfrank merged 15 commits into
mainfrom
feat/4647-antlr-engine-bump-gremlin-shading

Conversation

@robfrank

Copy link
Copy Markdown
Collaborator

Sub-issue of #4647. Fixes #5208.

Problem

arcadedb-engine shipped ANTLR parsers generated with antlr 4.9.1 (ATN serialized in "version 3" format). Embedded in a Spring 6 / Hibernate 6 app, those frameworks pull antlr-runtime 4.10+ (reads only "version 4" ATN). Whichever runtime wins on the classpath breaks the other side:

java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN;
Could not deserialize ATN with version 3 (expected 4).

TinkerPop 3.8.1 (Gremlin) is hard-locked to antlr 4.9.1 because it ships a precompiled parser (v3 ATN) that cannot be regenerated without forking TinkerPop, so a single antlr version cannot serve both the engine and Gremlin.

Approach

  1. Engine → plain antlr 4.13.2 (unshaded). Parsers regenerate to v4 ATN, converging the engine with what Spring 6 / Hibernate 6 bring. The engine module stays an ordinary jar.
  2. Gremlin relocates its antlr - org.antlrcom.arcadedb.gremlin.shaded.org.antlr inside the shaded jar - so TinkerPop's precompiled 4.9.1 (v3) parser keeps its runtime and never collides with the engine's 4.13.2. Only org.antlr is relocated; the TinkerPop grammar package is untouched.
  3. New arcadedb-gremlin-it module runs the existing gremlin test suite (via the test-jar + surefire/failsafe dependenciesToScan) plus a new AntlrCoexistenceIT against the shaded jar, so the two antlr runtimes are exercised together in one JVM. The gremlin module itself skips test execution (still builds its test-jar) because engine-v4 + gremlin-v3 cannot share one unshaded classpath.

Resulting classpath (shipped distribution)

Component antlr package version
arcadedb-engine + host app (Hibernate/Spring) org.antlr.v4.runtime 4.13.2 (real)
arcadedb-gremlin (shaded jar) com.arcadedb.gremlin.shaded.org.antlr.v4.runtime 4.9.1 (private)

The gremlin uber-jar excludes arcadedb-engine from its artifactSet so the relocation only ever rewrites TinkerPop's parser - not the engine's own v4 parsers (which the distribution provides as a plain jar). Without this, a bundled engine parser would be relocated onto the incompatible 4.9.1 runtime and could win under -cp lib/*, reintroducing the ATN error.

Verification

  • Engine SQL + Cypher parser suites green after regeneration.
  • Shaded jar: 0 engine-parser classes bundled; relocated TinkerPop parser + antlr present; no bare org/antlr leak.
  • AntlrCoexistenceIT: engine SQL + Cypher parse (4.13.2) and a Gremlin traversal (relocated 4.9.1) succeed in one JVM.
  • Full migrated gremlin suite in gremlin-it: 2090 tests, 0 failures / 0 errors.
  • Distribution: SqlParser.class present in exactly one lib/ jar (plain engine).
  • mvn clean install -DskipTests: BUILD SUCCESS across all modules.

Deferred (documented in the design spec)

Maven-coordinate consumer isolation (<optional> on gremlin's antlr) for third-party embedders who depend on both arcadedb-gremlin and arcadedb-engine directly. Does not affect the shipped distribution or the reporter's engine-only embedding.

Design spec and implementation plan: docs/superpowers/specs/2026-07-10-gremlin-antlr-shading-engine-bump-design.md, docs/superpowers/plans/2026-07-10-gremlin-antlr-shading-engine-bump.md.

🤖 Generated with Claude Code

@mergify

mergify Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the core ANTLR runtime to version 4.13.2 in the engine module while keeping the Gremlin module on ANTLR 4.9.1 by relocating it inside a shaded jar. It introduces a new gremlin-it integration test module to verify the coexistence of both ANTLR versions in a single JVM and runs the existing Gremlin test suite against the shaded artifact. Feedback on these changes includes wrapping ResultSet instances in try-with-resources blocks to prevent resource leaks in the coexistence test, adding a null check to avoid a potential NullPointerException when loading resources in VectorGremlinIT, and using the standard <type>test-jar</type> declaration instead of <classifier>tests</classifier> in the Maven configuration.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +50 to +61
// Engine ANTLR SQL parser (org.antlr 4.13.2, v4 ATN).
final ResultSet sql = database.query("sql", "SELECT name, age FROM Person WHERE age = 25");
assertThat(sql.hasNext()).isTrue();
assertThat(sql.next().<String>getProperty("name")).isEqualTo("Jay");

// Engine ANTLR Cypher parser (org.antlr 4.13.2, v4 ATN).
final ResultSet cypher = database.query("cypher", "MATCH (p:Person) RETURN p.name AS name");
assertThat(cypher.hasNext()).isTrue();

// TinkerPop Gremlin parser (relocated com.arcadedb.gremlin.shaded.org.antlr 4.9.1, v3 ATN).
final ResultSet gremlin = graph.gremlin("g.V().hasLabel('Person').count()").execute();
assertThat((Long) gremlin.next().getProperty("result")).isEqualTo(1L);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The ResultSet instances returned by database.query and graph.gremlin(...).execute() implement AutoCloseable and should be closed to prevent resource leaks. Wrapping them in try-with-resources blocks ensures they are closed properly even if assertions fail.

      // Engine ANTLR SQL parser (org.antlr 4.13.2, v4 ATN).
      try (final ResultSet sql = database.query("sql", "SELECT name, age FROM Person WHERE age = 25")) {
        assertThat(sql.hasNext()).isTrue();
        assertThat(sql.next().<String>getProperty("name")).isEqualTo("Jay");
      }

      // Engine ANTLR Cypher parser (org.antlr 4.13.2, v4 ATN).
      try (final ResultSet cypher = database.query("cypher", "MATCH (p:Person) RETURN p.name AS name")) {
        assertThat(cypher.hasNext()).isTrue();
      }

      // TinkerPop Gremlin parser (relocated com.arcadedb.gremlin.shaded.org.antlr 4.9.1, v3 ATN).
      try (final ResultSet gremlin = graph.gremlin("g.V().hasLabel('Person').count()").execute()) {
        assertThat((Long) gremlin.next().getProperty("result")).isEqualTo(1L);
      }

Comment on lines +54 to +55
final URL inputFile = VectorGremlinIT.class.getClassLoader().getResource("importer-glove.txt");
db.command("sql", "import database file://" + inputFile.getFile() + " "//

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

ClassLoader.getResource() can return null if the resource is not found on the classpath. Adding a null check before calling inputFile.getFile() prevents a potential NullPointerException and provides a clearer error message if the test environment is misconfigured.

      final URL inputFile = VectorGremlinIT.class.getClassLoader().getResource("importer-glove.txt");
      if (inputFile == null) {
        throw new IllegalStateException("Required resource 'importer-glove.txt' not found on classpath");
      }
      db.command("sql", "import database file://" + inputFile.getFile() + " "//

Comment thread gremlin-it/pom.xml
<groupId>com.arcadedb</groupId>
<artifactId>arcadedb-gremlin</artifactId>
<version>${project.parent.version}</version>
<classifier>tests</classifier>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using <type>test-jar</type> is the standard Maven way to depend on a test jar, rather than using <classifier>tests</classifier> with the default jar type. This ensures consistent classpath resolution across different IDEs and build environments, matching how arcadedb-server's test jar is declared on line 127.

Suggested change
<classifier>tests</classifier>
<type>test-jar</type>

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@claude

claude Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review: engine ANTLR 4.13.2 + Gremlin ANTLR relocation (#5216)

Thanks for the thorough write-up and the design/plan docs, this is a genuinely tricky classpath problem and the approach (engine on real 4.13.2, TinkerPop's precompiled v3 parser relocated inside the shaded jar, coexistence proven in a dedicated gremlin-it module) is sound and well-tested. The artifactSet exclusion of arcadedb-engine from the shade (PATCH 10) is the crucial catch, without it the relocation would have rewritten the engine's own v4 parsers onto the 4.9.1 runtime and reintroduced the exact bug. Nice.

A few observations, mostly minor:

Test robustness

  • VectorGremlinIT.java (getResource + getFile()):
    • getClassLoader().getResource("importer-glove.txt") can return null if the resource isn't on the classpath, producing an opaque NPE on inputFile.getFile() instead of a clear failure. A null-check with a helpful assertion message would make breakage easier to diagnose.
    • URL.getFile() does not URL-decode. If the build/checkout path contains a space or other special char (Program Files, +, etc.), the resulting file://.../with%20space path won't resolve for the importer. new File(inputFile.toURI()).getAbsolutePath() is the robust form and also handles the file scheme correctly across platforms.

Build / module coupling

  • gremlin-it depends on gremlin's package-phase outputs (the shaded uber-jar and the tests test-jar). This works in a full reactor build because gremlin-it is ordered after gremlin, but mvn test -pl gremlin-it in isolation (without first install/package-ing gremlin) will fail. Worth a one-line note in the module's POM/description so contributors aren't surprised.
  • <directory>${project.basedir}/../gremlin/src/test/resources</directory> couples the two modules via a relative filesystem path. It's a reasonable "single source of truth" over byte-copies (good that the copies were dropped), but it is fragile to module relocation.
  • The wildcard exclusion *:* and dependenciesToScan both assume a recent Maven (you cite 3.9.12). Adding/confirming a maven-enforcer requireMavenVersion rule would protect the build from silently misbehaving on older Maven.

Coexistence test visibility

  • AntlrCoexistenceIT is the decisive regression guard, but as an *IT it only runs under failsafe (-Pintegration). Please confirm CI actually exercises gremlin-it with the integration profile, otherwise the explicit coexistence proof won't run on every build. The migrated *Test suite (via surefire dependenciesToScan) does cover the same coexistence path in the normal test phase, so this is defense-in-depth rather than a gap, but worth verifying the intended CI wiring.

Consumer isolation (deferred, but worth surfacing)

  • Since antlr-runtime dependency of arcadedb-engine is incompatible with hibernate 6 which requires antlr-runtime 4.10 or above #4647 is fundamentally about embedding, the deferred Maven-coordinate isolation is the part most likely to bite real embedders: the non-reduced shaded pom still lists antlr4-runtime:4.9.1, and the unshaded arcadedb-gremlin jar now references org.antlr while transitively dragging engine's 4.13.2. A third-party app depending on both artifacts by coordinate (not via the shipped distribution jars) can still hit mediation. The PR correctly scopes this out and it doesn't affect the reporter's engine-only case, but I'd flag it prominently in the release notes / follow-up issue so embedders using both modules know to consume the shaded classifier (or wait for the <optional>/provided follow-up).

Nits

  • junit-vintage-engine reuses ${junit.jupiter.version}. It works today (vintage and jupiter ship from the same JUnit 5 release train), but it's semantically the platform/vintage line rather than the jupiter API version. Not blocking.

Overall this is a solid, carefully-reasoned fix with good test coverage of the coexistence scenario. The items above are hardening suggestions rather than blockers.

Automated review by Claude.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 426 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.5.37 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.5.37 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.0 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)

robfrank added a commit that referenced this pull request Jul 11, 2026
…mlin-it build ordering

Address PR #5216 review: null-check the classpath resource and resolve it via
new File(url.toURI()) so paths with spaces/special chars decode correctly; note in
the gremlin-it POM that it consumes gremlin's package-phase outputs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@robfrank

Copy link
Copy Markdown
Collaborator Author

Addressed in d2d698c. Details per item:

Test robustness (VectorGremlinIT) - Fixed. Now null-checks the classpath resource with a clear assertion message and resolves it via new File(inputFile.toURI()).getAbsolutePath() instead of URL.getFile(), so paths containing spaces or other special characters decode correctly. Verified VectorGremlinIT + AntlrCoexistenceIT green against the shaded jar in gremlin-it.

gremlin-it depends on gremlin package-phase outputs - Documented. Added a note to the arcadedb-gremlin-it POM <description> stating it consumes the shaded uber-jar and the tests test-jar, so it must be built after arcadedb-gremlin in the reactor and requires a prior install when run standalone.

Relative ../gremlin/src/test/resources path - Intentional and already commented as the single-source-of-truth choice over byte-copies. Left as-is; it only breaks under a module move, which would touch the POM anyway.

maven-enforcer requireMavenVersion - Not adding it here. The build pins Maven 3.9.12 exactly via the wrapper (.mvn/wrapper/maven-wrapper.properties), and CI runs through ./mvnw, so the *:* exclusion and dependenciesToScan always run on a compatible Maven. There is no existing requireMavenVersion rule in the parent POM; adding a repo-wide enforcer rule is out of scope for this ANTLR change and better handled as a separate hardening.

AntlrCoexistenceIT CI visibility - Confirmed it runs in CI. The integration profile sets <skipITs>false</skipITs>, and .github/workflows/mvn-test.yml's integration-tests job runs ./mvnw verify -Pintegration ... -pl !e2e,!load-tests,!e2e-ha,!ha-raft - gremlin-it is not excluded, so failsafe executes AntlrCoexistenceIT. The migrated *Test classes additionally exercise the same coexistence path in the surefire (unit) phase, so it is covered in both phases.

Deferred consumer isolation - Filed as follow-up issue #5217 (mark gremlin's antlr4-runtime <optional>/provided, and surface in release notes so embedders using both modules by coordinate consume the shaded classifier). Also documented in the design spec's "Deferred / follow-up" section.

junit-vintage-engine version - Left as ${junit.jupiter.version} to match the existing arcadedb-gremlin module, which uses the same property for vintage; diverging only in gremlin-it would be inconsistent. Agreed it's non-blocking.

@claude

claude Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review: engine ANTLR 4.13.2 + Gremlin ANTLR relocation

Reviewed the build/dependency changes (the two docs/superpowers specs are informational). Overall this is a well-reasoned, thoroughly documented fix for a genuinely nasty classpath problem, and the approach (engine on plain 4.13.2, TinkerPop precompiled 4.9.1 relocated inside the shaded jar, engine EXCLUDED from the shade artifactSet) is sound. The coexistence IT plus the migrated 2090-test suite give good confidence. A few things worth considering:

Build / reactor ordering (main concern). gremlin-it depends on gremlin shaded and tests classifier artifacts, which are only attached in the package phase (shade:shade binds to package by default). So a plain root mvn test (which stops at the test phase) will fail to resolve those classifiers for gremlin-it, breaking both test-compile and execution. The module description acknowledges the standalone case, but note that mvn test is listed as a first-class command in CLAUDE.md. Worth (a) confirming CI always runs install/verify (not test), and (b) adding a note to CLAUDE.md / the module that a root build must be mvn verify or mvn install, so a contributor running mvn test does not hit a confusing "artifact ...:shaded was not found".

Version drift: hardcoded TinkerPop version. gremlin-it/pom.xml hardcodes gremlin-test at 3.8.1, while gremlin/pom.xml centralizes it as the gremlin.version property. Since that property lives in the gremlin module (not the parent), gremlin-it cannot inherit it, but when TinkerPop is bumped this copy will silently drift. Consider promoting gremlin.version to the parent pom.xml properties and referencing it in both modules.

VectorGremlinIT path handling. Good move resolving importer-glove.txt via the classpath and decoding with new File(url.toURI()) (handles %20 / special chars). One residual edge: the decoded absolute path is then re-embedded into a whitespace-delimited SQL string (import database file://... with ...). If the resolved path ever contains a space, the SQL import parser will truncate at the first space, so the space-safety is only partial. Test-only and unlikely under target/, so fine to leave, just flagging.

Skips are the right kind. Using skipTests=true (not maven.test.skip) on gremlin surefire+failsafe correctly keeps the test sources compiling so the tests jar is still produced - good call, and matching the failsafe skip to the surefire one (so -Pintegration does not hang on the unshaded classpath) is exactly right.

Minor.

  • arcadedb-engine/network/server deps in gremlin-it use project.parent.version while the module inherits the version anyway - consistent with the rest of the repo, so fine.
  • Consider whether JaCoCo coverage from the relocated/shaded classes in gremlin-it is meaningful (relocated package names), not blocking, just be aware the coverage attribution may look odd.
  • ATTRIBUTIONS.md updates for both the 4.13.2 engine runtime and the relocated 4.9.1 shaded copy are correct and appreciated.

Nice work isolating the two runtimes without forking TinkerPop. The artifactSet engine-exclusion (with the clear comment explaining why a bundled relocated engine parser would reintroduce the exact ATN error) is the subtle part and it is handled and documented well.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 426 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.5.37 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.5.37 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.0 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)

robfrank added a commit that referenced this pull request Jul 11, 2026
…fy-vs-test build

Address PR #5216 review: promote gremlin.version to the parent so arcadedb-gremlin-it
references the same TinkerPop version as arcadedb-gremlin instead of a hardcoded 3.8.1
that would silently drift on a bump. Document that a full reactor run needs mvn verify/
install (not bare mvn test) because gremlin-it consumes gremlin's package-phase artifacts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@robfrank

Copy link
Copy Markdown
Collaborator Author

Addressed in 6aaddf3.

Build/reactor ordering - Documented. CI is safe: the unit-tests job runs ./mvnw verify -Pcoverage (reaches the package phase, so gremlin's shaded/tests classifiers exist before gremlin-it builds). For the contributor-facing case you flagged, updated CLAUDE.md's Maven commands to use mvn verify/install (not bare mvn test) for a full reactor run, with a note explaining that gremlin-it consumes gremlin's package-phase artifacts.

Hardcoded TinkerPop version - Fixed. Promoted gremlin.version to the parent pom.xml properties and removed the local definition in gremlin/pom.xml; both arcadedb-gremlin and arcadedb-gremlin-it now reference ${gremlin.version}. Verified mvn help:evaluate -Dexpression=gremlin.version -pl gremlin-it resolves to 3.8.1, so a future bump updates one place.

VectorGremlinIT residual space edge - Acknowledged, left as-is. You're right that the decoded path is re-embedded into a whitespace-delimited import database file://... with ... SQL string, so a space in the path would still truncate at the SQL layer (the toURI() decode only fixes the URL side). Making it fully space-safe would require SQL-level quoting of the file URL, which the import grammar doesn't cleanly support here; since the path lives under target/ it won't contain spaces in practice. The toURI() change still removes the %20-in-URL failure mode, which was the realistic one.

Skips / minor notes - The skipTests (not maven.test.skip) choice keeping test compilation + test-jar production, and matching failsafe to surefire, were deliberate for exactly the reasons you noted. JaCoCo attribution over relocated packages in gremlin-it may indeed read oddly; noted, not changing coverage config in this PR. project.parent.version usage stays consistent with the rest of the repo.

@claude

claude Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review: engine ANTLR 4.13.2 + Gremlin ANTLR relocation

Overall this is a careful, well-documented change. The PR description, the design/plan docs, the invariant-stating comments in the poms, and the migrated coexistence test make the intent and the tradeoffs easy to follow. ATTRIBUTIONS.md and CLAUDE.md are kept in sync, and the earlier review feedback (path-with-spaces hardening in VectorGremlinIT, centralizing gremlin.version) was addressed. Nice work.

Below are concerns, ranked. The first is the one I'd want verified before merge.

1. (High / please verify) Other modules still put unshaded gremlin + engine 4.13.2 on one classpath

The shading fix isolates the two ANTLR runtimes in the shipped distribution and in the new gremlin-it module, but it does not cover modules that depend on the plain (unshaded) arcadedb-gremlin jar alongside the engine. The engine bump to 4.13.2 changes ANTLR version mediation on those classpaths, so the exact clash this PR fixes can reappear where it wasn't before:

  • graphql/pom.xml depends on arcadedb-gremlin at test scope, and graphql/src/test/.../GraphQLGremlinDirectivesTest.java executes a real Gremlin traversal (g.V().has('name', bookNameParameter)) through a @gremlin directive. ArcadeGremlin runs the java/auto path first via GremlinLangScriptEngine, which is TinkerPop's ANTLR (v3 ATN) parser. That test classpath now also carries the engine's ANTLR 4.13.2 (via arcadedb-server -> arcadedb-engine). Whichever antlr4-runtime Maven mediates onto the classpath, one side's ATN is the wrong version - and the fallback in ArcadeGremlin.executeStatement only catches ScriptException, so an ATN InvalidClassException/ExceptionInInitializerError from class init would propagate rather than fall back to Groovy.
  • postgresw/pom.xml depends on plain arcadedb-gremlin at provided scope (also on the test classpath).

Since the branch was validated with mvn clean install -DskipTests, these module tests may not have actually been exercised against the new engine version. Could you run mvn -pl graphql verify (and the postgresw ITs) and confirm GraphQLGremlinDirectivesTest still passes with engine at 4.13.2? If it clashes, those modules likely need to consume the shaded/relocated gremlin jar too (as gremlin-it does), or the graphql gremlin path needs the same isolation.

2. (Medium) mvn test over the full reactor is now broken, not just "won't run gremlin-it"

gremlin-it consumes arcadedb-gremlin's shaded and tests classified artifacts, which are only attached in the package phase. A reactor mvn test stops at the test phase, so those classifiers never get produced and gremlin-it fails to resolve them - failing the whole reactor build, not just skipping a module. CLAUDE.md now documents "use verify/install", which is good, but a bare mvn test is what many IDEs and contributors run by reflex. Consider gating gremlin-it behind a profile (e.g. active only under -Pintegration) so mvn test degrades gracefully instead of hard-failing.

3. (Medium) Coverage / CI signal for the gremlin module

gremlin/pom.xml now sets skipTests=true for both surefire and failsafe, so the gremlin module produces no test results or JaCoCo data of its own; execution moves to gremlin-it against the relocated classes. Please confirm coverage aggregation and any per-module coverage gates still see the gremlin classes (relocation can change class names in the coverage report) and that CI's test-count/coverage thresholds don't silently drop.

4. (Low / maintenance) gremlin-it manually mirrors gremlin's transitive test deps

Because the shaded and tests dependencies use wildcard *:* exclusions, gremlin-it has to re-declare arcadedb-engine, arcadedb-network, arcadedb-server (+ test-jar), gremlin-test, and junit-vintage by hand. Any future test dependency added to the gremlin module must be duplicated here or the migrated tests will fail to compile/run with no obvious link back to the cause. A short comment at the top of the <dependencies> block making that coupling explicit would help the next maintainer.

Minor / nits

  • junit-vintage-engine is versioned with ${junit.jupiter.version}. It works today because they release together, but the vintage engine tracks the JUnit platform/BOM; sourcing it from a BOM would avoid future drift.
  • gremlin-it sets maven.deploy.skip=true but still installs a near-empty jar. Harmless, but maven.install.skip=true could be added too since it ships nothing.
  • AntlrCoexistenceIT cleans up with graph.drop() in finally - good. Consider also asserting the Cypher ResultSet actually returns the expected name (currently only hasNext() is checked) so a silently-empty Cypher result can't pass.

Positives

  • The artifactSet exclusion of arcadedb-engine from the shade (so the org.antlr relocation never rewrites the engine's v4 parsers) is the subtle correctness point, and it's both implemented and clearly explained in the comment.
  • Relocating only org.antlr and leaving org.apache.tinkerpop...grammar untouched is the right scoping.
  • Good regression hardening in VectorGremlinIT (classpath + new File(url.toURI()) instead of a CWD-relative path).
  • Thorough verification checklist in the PR description (bundled-class counts, single SqlParser.class in lib/, 2090 gremlin tests green).

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 426 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.5.37 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.5.37 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.0 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)

@robfrank

Copy link
Copy Markdown
Collaborator Author

Good catch on #1 - it was a real regression. Addressed in 34d4675.

1. Unshaded gremlin + engine 4.13.2 clash (graphql / postgresw) - Confirmed and fixed. Running mvn -pl graphql verify reproduced exactly what you predicted: 14 errors, Could not initialize class com.arcadedb.query.sql.grammar.SQLLexer / Cypher25Lexer - the plain gremlin jar's antlr 4.9.1 won mediation and broke the engine's v4 parsers (even pure-SQL GraphQLBasicTest failed, not just the gremlin directive). Fixed by switching both graphql (test scope) and postgresw (provided scope) to the shaded gremlin jar with the same wildcard exclusion gremlin-it uses, so the only real org.antlr on those classpaths is engine's 4.13.2 and gremlin's is the relocated copy.

  • graphql: now green - 26 tests, 0 failures/0 errors, including GraphQLGremlinDirectivesTest, GraphQLCypherDirectivesTest, and the SQL directive tests.
  • postgresw: 0 antlr init failures now. One unrelated failure remains, PostgresPreparedStatementMetricsIT.extendedProtocolSqlQueryIsTimedWithPostgresTag (asserts a Micrometer timer count >= 1, got 0) - it has no gremlin/antlr involvement, reads the shared Metrics.globalRegistry, and passes in isolation; it's a pre-existing test-ordering/global-registry-state flake, out of scope here.

2. mvn test over the full reactor - Kept the documentation approach rather than gating gremlin-it behind -Pintegration. Gating it there would remove the migrated *Test (surefire) classes from CI's unit-tests job, which runs ./mvnw verify -Pcoverage without -Pintegration and relies on gremlin-it building; the -Pintegration job runs with -DskipTests (failsafe only), so the migrated unit tests would then run nowhere. A loud fail-fast on bare mvn test (now documented in CLAUDE.md) is preferable to silently dropping unit-test coverage.

3. Coverage / CI signal - No build-failing coverage gate exists: the coverage module only runs JaCoCo report-aggregate + merge (no check goal or threshold rule), and aggregation scans **/target/jacoco*.exec repo-wide. The gremlin classes (com.arcadedb.gremlin.*) are not relocated - only org.antlr is - so their coverage attributes normally, now produced by gremlin-it.

4. gremlin-it re-declares gremlin's test deps - Added a note at the top of gremlin-it's <dependencies> documenting that the *:* wildcard exclusions require mirroring any new gremlin test dependency here.

Nits - Added maven.install.skip=true to gremlin-it; strengthened AntlrCoexistenceIT to assert the Cypher ResultSet returns the expected name (not just hasNext()). Left junit-vintage-engine on ${junit.jupiter.version}: the repo doesn't use a JUnit BOM and the gremlin module already versions vintage this way, so a BOM here would be inconsistent with the rest of the tree.

@claude

claude Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review: engine ANTLR 4.13.2 + Gremlin ANTLR relocation

Overall this is a well-scoped, carefully documented fix for a genuinely thorny classpath problem. The design spec and plan are excellent, the relocation approach is standard and sound (Trino/Spark precedent), and the coexistence proof (AntlrCoexistenceIT) is the right decisive test. The artifactSet exclusion of arcadedb-engine from the shaded jar is a subtle but critical detail that the PR gets right and documents well. Nice work.

A few points worth considering before merge:

1. CI can go green with zero Gremlin tests actually running (medium)
gremlin-it relies entirely on dependenciesToScan to discover the migrated suite from the test-jar, and gremlin-it's own src/test contains only AntlrCoexistenceIT (a failsafe *IT). If the scan ever silently resolves nothing (test-jar not attached, classifier mismatch, coordinate typo), surefire's default failIfNoTests=false means the build passes with 0 unit tests, and since the gremlin module now hard-skips its own tests, the loss would be invisible. Consider a guard so a mis-wired scan fails loudly, e.g. failIfNoTests=true on the surefire config in gremlin-it, or an assertion on the expected test count. The PR body cites "2090 tests" today; nothing enforces that number stays non-zero.

2. VectorGremlinIT resource resolution is classpath-order-dependent (low/medium)
The new code does new File(inputFile.toURI()). That only works while getResource("importer-glove.txt") returns a file: URL. The resource exists in two places on the gremlin-it classpath: the copied testResource dir (../gremlin/src/test/resources) and the arcadedb-gremlin:tests test-jar. If jar ordering ever wins, getResource returns a jar:...!/... URL and new File(uri) throws IllegalArgumentException: URI is not hierarchical rather than a clear message. It works today because target/test-classes precedes dependency jars, but the code comment explains the CWD rationale without warning about the jar-URL trap. A defensive fallback (copy the stream to a temp file when the URL is not file:) would make it robust.

3. Hand-mirrored dependency list in gremlin-it is a standing maintenance hazard (low)
Because of the *:* wildcard exclusions, every test dependency the migrated suite needs must be re-declared by hand (engine, network, server + test-jar, gremlin-test, junit-vintage). The PR already flags this in a comment, which is good, but there is no automated safety net: adding a test dep to gremlin/pom.xml and forgetting to mirror it here surfaces as a runtime NoClassDefFoundError in a separate module. Worth keeping an eye on; the failIfNoTests guard above would at least catch the wholesale-breakage case.

4. Deferred Maven-consumer isolation is real for embedders (informational)
As the spec notes, with a non-reduced pom the published arcadedb-gremlin still lists antlr4-runtime:4.9.1, so a third party depending on both arcadedb-gremlin and arcadedb-engine via Maven coordinates can still have mediation pull 4.9.1 and reintroduce the exact Could not deserialize ATN clash. This does not affect the shipped distribution or the reporter's engine-only embedding, and it is explicitly deferred, so it is fine for this PR, but it is the kind of thing that will generate a follow-up bug report from an embedder. The optional=true follow-up is the right call to prioritize.

5. Minor DX regression
Developers can no longer run an individual Gremlin test from the gremlin module (mvn -pl gremlin test -Dtest=GremlinTest is now a no-op due to the unconditional skipTests). Not blocking, but worth a line in the module README or a note pointing people at gremlin-it, since the failure mode ("my test did not run and nothing told me why") is confusing.

Things I checked that look good

  • All arcadedb-gremlin consumers (graphql, postgresw, package, gremlin-it) now use the shaded classifier consistently; no plain-jar consumer left to reintroduce the clash.
  • gremlin.version correctly lifted to the parent pom with the same 3.8.1 value; gremlin-it reuses it.
  • gremlin-it's surefire/failsafe configs merge with the parent (inheriting **/*IT.java exclusion, argLine, skip flags) rather than replacing them, so *Test runs under surefire and *IT under failsafe as expected.
  • ATTRIBUTIONS.md updated for both the engine 4.13.2 and the relocated shaded 4.9.1; license (BSD-3-Clause) unchanged and compliant.
  • docs/superpowers/ is an established pattern in this repo, so committing the spec/plan is consistent.

The riskiest functional change (engine ANTLR 4.9.1 to 4.13.2 API drift) is covered by the existing SQL/Cypher parser suites, which the PR reports green. Assuming CI confirms that plus the full 2090-test Gremlin run, this is in good shape. My only real ask before merge is item 1 (a failIfNoTests guard), which is cheap insurance against silent coverage loss.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 426 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.5.37 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.5.37 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.0 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)

robfrank added a commit that referenced this pull request Jul 11, 2026
…lution

Address PR #5216 review: add failIfNoTests=true to gremlin-it surefire so a mis-wired
dependenciesToScan (unattached test-jar, classifier mismatch) fails loudly instead of
passing with zero tests while the gremlin module hard-skips its own. Resolve
VectorGremlinIT's fixture by streaming the classpath resource to a temp file, so it works
whether getResource returns a file: or jar: URL. Point developers at gremlin-it for
running individual gremlin tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@robfrank

Copy link
Copy Markdown
Collaborator Author

Addressed in 3e802ed.

1. CI green with zero Gremlin tests (the merge ask) - Fixed. Added <failIfNoTests>true</failIfNoTests> to gremlin-it's surefire config, so a mis-wired dependenciesToScan (unattached test-jar, classifier/coordinate mismatch) now fails the build loudly instead of passing silently while the gremlin module hard-skips its own tests. Verified the guard is inert on the happy path: mvn -pl gremlin-it test still discovers and runs 236 migrated *Test (0 failures). (Failsafe always has AntlrCoexistenceIT in this module's own src/test, so the zero-test hole was specific to surefire.)

2. VectorGremlinIT jar-URL trap - Fixed. Replaced new File(url.toURI()) with streaming the classpath resource to a temp file (getResourceAsStream -> Files.copy). This no longer depends on getResource returning a file: URL, so it's robust to classpath ordering handing back a jar: URL from the arcadedb-gremlin tests jar (which would otherwise throw URI is not hierarchical). Verified VectorGremlinIT green against the shaded jar.

3. Hand-mirrored dependency list - The failIfNoTests guard above converts the wholesale-breakage case (a missing dep taking out the scan) from a silent pass into a hard failure. The coupling is also documented in the <dependencies> comment added last round.

4. Deferred Maven-consumer isolation - Agreed it's the right follow-up to prioritize; tracked in #5217 (mark gremlin's antlr4-runtime <optional>/provided, plus a release-note heads-up for embedders using both modules by coordinate).

5. DX regression running a single gremlin test - Added a pointer in gremlin/pom.xml's skip comment: run individual gremlin tests via mvn -pl gremlin-it test -Dtest=GremlinTest (or -Dit.test=... for *IT).

Thanks for the four rounds - the graphql/postgresw catch in particular was a genuine regression that -DskipTests had hidden.

@codacy-production

codacy-production Bot commented Jul 11, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage ∅ diff coverage · -7.77% coverage variation

Metric Results
Coverage variation -7.77% coverage variation
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (3debfe4) 138241 103817 75.10%
Head commit (42cdff0) 170162 (+31921) 114571 (+10754) 67.33% (-7.77%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5216) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@claude

claude Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review: engine ANTLR 4.13.2 + Gremlin ANTLR relocation

Reviewed the full diff against CLAUDE.md conventions. This is a clean, well-reasoned solution to a genuinely awkward classpath problem, and the PR description plus the design/plan docs make the intent easy to follow. Overall it looks solid and close to ready; a few points to consider below. Nice work.

What I like

  • Correct core approach. Relocating only org.antlr (not org.apache.tinkerpop.gremlin.language.grammar) and excluding arcadedb-engine from the shade artifactSet are exactly the two subtle traps in this kind of migration, and both are handled with explanatory comments. AntlrCoexistenceIT is the right regression guard: it reproduces the reported Could not deserialize ATN failure directly in one JVM.
  • No engine source changes needed. The bump is a single version property and the hand-written parser glue recompiles unchanged; the SQL/Cypher parser suites are the drift safety net. Low-risk.
  • Consumer poms are consistent. graphql, postgresw, package, and gremlin-it all consume the shaded classifier with the wildcard exclusion, each with an explanatory comment. I checked every pom.xml referencing arcadedb-gremlin, none were missed.
  • VectorGremlinIT fix is a real improvement: streaming the fixture out of the classpath instead of a CWD-relative file:// path is the correct portability fix for running from the test-jar in gremlin-it, and it now asserts the resource is present.
  • failIfNoTests=true on the gremlin-it surefire scan is a thoughtful guard against a silent zero-test pass if the test-jar classifier/coordinate ever drifts.

Points worth considering

  1. Manual dependency mirroring in gremlin-it is fragile (already acknowledged). Because of the wildcard exclusions, every test dependency the migrated suite needs must be hand-redeclared. The NOTE comment flags this, but the failure mode (a new test dep added to gremlin/pom.xml, then failing to resolve only in gremlin-it) is easy to trip over, and failIfNoTests will not catch a partial NoClassDefFoundError. Worth a short pointer from gremlin/pom.xml back to this coupling.
  2. failIfNoTests is on the surefire scan but not on failsafe in gremlin-it. Since AntlrCoexistenceIT is a real source *IT, failsafe always finds at least one test, so a classifier/coordinate mismatch that drops all the scanned *IT classes from the test-jar would still pass silently. Consider adding the same guard (or an expected-count check) to failsafe for symmetry.
  3. Hardcoded skipTests in the gremlin module makes mvn -pl gremlin test -Dtest=... a no-op. The gremlin-it workaround is documented and fine, but a property-gated skip (defaulting true) would preserve a local-debugging escape hatch without weakening CI.
  4. Deferred Maven-coordinate consumer isolation is the one loose end. As the design notes, the shipped non-shaded arcadedb-gremlin pom still advertises antlr4-runtime:4.9.1, so a third party depending on both plain arcadedb-gremlin and arcadedb-engine can still hit the exact ATN clash this PR fixes, via a different consumer path. The distribution and the reporter engine-only embedding are unaffected, so deferring is reasonable; just please ensure a tracking issue exists for the optional follow-up.
  5. Committing the docs/superpowers/{plans,specs}/*.md agent artifacts. These are internal planning/spec docs. Useful context, but confirm the maintainers want them in the repo tree long-term vs. kept in the PR description.

Minor

  • pom.xml: the new gremlin.version property leaves a double blank line after it (cosmetic).
  • No System.out, final used appropriately, AssertJ assertThat(...).isTrue() style followed, matches CLAUDE.md.

Test coverage
Good. The coexistence test is the decisive proof for the issue, and running the full gremlin suite against the shaded jar (rather than reclassifying tests by hand) is the safer choice. My only real ask is tightening the failsafe zero-test guard (point 2) so a coordinate regression cannot quietly stop exercising the migrated suite.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 426 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.5.37 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.5.37 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.0 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.41%. Comparing base (3debfe4) to head (42cdff0).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5216      +/-   ##
============================================
- Coverage     66.10%   65.41%   -0.70%     
+ Complexity      917      916       -1     
============================================
  Files          1698     1698              
  Lines        138241   138261      +20     
  Branches      29659    29665       +6     
============================================
- Hits          91391    90437     -954     
- Misses        34464    35498    +1034     
+ Partials      12386    12326      -60     

☔ View full report in Codecov by Harness.
📢 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.

robfrank and others added 7 commits July 11, 2026 21:39
… shading

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… tests against shaded jar

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cation via gremlin-it

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regenerates SQL/Cypher parsers to v4 ATN so the engine converges with the
antlr-runtime 4.10+ pulled by Spring 6 / Hibernate 6, resolving the
'Could not deserialize ATN with version 3' clash for embedded engine users.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ed jar

Keeps TinkerPop's precompiled 4.9.1 parser on its required v3 ATN runtime while
letting the engine ship plain antlr 4.13.2, so both coexist on one classpath.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…coexistence

New arcadedb-gremlin-it module runs AntlrCoexistenceIT against the shaded gremlin jar
(relocated antlr 4.9.1) plus the real engine (antlr 4.13.2). One JVM runs a SQL parse,
a Cypher parse, and a Gremlin traversal with no ATN deserialization clash.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Skips test execution in the gremlin module (test-jar still built) and executes the
compiled tests in gremlin-it via dependenciesToScan, so engine 4.13.2 and gremlin's
relocated 4.9.1 coexist during tests.

Also mirrors gremlin's test fixture resources (graphml/graphson/orientdb-export test
data, importer-glove.txt, gremlin-server config) into gremlin-it/src/test/resources:
several importer/exporter/vector tests load these via getClassLoader().getResource(...)
or a hardcoded 'src/test/resources/...' relative path, both of which only resolve
correctly when the files are unpacked on disk under gremlin-it rather than packed
inside the arcadedb-gremlin tests.jar dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
robfrank and others added 7 commits July 11, 2026 21:39
…esources

Two follow-up fixes to the antlr 4.13.2 / gremlin antlr 4.9.1 coexistence work
(93faa26):

- gremlin/pom.xml only skipped surefire (*Test), leaving the parent's inherited
  failsafe config to run gremlin's *IT classes under -Pintegration (which CI
  uses) against the unshaded classpath, hanging indefinitely on the antlr
  version collision. Add a matching failsafe skip.
- gremlin-it/src/test/resources held 9 byte-for-byte copies of gremlin's test
  fixtures. Replace them with a sibling testResources entry pointing at
  gremlin/src/test/resources, and remove the copies. VectorGremlinIT loaded its
  fixture via a hardcoded CWD-relative path instead of the classpath, which
  only worked by coincidence when the fixture was physically duplicated; switch
  it to classpath resolution (same pattern already used by the other importer
  ITs) so it works regardless of which module executes it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…haded 4.9.1

Engine now ships antlr4-runtime/antlr4-maven-plugin 4.13.2; the arcadedb-gremlin shaded
jar bundles a relocated antlr4-runtime 4.9.1. ATTRIBUTIONS.md reflects both.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n spares its v4 parsers

The gremlin-shade uber-jar pulls in a full copy of arcadedb-engine
transitively (gremlin -> arcadedb-integration (compile) ->
arcadedb-engine (compile)). The org.antlr -> com.arcadedb.gremlin.shaded.org.antlr
relocation added to isolate TinkerPop's precompiled 4.9.1 (v3 ATN)
parser from the engine's 4.13.2 (v4 ATN) runtime therefore also rewrote
the bundled engine SQL/Cypher parser classes (SqlParser, Cypher25Parser,
and friends) onto that relocated 4.9.1 runtime. Those parser classes are
v4-ATN, generated by 4.13.2, so loading them against the 4.9.1
deserializer throws "Could not deserialize ATN with version 4 (expected 3)".

The distribution ships both the plain arcadedb-engine jar (good) and the
gremlin shaded jar (broken) in lib/, launched with -cp "lib/*". JVM
wildcard classpath expansion order is unspecified, so on some hosts the
broken shaded SqlParser loads first and all SQL/Cypher parsing breaks,
reintroducing the exact bug this branch's antlr bump was meant to fix.

Fix: exclude com.arcadedb:arcadedb-engine from the shade artifactSet so
the org.antlr relocation only ever touches TinkerPop's own parser.
Engine classes keep coming from a single correct copy: the plain
arcadedb-engine jar in the distribution lib/, and an explicit test-scope
dependency in arcadedb-gremlin-it. Scoped to engine only - integration
and network are not shipped as separate distribution jars, gremlin's own
com.arcadedb.integration.* importer classes need their bundled copy, and
neither carries an antlr parser, so excluding them would break gremlin
import without fixing anything.

Also drops stray issue-number references from a few comments, per repo
convention that comments state behavioral invariants without issue tags.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mlin-it build ordering

Address PR #5216 review: null-check the classpath resource and resolve it via
new File(url.toURI()) so paths with spaces/special chars decode correctly; note in
the gremlin-it POM that it consumes gremlin's package-phase outputs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fy-vs-test build

Address PR #5216 review: promote gremlin.version to the parent so arcadedb-gremlin-it
references the same TinkerPop version as arcadedb-gremlin instead of a hardcoded 3.8.1
that would silently drift on a bump. Document that a full reactor run needs mvn verify/
install (not bare mvn test) because gremlin-it consumes gremlin's package-phase artifacts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…4.13.2 coexists

The engine bump put antlr 4.13.2 on the graphql and postgresw test classpaths, where the
plain arcadedb-gremlin jar's antlr 4.9.1 won mediation and broke the engine's v4 SQL/Cypher
parsers (Could not initialize SQLLexer/Cypher25Lexer). Switch both modules to the shaded
gremlin jar (relocated antlr, wildcard-excluded) so only engine's 4.13.2 is the real antlr.

Also: strengthen AntlrCoexistenceIT's Cypher assertion (verify the returned name, not just
hasNext); add maven.install.skip and a dependency-coupling note to gremlin-it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lution

Address PR #5216 review: add failIfNoTests=true to gremlin-it surefire so a mis-wired
dependenciesToScan (unattached test-jar, classifier mismatch) fails loudly instead of
passing with zero tests while the gremlin module hard-skips its own. Resolve
VectorGremlinIT's fixture by streaming the classpath resource to a temp file, so it works
whether getResource returns a file: or jar: URL. Point developers at gremlin-it for
running individual gremlin tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@robfrank
robfrank force-pushed the feat/4647-antlr-engine-bump-gremlin-shading branch from 3e802ed to 8091e48 Compare July 11, 2026 19:39
@claude

claude Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review: engine ANTLR 4.13.2 + Gremlin ANTLR relocation (#5216)

Thorough, well-reasoned change. The problem (v3-vs-v4 ATN clash when the engine is embedded in Spring 6 / Hibernate 6) is real, the two-runtime-coexistence approach is the standard fix, and the design/plan docs plus commit-by-commit narrative make the reasoning easy to follow. I verified the encapsulation claim: org.antlr.v4 is referenced only inside engine/ and gremlin/, so bumping the engine in isolation is safe. Attribution and CLAUDE.md were both updated. Below are the points worth a second look before merge.

Correctness / build

  • No automated guard for the central invariant. The whole fix hinges on two properties of the shaded gremlin jar: (a) it contains no arcadedb-engine parser classes, and (b) it has no bare org/antlr/... left after relocation. This PR itself had to fix a regression where the engine got bundled and relocated onto the 4.9.1 runtime (commit 0a51031), which is exactly the failure mode that will silently come back if the artifactSet/relocations config drifts. The verification for this is currently manual (javap/unzip in the PR description). Consider a small test in gremlin-it that opens the shaded jar and asserts com/arcadedb/gremlin/shaded/org/antlr/ is present, org/antlr/ is absent, and no com/arcadedb/query/**Parser classes are bundled - or a maven-enforcer rule. Cheap insurance for a subtle, high-blast-radius invariant.

Developer experience (documented, but worth emphasizing)

  • Bare mvn test no longer works for gremlin-it, graphql, postgresw. They now consume the shaded/tests classifiers that only exist after the package phase, so a test-phase reactor run fails at dependency resolution. You correctly updated CLAUDE.md to say use verify/install, and CI is safe because mvn-test.yml runs install -DskipTests before verify. The remaining friction is IDE test execution: running a single gremlin/graphql/postgresw test from IntelliJ compiles against the unshaded classpath and will hit the ATN clash. The pointer to mvn -pl gremlin-it test -Dtest=... in the surefire comment helps; it may be worth a CONTRIBUTING/README note too, since it changes a very common contributor workflow.

  • failIfNoTests asymmetry. Surefire in gremlin-it has failIfNoTests=true (good - guards against a mis-wired dependenciesToScan silently passing with zero tests). The failsafe config that scans the same test-jar for *IT classes does not. If the IT coordinate/classifier wiring ever breaks, the scan would pass green with nothing run. Consider mirroring the guard on failsafe.

Deferred item worth reconsidering

  • Maven-coordinate consumer isolation. The plain (unshaded) arcadedb-gremlin jar is still published and still exports antlr4-runtime:4.9.1 transitively, so a third-party consumer depending on both arcadedb-gremlin and arcadedb-engine re-triggers the exact mediation clash this PR fixes for the engine-only case. The shipped distribution is unaffected (it copies the shaded jar directly), so deferring is defensible, but marking gremlin's antlr4-runtime <optional>true</optional> is a one-line, low-risk change that would close the gap for embedders now rather than leaving a known sharp edge.

Minor / nits

  • gremlin-it re-declares every gremlin test dependency by hand because of the *:* exclusion - inherently fragile (a new test dep in gremlin must be mirrored here), but prominently documented in the POM comment, which is the right mitigation.
  • postgresw's shaded-gremlin dependency is provided though gremlin is only referenced from src/test; test scope would be more precise. Pre-existing (scope was already provided), so no action required.
  • The ../gremlin/src/test/resources testResource couples the two modules by filesystem path. Fine inside the reactor; just note it won't resolve if gremlin-it is ever built without the sibling source tree present.

Test coverage

Good: AntlrCoexistenceIT exercises SQL (4.13.2), Cypher (4.13.2), and a Gremlin traversal (relocated 4.9.1) in one JVM with real assertions on returned values, and the full 2090-test gremlin suite runs against the shaded jar. The VectorGremlinIT fixture change (stream classpath resource to a temp file instead of a CWD-relative path) is a solid robustness improvement for cross-module execution. The one gap is the jar-content invariant noted above.

Overall a clean solution to a genuinely awkward dependency problem, with unusually good documentation. My only merge-blocker-adjacent suggestion is the automated shaded-jar-content assertion, given how easily that invariant regressed once already.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 426 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.5.37 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.5.37 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.0 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)

@claude

claude Bot commented Jul 12, 2026

Copy link
Copy Markdown

PR Review: engine ANTLR 4.13.2 + Gremlin ANTLR relocation

Thorough, well-documented piece of build engineering. The core strategy (bump the engine to a plain unshaded antlr 4.13.2, keep TinkerPop's precompiled v3 parser working by relocating org.antlr inside the gremlin shaded uber-jar, and prove coexistence with a dedicated gremlin-it module) is sound, and excluding arcadedb-engine from the shade artifactSet is exactly the right call to avoid re-relocating the engine's own v4 parsers. ATTRIBUTIONS.md is correctly updated (both engine 4.13.2 and the relocated 4.9.1 shaded copy), and antlr is BSD so no NOTICE change is needed. The AntlrCoexistenceIT is a clean, decisive end-to-end proof.

A few things worth considering:

1. mvn test at the reactor root is now a hard failure (developer experience)

gremlin-it depends on arcadedb-gremlin's shaded uber-jar and tests test-jar, both produced only at the package phase. A plain mvn test never reaches package, so within a clean reactor those classified artifacts do not exist and dependency resolution for gremlin-it fails (unless a prior install seeded the local repo). CI is fine because it uses verify/install/package, and you documented the change in CLAUDE.md, but mvn test is a very common local workflow and it now breaks with a resolution error rather than a clear message. Consider whether gremlin-it could self-skip (e.g. a profile/activation) when its inputs are absent, so the failure is graceful.

2. gremlin-it classpath carries two copies of TinkerPop (ordering-fragile)

The gremlin-test dependency (line 143) only excludes org.antlr:antlr4-runtime, so it still transitively pulls the unshaded gremlin-core, whose GremlinParser references real org.antlr (which on this classpath resolves to the engine's 4.13.2). That unshaded parser coexists with the shaded uber-jar's own relocated GremlinParser. Two org.apache.tinkerpop...GremlinParser classes on one classpath means correctness depends on the shaded jar being declared first (it is, so 2090 tests pass today), but a future reordering of dependencies could silently let the unshaded v3 parser bind to real antlr 4.13.2 and reintroduce the Could not deserialize ATN error. Worth a comment pinning down why order matters here, or tightening the exclusions on gremlin-test.

3. gremlin-it must manually mirror every gremlin test dependency

The wildcard *:* exclusions mean any new test dependency added to gremlin/pom.xml must be duplicated by hand here or the migrated tests fail to resolve. You flagged this in the NOTE comment, which is good, but it is a real long-term maintenance trap. A brief note in the design/plan doc on how a contributor would diagnose the resulting failure would help.

4. Minor

  • AntlrCoexistenceIT proves behavior end-to-end but does not assert the relocation actually happened (e.g. that the Gremlin parser class or its ATNDeserializer resolves from com.arcadedb.gremlin.shaded.org.antlr). If relocation silently stopped, the two runtimes would clash and the test would still catch it, so this is optional, but an explicit package assertion would document intent and localize any future regression.
  • The VectorGremlinIT change (streaming the fixture out of the classpath to a temp file rather than a CWD-relative path) is a good, correct fix for running the same test against the shaded jar from a different module; deleteOnExit is appropriate here.

Test coverage

Good. The migrated suite runs against the shaded jar (the classpath that ships), the coexistence test is added, and the engine parser suites cover the 4.9 to 4.13 API-drift risk. No security concerns and no runtime performance impact (build/packaging only).

Overall this is a well-reasoned fix for a genuinely tricky classpath problem. The main thing I would want addressed before merge is item #1 (graceful behavior for mvn test), with #2 worth a hardening pass.

Reviewed with Claude Code.

@github-actions

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 426 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.5.37 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.5.37 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.8.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.20 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.21 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.21.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.21.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.0 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.0 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)

@robfrank
robfrank merged commit c48abdf into main Jul 12, 2026
27 of 32 checks passed
@robfrank
robfrank deleted the feat/4647-antlr-engine-bump-gremlin-shading branch July 12, 2026 10:46
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.

Bump engine to antlr 4.13.2 and shade/relocate antlr in the Gremlin module

1 participant