fix(tests): Fix RuntimeTests native-iOS compile (TestFlight) - #23869
fix(tests): Fix RuntimeTests native-iOS compile (TestFlight)#23869agneszitte wants to merge 5 commits into
Conversation
The net10.0-ios build of Uno.UI.RuntimeTests.netcoremobile (exercised by the TestFlight SamplesApp build) failed to compile on three counts, none caught at PR time since native iOS is not compiled on PRs: - Given_ListViewBase: VirtualizingPanelLayout.Refresh() does not exist on the UIKit layouter (it exposes RefreshLayout()); branch on __APPLE_UIKIT__. The test is Skia-only at runtime, so the iOS branch is compile-only. - Given_Theme_Materialization: cast the null branch to (Color?) so the conditional target-types to Color? (CS0037). - Given_CollectibleAlcAssociations: suppress IL2026/IL3050 on the Reflection.Emit probe, already guarded at runtime by RuntimeFeature.IsDynamicCodeSupported. Related to #23541 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
TEMPORARY — must be reverted before merge. Relax only the iOS_TestFlight *build* job to also run on pull requests, so this PR's CI exercises the native-iOS compile fix. The App Store publish deployment jobs remain master-only, so no build is uploaded from a PR. Related to #23541 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @agneszitte's task in 1m 40s —— View job Code Review
Verdict: LGTM — no blocking issuesAll three compile fixes are minimal, correctly scoped, and use the right Uno conventions:
One reminder: commit 2 ( |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23869/wasm-skia-net9/index.html |
The Skia and native SamplesApp iOS heads carry linker-warning NoWarn lists that had drifted, each missing one code the other has, breaking the net10.0-ios TestFlight build: - Skia head was missing IL2121 (unused UnconditionalSuppressMessage in generated MetadataBuilder code) -> ~28k errors. - Native head was missing IL2072 (Activator.CreateInstance in AnimatedVisuals sample) -> 1 error. Add the missing code to each so both heads suppress the same trim warnings. Related to #23541 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @agneszitte's task in 2m 59s —— View job Code Review
Verdict: LGTM — no blocking issuesAll three compile fixes are minimal, correctly scoped, and use the right Uno conventions.
Reminder: commit 2 ( |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23869/wasm-skia-net9/index.html |
The native iOS head carried a subset of the Skia head's linker-warning NoWarn list, so the net10 ILLink kept failing one trim code at a time (IL2072, then IL2075, ...). Replace the partial list with the full set the Skia head uses so both heads suppress the same trim/AOT warnings and stop drifting. Related to #23541 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @agneszitte's task in 2m 49s —— View job Code Review
Verdict: LGTM with one non-blocking observationAll three compile fixes are minimal, correctly scoped, and use the right Uno conventions. One inline comment posted on the
Reminder: commit 2 ( |
| ;IL2026 <!-- error IL2026: System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.GetSchema(): Using member 'System.Data.DataSet.WriteXmlSchema(DataSet, XmlWriter)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. DataSet.GetSchema uses TypeDescriptor and XmlSerialization underneath which are not trimming safe. --> | ||
| </NoWarn> | ||
| <!-- Ignore linker trim/AOT warnings for the sample app (kept identical to the Skia head to avoid drift). --> | ||
| <NoWarn>$(NoWarn);IL2026;IL2057;IL2062;IL2065;IL2067;IL2068;IL2070;IL2072;IL2075;IL2077;IL2080;IL2104;IL2111;IL2121;IL2122;IL3000;IL3002;IL3050;IL3053</NoWarn> |
There was a problem hiding this comment.
Non-blocking observation — NoWarn expansion scope
The old block had 4 targeted, explicitly documented suppressions (IL2111, IL2121, IL2104, IL2026). This replacement adopts all 17 entries from Skia.netcoremobile, adding 13 suppressions (IL2057, IL2062, IL2065, IL2067, IL2068, IL2070, IL2072, IL2075, IL2077, IL2080, IL2122, IL3000, IL3002, IL3050, IL3053) that weren't previously suppressed in this head.
Per AGENTS.md: "no unjustified <NoWarn> growth". The "align heads to avoid drift" rationale is documented in the comment and is a valid maintenance argument for a SamplesApp project — the Skia head already carries this broad list. This is acceptable as-is, but worth noting: if any of those 13 new suppressions are masking a genuine warning specific to the native head, it would now be silently hidden. Consider whether a narrower targeted addition (just IL2072 for the Activator.CreateInstance call that prompted this) plus retaining the per-warning comments would be preferable.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23869/wasm-skia-net9/index.html |
|
The build 223964 found UI Test snapshots differences: Details
|
|
|
Both iOS heads inlined their own linker trim/AOT NoWarn lists, which had drifted apart and broke the net10.0-ios TestFlight build. Define the list once in SamplesApp.TrimmerWarnings.props (with per-code comments) and import it from both heads so the two can no longer diverge. No change to the effective suppressed set. Related to #23541 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @agneszitte's task in 3m 23s —— View job Code Review
Verdict: LGTM — no blocking issuesThis iteration directly addresses the main concern from the previous review rounds (the NoWarn scope expansion in
One non-blocking note: In Reminder: Commit 2 ( |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23869/wasm-skia-net9/index.html |
|
The build 224011 found UI Test snapshots differences: Details
|
GitHub Issue: closes #23541
PR Type:
🐞 Bugfix
What changed? 🚀
Uno.UI.RuntimeTests.netcoremobile(compiled fornet10.0-iosby the Publish - iOS TestFlight SamplesApp build, and by Tests - Android Native) has been failing to compile. Because native mobile is not compiled on PRs, three separate breakages merged tomasterundetected and only surfaced on the master-only TestFlight/native stages:Given_ListViewBase.When_Layouter_Refresh_RecreatesContainers—VirtualizingPanelLayout.Refresh()does not exist on the UIKit layouter (it exposesRefreshLayout()). CS1061. Fixed with an#if __APPLE_UIKIT__branch. The test is Skia-only at runtime ([PlatformCondition(Include, Skia)]), so the iOS branch is compile-only.Given_Theme_Materialization—? b.Color : nulldidn't target-type toColor?on the iOS TFM. CS0037. Fixed by casting the null branch to(Color?).Given_CollectibleAlcAssociations.CreateCollectibleBorder— Reflection.Emit (DefineDynamicAssembly(RunAndCollect)) triggers IL2026/IL3050, promoted to errors under the iOS TFM's trim/AOT analyzer. Suppressed with[UnconditionalSuppressMessage]; the method is already guarded at runtime byRuntimeFeature.IsDynamicCodeSupported(returnsAssert.Inconclusiveon trimmed/AOT targets).These are compile-only fixes to test code — no product code changes, no behavior change on any target that actually runs the tests (Skia Desktop/WASM/Windows unaffected).
Why this PR exists
The
iOS_TestFlightbuild job is gated torefs/heads/master, so the fix can't be validated on a normal PR. Commit 2 temporarily lets that build job run on PRs to prove the compile is green here. Once CI confirms, the intended path is: revert commit 2, then merge commit 1.PR Checklist ✅
Screenshots Compare Test Runresults🤖 Generated with Claude Code