Skip to content

[TrimmableTypeMap] Extract root typemap generation into GenerateEntryPointTypeMap task #11493

@simonrozsival

Description

@simonrozsival

Part of #10958.

TrimmableTypeMapGenerator.GenerateTypeMapAssemblies(...) currently emits both per-assembly typemap DLLs and the root _Microsoft.Android.TypeMaps.dll in one monolithic pipeline. The proposed partial-build design calls for a separate entry-point/root typemap task. This issue tracks extracting that root generation as an independent build task without enabling full per-assembly partial builds yet.

Current locations

  • src/Microsoft.Android.Sdk.TrimmableTypeMap/TrimmableTypeMapGenerator.cs
    • GenerateTypeMapAssemblies(...) creates each _{Assembly}.TypeMap and then creates _Microsoft.Android.TypeMaps via RootTypeMapAssemblyGenerator.
  • src/Microsoft.Android.Sdk.TrimmableTypeMap/Generator/RootTypeMapAssemblyGenerator.cs
    • Contains the root assembly emitter logic.
  • src/Xamarin.Android.Build.Tasks/Tasks/GenerateTrimmableTypeMap.cs
    • Writes all generated assemblies returned by the generator.

Suggested implementation

  • Add a GenerateEntryPointTypeMap build task that takes the per-assembly typemap assembly names/files and emits _Microsoft.Android.TypeMaps.dll.
  • Keep existing behavior and shared-vs-per-assembly universe semantics.
  • Initially wire it in a way that preserves current build behavior; the full Debug partial-build split can happen in a follow-up issue.

Acceptance criteria

  • Root typemap assembly generation is available as a separate task/API surface.
  • Existing trimmable typemap behavior remains unchanged.
  • Tests cover root assembly generation through the new task path.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions