Skip to content

[build] Remove obsolete Android workload dependencies - #12903

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-workload-manifest-cleanup
Sep 25, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-workload-manifest-cleanup

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • replace the Android workload manifest's Mono runtime and Mono AOT dependencies with the shared net10/current Mono tooling workloads still needed by RuntimeConfigParserTask
  • retain the temporary android-deps installer so those shared tooling packs are provisioned in local and CI SDK layouts
  • remove obsolete Mono/Emscripten manifest downloads and copying
  • retain only the CoreCLR Android runtime packs required by the native build
  • remove native Mono runtime paths, the empty java-interop-mono.cc input, and obsolete NativeAOT runtime include/link paths
  • remove unused current-workload version and Darc dependencies while retaining the .NET 9 Mono manifest dependency used for NuGet source discovery
  • temporarily skip the Release net10.0-android36.1 CoreCLR minor-API compatibility case tracked by net10 Android minor API test requires mobile-librarybuilder-net10 #12923; it should return when main moves to .NET 12 and the test advances to net11.0-android37.1

Validation

  • dotnet restore src\workloads\workloads.csproj -v:minimal --force-evaluate
  • dotnet msbuild src\native\native-clr.csproj -nologo -v:minimal -t:_BuildRuntimes
  • dotnet msbuild src\native\native-nativeaot.csproj -nologo -v:minimal -t:_BuildRuntimes
  • isolated MSBuild validation of GetAndroidWorkloadExtends against the generated manifest
  • verified the restore graph contains only the three required CoreCLR Android runtime packs
  • validated edited XML and workload manifest JSON
  • git diff --check

RuntimeConfigParserTask and its shared tooling dependency are removed separately in the stacked follow-up #12911.

Copilot AI lite review requested due to automatic review settings September 23, 2026 20:54

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.

Copilot review overview

🟡 Changes recommended

Filter or remove java-interop-mono.cc from incremental source inputs.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Removes obsolete Mono/Emscripten workload dependencies and native build configuration while retaining required CoreCLR runtime packs.

Changes:

  • Simplifies workload manifests and local installation.
  • Removes obsolete Mono runtime paths, sources, and metadata.
  • Updates native build configuration and CI wording.
File Summary
src/​Xamarin.Android.Build.Tasks/​Microsoft.NET.Sdk.Android/​WorkloadManifest.in.json Removes obsolete runtime extensions.
src/​workloads/​workloads.csproj Retains required CoreCLR runtime packs.
src/​native/​nativeaot/​host/​CMakeLists.txt Removes obsolete NativeAOT runtime configuration.
src/​native/​common/​java-interop/​CMakeLists.txt Removes obsolete source configuration; java-interop-mono.cc remains an incremental input and needs filtering or removal.
src/​native/​CMakeLists.txt Removes Mono runtime paths.
src/​native/​cmake-config/​cmake-config.csproj Removes Mono runtime substitutions.
src/​native/​clr/​host/​CMakeLists.txt Cleans obsolete runtime configuration.
eng/​Versions.props Removes unused version properties.
eng/​Version.Details.xml Removes obsolete dependencies.
build-tools/​scripts/​xa_build_configuration.cmake.in Removes obsolete Mono variables.
build-tools/​create-packs/​ConfigureLocalWorkload.targets Removes temporary dependency installation.
build-tools/​automation/​yaml-templates/​setup-test-environment-steps.yaml Updates restore-step wording.

Comment thread src/native/common/java-interop/CMakeLists.txt
@jonathanpeppers
jonathanpeppers force-pushed the jonathanpeppers-workload-manifest-cleanup branch 2 times, most recently from dd2afb2 to 43e6177 Compare September 24, 2026 14:15
@jonathanpeppers
jonathanpeppers added this pull request to stack #12912 September 24, 2026 14:23
Comment on lines +21 to +22
"microsoft-net-runtime-mono-tooling-net10",
"microsoft-net-runtime-mono-tooling"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is suspicious - why is there -mono- in there?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this line imports unconditionally:

https://github.com/dotnet/runtime/blob/main/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadManifest.targets.in#L158-L161

It will error and say you need to install the wasm-tools workload.

