Skip to content

[Microsoft.Android.Build.Tasks] Prepare typemap paths for -mt - #13468

Merged
simonrozsival merged 1 commit into
mainfrom
jonathanpeppers-typemap-path-preparation
Nov 11, 2026
Merged

simonrozsival merged 1 commit into
mainfrom
jonathanpeppers-typemap-path-preparation

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Initial preparation for -mt support in the large GenerateTrimmableTypeMap task. Resolve physical file paths through TaskEnvironment while preserving output item identities. This does not enable MT.

Adds a two-directory test for relative paths, fingerprint reuse, and stale Java cleanup.

Tested locally:

  • dotnet-local.cmd build Microsoft.Android.slnx -t:BuildDotNet -c Release -p:AndroidSdkDirectory=D:\android-toolchain\sdk -p:AndroidNdkDirectory=D:\android-toolchain\ndk -p:JavaSdkDirectory=D:\android-toolchain\jdk-21 -nr:false — passed; 86 existing binding warnings.
  • .\dotnet-local.cmd build src\Microsoft.Android.Build.Tasks\Microsoft.Android.Build.Tasks.csproj --no-restore -c Release -m -mt -nr:false -p:_AndroidTreatWarningsAsErrors=true -warnaserror:MSB4286,MSB4287,MSB4288 -v quiet — passed; no warnings.
  • .\dotnet-local.cmd test bin\TestRelease\net12.0\Microsoft.Android.Build.Tasks.Tests.dll --filter FullyQualifiedName~GenerateTrimmableTypeMapTests — 39 passed, none skipped.

Resolve physical paths through TaskEnvironment while preserving output
item identities.  This is initial preparation for -mt support in the
large GenerateTrimmableTypeMap task; it does not enable MT.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 22:01

Copilot AI 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.

🟢 Approval recommended

There are no active review issues for the task-relative path resolution changes.

No open issues 🎉

What changed in this PR

Prepares GenerateTrimmableTypeMap for future MSBuild -mt support by resolving physical paths through TaskEnvironment while preserving output item identities. This PR does not enable multithreaded execution.

Changes:

  • Makes assembly loading, Java source handling, manifest output, and fingerprint caching use task-relative physical paths.
  • Adds a two-directory regression test covering relative paths, output identities, fingerprint reuse, and stale Java cleanup.
File Description
src/​Microsoft.Android.Build.Tasks/​Tests/​Microsoft.Android.Build.Tasks.Tests/​GenerateTrimmableTypeMapTests.cs Adds task-directory path resolution and incremental-output regression coverage.
src/​Microsoft.Android.Build.Tasks/​Tasks/​GenerateTrimmableTypeMap.cs Resolves file-system operations through TaskEnvironment without changing generated item identities.

Review effort: Balanced

@simonrozsival
simonrozsival merged commit 9104ce4 into main Nov 11, 2026
41 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-typemap-path-preparation branch November 11, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants