Part of #10958.
Earlier notes on #10958 mention per-assembly acw-map.{AssemblyName}.txt files and an _MergeAcwMaps target, but current main appears to write a single merged acw-map.txt from GenerateTrimmableTypeMap. This issue tracks reconciling ACW map generation with the current and planned incremental typemap design.
Current locations
src/Microsoft.Android.Sdk.TrimmableTypeMap/Generator/AcwMapWriter.cs
- Writes ACW map entries from all peers passed to it.
src/Xamarin.Android.Build.Tasks/Tasks/GenerateTrimmableTypeMap.cs
- Writes one merged
AcwMapOutputFile using all peers.
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.TypeMap.Trimmable.targets
- Passes
AcwMapOutputFile="$(IntermediateOutputPath)acw-map.txt" and records it in FileWrites.
Questions to resolve
- Do we still want per-assembly ACW map side outputs for Debug partial builds?
- If yes, should each typemap unit write
acw-map.{AssemblyName}.txt and should a separate _MergeAcwMaps target produce acw-map.txt?
- If no, update the parent issue notes to reflect that current
main intentionally keeps a single merged map.
Suggested implementation if per-assembly maps are kept
- Emit one ACW map file per typemap unit.
- Merge per-assembly maps with MSBuild
Inputs/Outputs so the merge target skips when no input map changed.
- Preserve first-entry-wins behavior expected by downstream ACW map consumers.
Acceptance criteria
- ACW map generation has a clear incremental story compatible with the planned per-assembly typemap split.
- Current consumers still receive
$(IntermediateOutputPath)acw-map.txt.
- Tests cover unchanged map inputs not touching the merged output.
Part of #10958.
Earlier notes on #10958 mention per-assembly
acw-map.{AssemblyName}.txtfiles and an_MergeAcwMapstarget, but currentmainappears to write a single mergedacw-map.txtfromGenerateTrimmableTypeMap. This issue tracks reconciling ACW map generation with the current and planned incremental typemap design.Current locations
src/Microsoft.Android.Sdk.TrimmableTypeMap/Generator/AcwMapWriter.cssrc/Xamarin.Android.Build.Tasks/Tasks/GenerateTrimmableTypeMap.csAcwMapOutputFileusing all peers.src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.TypeMap.Trimmable.targetsAcwMapOutputFile="$(IntermediateOutputPath)acw-map.txt"and records it inFileWrites.Questions to resolve
acw-map.{AssemblyName}.txtand should a separate_MergeAcwMapstarget produceacw-map.txt?mainintentionally keeps a single merged map.Suggested implementation if per-assembly maps are kept
Inputs/Outputsso the merge target skips when no input map changed.Acceptance criteria
$(IntermediateOutputPath)acw-map.txt.