Repository navigation
perf: slim embedded JDK metadata and gate full JDK bytecode bundle behind javajive_full_jdk (v0.8.2) - #34
Merged
Conversation
…hind javajive_full_jdk for v0.8.2
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.
Summary
Reduces JavaJive's default embedded asset footprint from 8.55 MiB → 132 KiB (-8.42 MiB raw & zip 1:1 savings for downstream consumers such as
yaklang):jdk_metadata_catalog.json.zst(891 KiB → 132 KiB, -759 KiB)tools/compressjdknow projects only runtime fields (schema,release,classes,throwable_hierarchy,reference_hierarchy) intojdk_metadata_catalog.json.zst.jdk_metadata_catalog.jsonas the reviewed source of truth and are verified by tests.jdk_constructor_code.bundle.zstbehind-tags javajive_full_jdk!javajive_full_jdk) omitjdk_constructor_code.bundle.zst(0 bytes embedded), keepingHasEmbeddedJDKConstructorBundle() == falsewhile retaining the full ~132 KiB JDK invocation/hierarchy catalog and explicit declaration resolvers.-tags javajive_full_jdk) embed the full 7.7 MiB constructor bytecode bundle (HasEmbeddedJDKConstructorBundle() == true) for strict offlinejavacround-trip proofs.README.md,README.zh-CN.md, andclassparser/jdk_metadata_catalog.md.javajive.Versionto0.8.2and exportedjavajive.HasEmbeddedJDKConstructorBundle().-tags javajive_full_jdkbuilds & bundle integrity tests.Verification
CGO_ENABLED=0 go build ./cmd/javajive: 21 MiB (default) vs 29 MiB (-tags javajive_full_jdk)go run ./tools/requiredci -check/-run contract/-run corpus: PASSgo test -tags javajive_full_jdk ./classparser -run '^(TestJDKCompressedCatalogMatchesSource|TestJDKCompressedConstructorCodeMatchesSource|TestAdversarialPlatformConstructorCodeIdentityAndEffectProof|TestAdversarialPlatformIndexedDeclarationsRetainOriginalBytecode)$': PASS