Repository navigation
[Xamarin.Android.Build.Tasks] Separate CoreCLR bootstrap - #13093
Open
simonrozsival wants to merge 2 commits into
Open
simonrozsival wants to merge 2 commits into
simonrozsival wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The newly introduced task error must use the repository’s localized resource mechanism.
1 open finding
What changed in this PR
Separates CoreCLR bootstrap generation from Java resource generation with independent incremental tracking.
Changes:
- Adds a dedicated CoreCLR bootstrap target, inputs fingerprint, stamp, and cleanup tracking.
- Retargets remapping and trimmable-type-map dependencies.
- Expands task, incremental-build, packaging, and runtime tests.
| File | Description |
|---|---|
tests/MSBuildDeviceIntegration/Tests/R8RuntimeRemappingBuildTests.cs |
Expands CoreCLR packaging coverage. |
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets |
Defines independent bootstrap generation. |
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Tasks/GenerateNativeApplicationConfigSourcesTests.cs |
Expands bootstrap task tests. |
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs |
Tests bootstrap incrementality and recovery. |
src/Xamarin.Android.Build.Tasks/Tasks/GenerateNativeApplicationConfigSources.cs |
Restricts generation to CoreCLR. |
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.TypeMap.Trimmable.targets |
Retargets typemap preparation. |
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.R8JniRemapping.targets |
Updates binary-blob dependencies. |
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.BuildOrder.targets |
Orders generation before cleanup and packaging. |
src/Microsoft.Android.Sdk.TrimmableTypeMap/README.md |
Documents the revised pipeline. |
src/Microsoft.Android.Build.Tasks/Tests/Microsoft.Android.Build.Tasks.Tests/NativeAotBootstrapTargetsTests.cs |
Verifies target separation. |
🧠 Review effort: Balanced
Base automatically changed from
simonrozsival-nativeaot-static-data-objects
to
main
October 13, 2026 22:04
Give binary CoreCLR configuration its own inputs, completion stamp and FileWrites ownership instead of coupling it to Java resource generation. Reuse application-source prerequisites, preserve extension ordering, and wire both blob producers and typemap assembly preparation to the new binary target. Java resources now depend only on the entry assembly name. Keep the shipped task name and properties. Separately, reject direct NativeAOT invocations with a clear error, as explicitly approved, instead of silently succeeding without output. Remove the dead environment clearing and conditional-output branches; retain runtime parsing behavior. Cover payload bytes, missing-output and failed-write recovery, Clean, input isolation, JNI preload policy and NDK-free APK/AAB packaging. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use an English resource for the unsupported-runtime exception rather than a hard-coded message. Include the original AndroidRuntime value so direct-task failures identify the rejected input, while preserving the existing AndroidTask error code and runtime parsing behavior. Regenerate the resource accessor and extend the rejection fixture to check both NativeAOT casing variants, the coded diagnostic, and the absence of a bootstrap output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
simonrozsival
force-pushed
the
simonrozsival-separate-coreclr-bootstrap-generation
branch
from
October 13, 2026 22:48
b753380 to
b14b6eb
Compare
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Member
Author
|
@dalexsoto review |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
Stacked follow-up to #13081, based on
07a0b2142eea5c50a1501db13b2db9af2f6e111c. No issue is closed by this cleanup.CoreCLR configuration is already binary, but its inputs, JNI preload policy, missing-output recovery and completion stamp still belonged to
_GeneratePackageManagerJava. Separate that responsibility into_AndroidGenerateCoreClrBootstrap, with its own input fingerprint, stamp and FileWrites registration before the SDK's incremental-clean snapshot. Reuse application-source prerequisites and their extension ordering; retarget both binary-blob producers and typemap assembly-count preparation. Java resource generation now tracks only the entry assembly filename and its generator, not environment/runtimeconfig/native-library changes.Remove the unused runtime field, NativeAOT environment-clearing branch and nullable/no-output branch from the CoreCLR producer. Preserve the shipped
GenerateNativeApplicationConfigSourcestask name and public properties. Explicitly approved behavior change: direct NativeAOT calls now fail with a clear task error instead of succeeding without output; the existing runtime parser's unknown-name handling is unchanged. Production NativeAOT never invokes this task.No transport redesign, runtime/native-loader changes, new compatibility layer or deletion of required Java glue. NativeAOT linked data objects, independent providers/library hints and precise obsolete-Java upgrade cleanup remain intact.