Skip to content

[tests] Re-enable NativeAOT binding Java coverage - #13272

Merged
simonrozsival merged 1 commit into
mainfrom
simonrozsival-bound-java-retention
Oct 29, 2026
Merged

simonrozsival merged 1 commit into
mainfrom
simonrozsival-bound-java-retention

Conversation

@simonrozsival

Copy link
Copy Markdown
Member

Pull Request

This change removes the NativeAOT skip from BindingWithAndroidJavaSource. The case was skipped while R8 was removing bound Java classes from classes.dex; the current retained-typemap R8 pipeline passes the repro, so leaving it skipped hides regressions in the original issue. No broad keep rules for every class in embedded jars are introduced.

Fixes #11774. The test also covers the binding-specific repro reported in #11835, which is already closed as a duplicate.

Validation:

  • make prepare CONFIGURATION=Release — passed.
  • make all CONFIGURATION=Release — failed while creating the reference pack because the extra API-level reference assembly (37.1) had not yet been built.
  • make leeroy CONFIGURATION=Release — passed; built the extra API levels and configured the local workload.
  • ./dotnet-local.sh test bin/TestRelease/net10.0/Xamarin.Android.Build.Tests.dll --filter 'Name~BindingWithAndroidJavaSource|Name~BuildAfterMultiDexIsNotRequired' --logger 'trx;LogFileName=bound-java-retention.trx' --results-directory /Users/simon/.copilot/session-state/e00789f7-369c-41ca-bffe-dcb107c22fd3/files/TestResults — passed: 4 passed, 0 failed, 0 skipped.

title and
description
should follow the
commit-messages.md workflow documentation, and in particular should include:

  • Useful description of why the change is necessary.
  • Links to issues fixed.
  • Unit tests.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: e00789f7-369c-41ca-bffe-dcb107c22fd3
Copilot AI balanced review requested due to automatic review settings October 27, 2026 10:25

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

The test-only change preserves existing guards and assertions, has no identified defects, and reports four passing focused tests.

No open issues 🎉

What changed in this PR

Restores NativeAOT regression coverage for bound Java retention by removing the skip from BindingWithAndroidJavaSource, covering the binding scenario associated with #11774 and #11835.

Changes:

  • Re-enables the existing NativeAOT test while preserving unsupported-configuration checks and dex-content assertions.
  • Leaves production code and R8 keep rules unchanged.
File Description
src/​Xamarin.Android.Build.Tasks/​Tests/​Xamarin.Android.Build.Tests/​BindingBuildTest.cs Removes the NativeAOT skip from the binding Java-source test.

Review effort: Balanced

@simonrozsival simonrozsival added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Oct 29, 2026
@simonrozsival

Copy link
Copy Markdown
Member Author

@dalexsoto review

@simonrozsival
simonrozsival enabled auto-merge (squash) October 29, 2026 12:35
@simonrozsival
simonrozsival merged commit a78439a into main Oct 29, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the simonrozsival-bound-java-retention branch October 29, 2026 13:28
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.

[TrimmableTypeMap] R8 shrinking removes unreferenced AndroidJavaSource (user Java) classes under NativeAOT

3 participants