Skip to content

[release/11.0.1xx] Reject legacy AOT disable on CoreCLR - #12960

Merged
jonathanpeppers merged 2 commits into
release/11.0.1xxfrom
jonathanpeppers-coreclr-aot-backport
Oct 1, 2026
Merged

jonathanpeppers merged 2 commits into
release/11.0.1xxfrom
jonathanpeppers-coreclr-aot-backport

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Backport of #12956 to release/11.0.1xx.

The release branch retains Mono AOT defaults, so capture an explicitly disabled RunAOTCompilation on CoreCLR before those defaults are applied. Report XA1044 with guidance to set PublishReadyToRun=false; preserve existing Mono and NativeAOT behavior. Update the diagnostic, documentation, and configuration tests. No prerequisite commits were needed.

Validation: 18 targeted MSBuild property evaluations passed across CoreCLR, MonoVM, NativeAOT, ReadyToRun, legacy AOT, and LLVM; XML/resource parsing and git diff --check passed. Full integration tests could not be run locally because this checkout lacks the required Java/Android build prerequisites.

Backport #12956 to release/11.0.1xx, capturing the explicitly disabled setting before Mono AOT defaults are applied. Preserve Mono and NativeAOT behavior and update diagnostics, docs, and configuration tests.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 19:34

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

The new condition breaks the repository’s documented profiled-AOT regeneration workflow unless its legacy property usage is migrated.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Backports XA1044 handling for explicitly disabled legacy AOT on CoreCLR.

Changes:

  • Captures RunAOTCompilation=false before defaults are applied.
  • Adds diagnostics, documentation, and regression tests.
  • Preserves MonoVM and NativeAOT handling.
File Description
Xamarin.Android.Common.targets Emits the new XA1044 diagnostic.
InvalidConfigTests.cs Tests runtime and AOT property combinations.
Resources.resx Adds the localized diagnostic.
Resources.Designer.cs Exposes the generated resource property.
Microsoft.Android.Sdk.DefaultProperties.targets Captures explicit legacy AOT disablement.
xa1044.md Documents XA1044 behavior and resolution.
build-properties.md Documents updated AOT property semantics.
Files not reviewed (1)
  • src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs: Generated file

CoreCLR test projects formerly set RunAOTCompilation=false through AotAssemblies and per-ABI test setup. With XA1044 rejecting that legacy property, these fixtures fail before reaching the behavior they test. Omit Mono AOT settings for CoreCLR, retaining intentional invalid-configuration coverage and existing ReadyToRun defaults.

Co-authored-by: Copilot App <[email protected]>
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Oct 1, 2026
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) October 1, 2026 16:51
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@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 backport captures explicit RunAOTCompilation=false before CoreCLR's defaults and reports XA1044 with the correct PublishReadyToRun=false guidance. The complete current change preserves MonoVM and NativeAOT handling, migrates affected callers, and keeps diagnostic resources, generated accessors and documentation aligned. No current blocking issue remains; the accepted Mono-only profiled-AOT workflow is non-blocking.

@jonathanpeppers
jonathanpeppers merged commit 1facfd1 into release/11.0.1xx Oct 1, 2026
44 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-coreclr-aot-backport branch October 1, 2026 19:37
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.

3 participants