Skip to content

[tests] Verify System.IO.Hashing 11 with NativeAOT - #12444

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-test-nativeaot-system-io-hashing
Aug 19, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-test-nativeaot-system-io-hashing

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Tests that a Release NativeAOT application can reference and use System.IO.Hashing 11 when the Android runtime pack contains an older version.

The app uses Crc32ParameterSet, an API added in System.IO.Hashing 11, to verify the newer package is selected during compilation and NativeAOT publishing.

Fixes #10606

Verify System.IO.Hashing 11 can override the runtime-pack copy in a Release NativeAOT application.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 60b06bf6-e06a-449a-9956-3f10e6c09235
Copilot AI lite review requested due to automatic review settings August 19, 2026 14:57

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.

Pull request overview

This PR updates an existing build test in Xamarin.Android.Build.Tests to validate that a Release NativeAOT Android app can successfully reference and use System.IO.Hashing 11 APIs even when the Android runtime pack provides an older System.IO.Hashing version, addressing the version-conflict scenario described in #10606.

Changes:

  • Removes the Assert.Ignore gate that prevented the SystemIOHashing test from running for NativeAOT.
  • Runs the NativeAOT case as Release and updates the package reference to System.IO.Hashing 11.
  • Updates the test app code to use Crc32ParameterSet (an API introduced in System.IO.Hashing 11) to ensure the newer assembly is selected during compilation/publish.

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

Copy link
Copy Markdown
Member Author

@dalexsoto review

@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) August 19, 2026 18:31

@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 Release NativeAOT test now compiles and AOT-processes the v11-only Crc32ParameterSet API against the older runtime-pack assembly, and exact-head targeted CI passes both runtime cases.

@jonathanpeppers
jonathanpeppers merged commit ec5715c into main Aug 19, 2026
45 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-test-nativeaot-system-io-hashing branch August 19, 2026 19:28
@akoeplinger

Copy link
Copy Markdown
Member

I might be missing something but doesn't this rely on the assumption that the runtime pack version is < 11.0.0-rc.1.26413.103? this won't be true for long :)

@jonathanpeppers

Copy link
Copy Markdown
Member Author

I might be missing something but doesn't this rely on the assumption that the runtime pack version is < 11.0.0-rc.1.26413.103? this won't be true for long :)

We are still using System.IO.Hashing 10.0.x, it's just asserting a project can use newer.

But we'll want to update that number in the future, for sure.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

[NativeAot] System.IO.Hashing versions conflict

4 participants