[TrimmableTypeMap] Trim value-type set instantiations - #12801
Draft
simonrozsival wants to merge 3 commits into
Draft
simonrozsival wants to merge 3 commits into
simonrozsival wants to merge 3 commits into
Conversation
simonrozsival
added this pull request to stack #12799
September 15, 2026 18:15
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
simonrozsival
force-pushed
the
simonrozsival-javaset-typemap-universe
branch
from
September 15, 2026 22:34
1c79827 to
81986c9
Compare
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
Android.Runtime.JavaSet<T>instantiationsTypeMappingcall, converter leaves, direct activation interception, and root discovery edge NativeAOT-only so they are fully trimmed from CoreCLRJavaSet<T>through a rootedJavaSet<IJavaPeerable>canonical templateJavaSet<T>reflection and unsupported-value behaviorICollection<T>in the existingJavaCollection<T>universe because the target interface does not distinguish Java sets from other Java collectionsStack layer 4 above #12800. Base:
simonrozsival-javacollection-typemap-universeat54acba5784623ad6dbb30e62f7dc13b01b20bf1a. This PR contains only the JavaSet-specific delta. Stack metadata was not modified.APK size
Identical unsigned Release
android-arm64MAUI APKs using the trimmable typemap. The previous layer is updated #12800; stack base is the exactmainparent of #12793.NativeAOT
lib/arm64-v8a/libNativeAotSize.souncompressed size: 21,471,016 B. The tiny CoreCLR byte variance is packaging noise; focused linked-output validation confirms the generated CoreCLR root has no dictionary/list/collection/set built-in edges and linkedMono.Android.dllhas no value-type universe factory symbols.Validation
Microsoft.Android.Sdk.TrimmableTypeMap.Tests: 1,006 passedMicrosoft.Android.Sdk.TrimmableTypeMap.IntegrationTests: 44 passedMono.Android.csprojbuild: succeededReleaseTrimmableTypeMap_BuiltInCollectionUniversesAreNativeAotOnly: 2 passed (CoreCLR has zero built-in edges/symbols; NativeAOT retains all four)