[TrimmableTypeMap] Reconcile ACW map generation with per-assembly incrementality
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 252
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.