Repository navigation
[build] Remove obsolete Android workload dependencies - #12903
Conversation
There was a problem hiding this comment.
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
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. |
dd2afb2 to
43e6177
Compare
| "microsoft-net-runtime-mono-tooling-net10", | ||
| "microsoft-net-runtime-mono-tooling" |
There was a problem hiding this comment.
this is suspicious - why is there -mono- in there?
There was a problem hiding this comment.
I found this line imports unconditionally:
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.
There was a problem hiding this comment.
I guess .NET 12 might completely delete Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest, and this would be solved then.
There was a problem hiding this comment.
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.
5e572fe to
fc33df6
Compare
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]>
fc33df6 to
20b9de9
Compare
|
/review |
|
@dalexsoto review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
✅ 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) |
There was a problem hiding this comment.
🤖 💡 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
left a comment
There was a problem hiding this comment.
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.
## 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

Summary
RuntimeConfigParserTaskandroid-depsinstaller so those shared tooling packs are provisioned in local and CI SDK layoutsjava-interop-mono.ccinput, and obsolete NativeAOT runtime include/link pathsnet10.0-android36.1CoreCLR 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 tonet11.0-android37.1Validation
dotnet restore src\workloads\workloads.csproj -v:minimal --force-evaluatedotnet msbuild src\native\native-clr.csproj -nologo -v:minimal -t:_BuildRuntimesdotnet msbuild src\native\native-nativeaot.csproj -nologo -v:minimal -t:_BuildRuntimesGetAndroidWorkloadExtendsagainst the generated manifestgit diff --checkRuntimeConfigParserTaskand its shared tooling dependency are removed separately in the stacked follow-up #12911.