Repository navigation
[tests] Verify System.IO.Hashing 11 with NativeAOT - #12444
Conversation
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
There was a problem hiding this comment.
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.Ignoregate that prevented theSystemIOHashingtest 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.
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
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.
|
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. |
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