chore(emoji): ship only resolver-reachable glyphs in graph-compose-emoji#220
Merged
Conversation
The module bundled the full Noto Emoji set (3731 SVGs, ~40MB) but EmojiLibrary resolves glyphs solely through emoji-index.properties, so the 2136 glyphs no shortcode maps to (mostly skin-tone variants 1f3fb-1f3ff) were unreachable dead weight in a to-be-published Central artifact. Drop them: 1595 reachable glyphs remain and the packaged jar falls to 3.7MB. build-emoji-set.py now copies only set(index.values()) so a fresh regen reproduces the trimmed set directly. Index unchanged; EmojiRenderTest + EmojiLibraryTest green.
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.
Why
graph-compose-emojibundled the entire Noto Emoji SVG set — 3731 glyphs,~40 MB — but
EmojiLibraryonly resolves a glyph when its codepoint is avalue in
emoji-index.properties(the gemoji-mapped shortcodes, 1595distinct).
iconForCodepointhas no raw-codepoint entry point, so the other2136 glyphs (95 % skin-tone variants
1f3fb–1f3ff) are unreachable — puredead weight in an artifact about to ship to Maven Central.
What changed
emoji-index.propertiesis byte-identical (every value still resolves to aglyph, 0 missing), so resolution behaviour is unchanged. The packaged jar
falls from ~40 MB of art to 3.7 MB.
emoji/tools/build-emoji-set.pynow builds the index first and copies onlyset(index.values())instead of everyemoji_u*.svg, so a fresh regenreproduces the trimmed set directly.
1.0.0— it has not been published yet, so this is apre-publication content fix, not a re-tag.
Verification
./mvnw test -pl .→ BUILD SUCCESS, 1464 tests, includingEmojiRenderTest(a known shortcode paints a colour glyph; an unknown one falls back to literal
text) and
EmojiLibraryTest../mvnw -f emoji/pom.xml -DskipTests clean install→ BUILD SUCCESS,
graph-compose-emoji-1.0.0.jar= 3.7 MB.Lane: build (graph-compose-emoji) — resource-set trim + generator, no engine code change.
Independent of the other open branches.