Skip to content

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

Open

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.

Activity

  1. added
    needs-triage
    on May 25, 2026
  2. added
    copilot
    on May 25, 2026
  3. added this to the .NET 11 milestone on May 25, 2026
  4. removed
    needs-triage
    on May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    copilottrimmable-type-map

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions