Skip to content

[TrimmableTypeMap] Package CoreCLR preserve list in SDK pack - #11142

Merged
simonrozsival merged 1 commit into
mainfrom
dev/simonrozsival/trimmable-preserve-list-packaging
Apr 18, 2026
Merged

[TrimmableTypeMap] Package CoreCLR preserve list in SDK pack#11142
simonrozsival merged 1 commit into
mainfrom
dev/simonrozsival/trimmable-preserve-list-packaging

Conversation

@simonrozsival

@simonrozsivalsimonrozsival commented Apr 17, 2026

Copy link
Copy Markdown
Member

Part 1 of the split of #11091

Problem

The trimmable typemap's CoreCLR preserve list (Trimmable.CoreCLR.xml) was not reliably packaged in the Microsoft.Android.Sdk pack. The file lives in src/Microsoft.Android.Sdk.ILLink/PreserveLists/ but the SDK-pack glob only reached src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/PreserveLists/. Local inner builds also saw a different file set than CI.

Fix

  • build-tools/create-packs/Microsoft.Android.Sdk.proj: include src/Microsoft.Android.Sdk.ILLink/PreserveLists/** in the pack.
  • src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj: link the SDK-local PreserveLists into the project output so local inner builds see the same files as the CI SDK pack.
  • Add TrimmableTypeMap_PreserveList_IsPackagedInSdk regression test that asserts Trimmable.CoreCLR.xml is present in the preview SDK pack.

Scope

Pure packaging fix — 3 files, 14 insertions.

The trimmable typemap's CoreCLR preserve list (Trimmable.CoreCLR.xml) was
not reliably packaged in the Microsoft.Android.Sdk pack. It lived in
src/Microsoft.Android.Sdk.ILLink/PreserveLists/ but was only visible to
the ILLink project — the Sdk pack picked files from
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/PreserveLists/.
Changes:
* build-tools/create-packs/Microsoft.Android.Sdk.proj: include
src/Microsoft.Android.Sdk.ILLink/PreserveLists/**.
* src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj:
link the SDK-local PreserveLists into the project's output so local
inner-builds see the same files as the CI SDK pack.
* Add TrimmableTypeMap_PreserveList_IsPackagedInSdk regression test
asserting Trimmable.CoreCLR.xml is present in the preview SDK pack.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes SDK pack contents so the trimmable typemap’s CoreCLR trimmer descriptor is consistently available both in CI-produced packs and local inner builds of the SDK pack.

Changes:

  • Package src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/PreserveLists/** into the Microsoft.Android.Sdk.* pack under PreserveLists/.
  • Copy/link SDK-local PreserveLists/*.xml into Microsoft.Android.Sdk.ILLink output so local inner builds match pack contents.
  • Add a regression test asserting PreserveLists/Trimmable.CoreCLR.xml exists in the preview SDK pack.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

FileDescription
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/TrimmableTypeMapBuildTests.csAdds regression test validating Trimmable.CoreCLR.xml is present in the SDK pack.
src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csprojCopies SDK PreserveLists XMLs into the local pack output layout for inner builds.
build-tools/create-packs/Microsoft.Android.Sdk.projEnsures SDK PreserveLists are included in the generated SDK pack.

@simonrozsivalsimonrozsival added copilot `copilot-cli` or other AIs were used to author this trimmable-type-map labels Apr 17, 2026
@simonrozsival
simonrozsival merged commit 4335aa0 into mainApr 18, 2026
10 checks passed
@simonrozsival
simonrozsival deleted the dev/simonrozsival/trimmable-preserve-list-packaging branch April 18, 2026 07:21
@github-actionsgithub-actionsBot locked and limited conversation to collaborators May 18, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

copilot`copilot-cli` or other AIs were used to author thistrimmable-type-map

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@simonrozsival