Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

Ship Jackson, snappy-java and commons-math3; polyglot engine off by default; jar closure test - #409

Merged
tae898 merged 1 commit into
mainfrom
packaging-gaps
Oct 21, 2026
Merged

tae898 merged 1 commit into
mainfrom
packaging-gaps

Conversation

@tae898

@tae898 tae898 commented Oct 21, 2026

Copy link
Copy Markdown

Closes #408

Server mode and jvector refer to jars that scripts/jar_exclusions.txt removed as "embedded-unused", a verdict reached with the embedded suite only. This ships them again, turns the polyglot engine off by default, and adds a test that finds this class of mistake from the class files.

What changed:

  • jackson-*.jar (five jars) no longer excluded. GET /api/v1/openapi.json was a 500 NoClassDefFoundError; three Jackson jars are not enough, swagger-core also needs dataformat-yaml and datatype-jsr310. It answers 200 now.
  • snappy-java-*.jar no longer excluded. Checked against a real database before changing anything: with the jar missing, POST /api/v1/ts/{db}/prom/write and /prom/read answered 500 NoClassDefFoundError: org/xerial/snappy/Snappy, a corrupt body included. With the jar they answer 204, 400 and 200.
  • commons-math3-*.jar no longer excluded (jvector's ScoreTracker$TwoPhaseTracker). The size budget allows it.
  • start_jvm defaults -Darcadedb.polyglotEngineEnabled=false, overridable through jvm_args and ARCADEDB_JVM_ARGS. This removes the "GraalPolyglotEngine: no languages found" warning at the first SQL command and the dead WarnInterpreterOnly flag. DEFINE FUNCTION ... LANGUAGE js fails with or without the flag because GraalJS is not shipped; the docs now say so.

Tests (no skips):

  • test_jar_closure.py::test_every_class_reference_resolves_to_a_shipped_jar parses the constant pool of every class in the shipped jars (about 19,000 classes, under a second) and fails on a reference into a package no shipped jar or the JDK provides, unless ALLOWED_DANGLING lists the referencing jar and package with a reason. On the old jar set it reports all three findings above; the ten entries left are optional integrations (Micrometer binders, JBoss Logging backends, OSGi activators, the console's jline).
  • test_jar_closure.py::test_scanner_reports_a_package_whose_jar_is_missing, ::test_class_reference_parser_reads_a_real_class: the scan can fail and the parser reads a real class.
  • test_jar_closure.py::test_polyglot_engine_is_off_while_no_graalvm_language_ships.
  • test_server_packaging.py::test_openapi_json_is_served and ::test_snappy_compressed_bodies_are_decoded: both fail on the old jar set.
  • test_jvm_args.py: the new default, and test_polyglot_engine_default_can_be_overridden.

Size: the wheel grows by about 6.7 MB (7.25 MB uncompressed in the jar directory; each jar deflated with zipfile, summed by a script) from 73.6 MB to an estimated 80.4 MB, under the 90 MB warning and the 100 MB limit. jdeps over the old and new jar sets gives the same module list, so the jlink JRE is unchanged. The numbers are an estimate from the jars, not from a rebuilt wheel.

Docs updated: installation (jar count, JavaScript not available, flags table), server guide jar table, architecture, build architecture (check before adding an exclusion), java-api-coverage, testing, README.

Checks run: pre-commit on the changed files, and test_jar_closure.py, test_server_packaging.py, test_jvm_args.py, test_jvm.py, test_jar_provenance.py, test_docs_examples.py against the installed 26.10.2 runtime with the added jars from the same engine build. A rebuilt wheel and the full suite are left to CI.

🤖 Generated with Claude Code

…e off by default (#408)

Server mode and jvector refer to jars that jar_exclusions.txt removed as "embedded-unused": Jackson (GET /api/v1/openapi.json answered 500), snappy-java (Prometheus remote read and write, snappy-compressed bodies answered 500) and commons-math3 (jvector's TwoPhaseTracker). They ship again, about 6.7 MB on the wheel.

start_jvm now defaults -Darcadedb.polyglotEngineEnabled=false, because the wheel carries no GraalVM language, and drops the dead WarnInterpreterOnly flag.

tests/test_jar_closure.py reads the class files of the shipped jars and fails on a reference into a package no shipped jar provides, unless an allow-list entry gives a reason. test_server_packaging.py gains openapi.json and snappy body tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tae898
tae898 merged commit bc93f97 into main Oct 21, 2026
58 of 63 checks passed
@tae898
tae898 deleted the packaging-gaps branch October 21, 2026 16:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wheel packaging gaps: Jackson, snappy-java and commons-math3 excluded while server mode and jvector use them; polyglot engine on with no language

1 participant