Repository navigation
Port the JRE module trim, Jackson/snappy/commons-math3 jars and the jar closure test (#19) - #28
Merged
Merged
Conversation
…bedded-python Ported from humemai/arcadedb-embedded-python#409 (bc93f97a67) and #452 (aebf4373b5): - scripts/jre_module_exclusions.txt lists the JDK modules the bundled JRE must not contain (java.desktop, jdk.jfr, java.compiler). Dockerfile.build and build-native.sh remove them from the jdeps answer before jlink, stop when jdeps finds nothing (the java.se fallback would bring them back), and fail when one is still in `java --list-modules`. The Linux build also strips the runtime's .so files. - scripts/jar_exclusions.txt no longer excludes jackson, snappy-java and commons-math3: server mode (openapi.json, snappy bodies) and jvector refer to them. - tests/test_jar_closure.py reads the class files of the shipped jars and fails on a reference into a package no shipped jar or JDK module provides, unless listed with a reason. - tests/test_server_packaging.py gains the openapi.json and snappy body tests. Refs #19 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the built wheel The polyglot test checks the -Darcadedb.polyglotEngineEnabled=false default in jvm.py, which comes with the runtime-fixes port. The README numbers are from the 26.11.1.dev0 linux/amd64 wheel built from this tree. Refs #19 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 24, 2026
Merged
Collaborator
Author
|
No review needed from you for this one, @robfrank: it is a build trim (JRE modules, jars; wheel 73.97 MB to 67.55 MB) and CI is green. I will merge it after 24 hours unless you object here. Sorry for the earlier ping. |
This was referenced Oct 24, 2026
tae898
added a commit
that referenced
this pull request
Oct 24, 2026
Conflicts in README.md, both in sections this branch deliberately removes: main's #28 updated the size figures in the Features bullets and in the Package Contents list, and this branch drops every size figure and the Features list. Kept this branch's text in both places. Also brought the README in line with what main added: the Documentation list names the new Which package for which mode and Concurrency pages, and the examples count is 27 (example 29 landed). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #19: the group "JRE module trim, Jackson/snappy/commons-math3 handling, jar closure and payload tests". It comes after #11, #12 and #16, which are merged. The Studio jar exclusion is #20 and is not touched here.
Changes
scripts/jre_module_exclusions.txtlists the modules to keep out.scripts/Dockerfile.buildandscripts/build-native.shremove them from the jdeps answer before jlink, stop the build when jdeps finds nothing (thejava.sefallback would bring the modules back), and fail the build when one is still injava --list-modulesafterwards (a module that another module requires comes back that way). The Linux build also strips the runtime's.sofiles.scripts/jar_exclusions.txtexcluded them as "embedded-unused", checked with the embedded suite only. Server mode reaches them: swagger-core buildsGET /api/v1/openapi.jsonwith Jackson, the Prometheus remote read and write routes and snappy-compressed bodies need snappy-java, and jvector'sScoreTracker$TwoPhaseTrackerneeds commons-math3. The file now says so beside the exclusion list.tests/test_jar_closure.pyreads the class files of the shipped jars and fails on a reference into a package that no shipped jar or JDK module provides, unless an allow-list entry gives a reason. The second half does the same against the packages of the running runtime for the removed modules, checks the runtime lacks them, and runs Jackson and the YAML mapper on it.tests/test_server_packaging.pygainstest_openapi_json_is_servedandtest_snappy_compressed_bodies_are_decoded.Measured
Both wheels: linux/amd64, Python 3.12, built with
scripts/build.shfrom the same engine jars (extracted once from thearcadedata/arcadedb:26.11.1-SNAPSHOTimage), baseline is origin/main f042fd3.The JRE shrinks by 20,107,003 bytes uncompressed and the jars grow by 7 files, so the wheel is 6,425,754 bytes smaller overall. For comparison, the source commits recorded "80.8 MB to 67.7 MB" (#452) and "about 6.7 MB" for the three jars (#409), on their own tree.
Tests
import arcadedb_embedded, create a database, SQL count, CypherMATCH, an LSM_VECTOR index andvectorNeighbors: OK.test_jar_closure.py,test_server_packaging.py,test_build_scripts.py,test_jar_provenance.pyandtest_wheel_size.pypass. After removing the polyglot test (below),test_jar_closure.pyalone gives 8 passed.Not included
test_polyglot_engine_is_off_while_no_graalvm_language_shipsfromtest_jar_closure.pymoves with the runtime-fixes PR, which carries thejvm.pydefault (-Darcadedb.polyglotEngineEnabled=false) it checks.tests/test_jvm_payload.py: it importsbenchmarks/experiments/jvm_payload_check.py, which only exists in the humemai fork, so it stays there.build-native.shhas the same change and passesbash -n, but I built and ran only linux/amd64.🤖 Generated with Claude Code