I think when they remove some of the Mono .targets/logic in runtime we can take this out. There is also a stacked PR removing use of the RuntimeConfigParserTask.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess .NET 12 might completely delete Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest, and this would be solved then.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like building a net10.0-android project will also need this one:

       (_CheckForMissingWorkload target) -> 
         /Users/runner/work/1/s/bin/Release/dotnet/sdk/11.0.100-rc.2.26470.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: mobile-librarybuilder-net10 [/Users/runner/work/1/a/TestRelease/09-24_22.22.51/temp/DotNetInstallAndRunMinorAPILevelsTruenet10.0-android36.1CoreCLR/UnnamedProject.csproj]
       /Users/runner/work/1/s/bin/Release/dotnet/sdk/11.0.100-rc.2.26470.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/Users/runner/work/1/a/TestRelease/09-24_22.22.51/temp/DotNetInstallAndRunMinorAPILevelsTruenet10.0-android36.1CoreCLR/UnnamedProject.csproj]

This one might get fixed when main is net12.0 and N-1 tests net11.0.

@jonathanpeppers
jonathanpeppers force-pushed the jonathanpeppers-workload-manifest-cleanup branch 3 times, most recently from 5e572fe to fc33df6 Compare September 24, 2026 20:46
Stop extending the Mono Android runtime workloads now that main only ships CoreCLR and NativeAOT. Retain only the shared net10 and current Mono tooling workloads needed by RuntimeConfigParserTask until that vestigial task is removed in a stacked follow-up.

Keep the temporary dependency workload installer so those shared tooling packs are provisioned in local and CI SDK layouts. Remove obsolete manifest downloads and native Mono runtime inputs while retaining the .NET 9 dependency used for NuGet source discovery.

Temporarily skip the Release net10 minor-API compatibility case tracked by #12923 until main advances to the .NET 12 target framework and the test moves to net11.0-android37.1.

Co-authored-by: Copilot App <[email protected]>
@jonathanpeppers
jonathanpeppers force-pushed the jonathanpeppers-workload-manifest-cleanup branch from fc33df6 to 20b9de9 Compare September 25, 2026 13:19
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Sep 25, 2026
@jonathanpeppers

Copy link
Copy Markdown
Member Author

/review

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

✅ Android PR Reviewer completed successfully!

Generated by Android PR Reviewer for #12903

@github-actions github-actions Bot 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.

✅ LGTM

Findings: 0 errors · 0 warnings · 1 suggestion

The runtime-pack restore remains wired through Prepare.proj and the CI setup, and the generated CMake paths match the restored CoreCLR package layout. The native cleanup is consistently scoped across CoreCLR and NativeAOT consumers, while the workload manifest retains the Mono tooling dependencies still required by RuntimeConfigParserTask.

All 44 CI checks passed.

Generated by Android PR Reviewer for #12903 · copilot · gpt56 · 124.2 AIC · ⌖ 11.1 AIC · ⊞ 25.9K
Comment /review to run again

}
if (startIndex == -1 || endIndex == -1 || string.IsNullOrEmpty(ExtendsElement))
var match = Regex.Match(jsonContent, "\"extends\"\\s*:\\s*\\[(?<items>[^\\]]+)\\]");
if (match.Success)

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.

🤖 💡 Formatting — Please add braces around both new if bodies. This keeps the inline C# consistent with the repository's control-flow style and avoids a future edit accidentally changing which statements are conditional.

Rule: Braces around control flow

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workload manifest and installer, CoreCLR runtime-pack restore, and native CMake cleanup are consistent with the stated scope. The retained Mono tooling and temporary .NET 10 compatibility-test skip match the documented follow-up plan.

@jonathanpeppers
jonathanpeppers merged commit deefb89 into main Sep 25, 2026
44 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-workload-manifest-cleanup branch September 25, 2026 16:58
simonrozsival pushed a commit that referenced this pull request Sep 26, 2026
## Summary

- remove the unconsumed `RuntimeConfigParserTask` invocation and binary runtime-config output
- remove dead native blob constants and timing metadata while preserving the retired timing ID
- remove the corresponding obsolete MonoVM test-field handling

Stacked on #12903.

## Validation

- parsed `Microsoft.Android.Sdk.RuntimeConfig.targets` as XML
- built `Xamarin.Android.Build.Tests.csproj`
- built the arm64 CoreCLR native runtime
- confirmed no remaining `RuntimeConfigParserTask`, `_BinaryRuntimeConfigPath`, native runtime-config blob symbol, timing event, or test field references
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants