Repository navigation
fix(hr): Probe runtime platform for hot-reload TFM on skia-mobile heads - #23790
Conversation
The client computed the platform of its RuntimeTargetFramework from compile-time symbols (__ANDROID__ & co.). Those symbols are meaningless on skia-rendering android/ios/maccatalyst/tvos heads: the uno-runtime asset selection swaps the plain-netX.0 skia flavor of Uno.UI.RemoteControl.dll in for the per-platform one, so the client reported the 'netX.0-skia' pseudo-TFM and the server restricted the hot-reload workspace to the desktop flavor, leaving detected changes never applied on the device. Probe the platform at runtime through OperatingSystem checks instead, which stays correct in every flavor of the assembly.
|
Claude finished @dr1rrb's task in 2m 1s —— View job Code Review
SummaryVerdict: Ship it. No blocking issues. The fix is correct, minimal, and follows the framework's platform-targeting conventions exactly. AnalysisRoot cause is correctly identified and addressed. The Platform probe order is correct:
Comment length — the 7-line block comment is above the "a line or two" guideline in No async/event/DependencyProperty/allocation concerns — the method is a static helper that returns a string; it has no I/O, no Test coverage — the PR description explains that the platform probe is inherently runtime-OS-dependent and is exercised indirectly by the existing server-side TFM-matching suite (74 tests passing). A dedicated unit test would require mocking |
|
Claude finished @dr1rrb's task in 2m 24s —— View job Code Review
SummaryVerdict: LGTM — the change is a correct, targeted root-cause fix with no identified bugs. What the fix does (in brief): The skia-flavor Checks:
No inline comments — no blocking issues found. |
There was a problem hiding this comment.
Pull request overview
Fixes hot-reload target-framework reporting on Skia-rendering mobile heads (Android/iOS/Mac Catalyst/tvOS) by deriving the platform portion of the runtime TFM from runtime OS detection rather than compile-time symbols, ensuring the server computes metadata updates against the correct target.
Changes:
- Replace compile-time platform symbol checks with
OperatingSystem.Is*()runtime probes when composingRuntimeTargetFramework. - Update the method documentation to reflect the new runtime-based platform detection approach.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ing path The single-flavor path (project single-targeted, or TargetFramework already pinned by the IDE at evaluation) returned without any trace, leaving a workspace pinned to the wrong flavor invisible in the logs. The restriction message also omitted which flavors had been loaded. Every path of FilterHeadProjectTargetFramework now reports the loaded target frameworks, the one the application reported and the ones kept.
When the workspace holds a single flavor of the head project (single- targeted, or TargetFramework pinned by the IDE at evaluation) that does not match the target framework the application reported, updates emitted from it will most likely not apply; surface it as a warning instead of a plain trace. Unresolved flavors keep the neutral trace, a mismatch cannot be asserted for them.
|
Claude finished @dr1rrb's task in 2m 52s —— View job Code Review
SummaryVerdict: Ship it. The fix is a correct, well-scoped root-cause repair. No blocking issues found across all four changed files. AnalysisRoot cause and fix: The skia-rendering mobile heads load the Platform probe order is correct.
Single-flavor warning path in
Test coverage is appropriate: the five Comment length: the 7-line block at No async/cancellation, DependencyProperty, event, or allocation concerns in the changed code. |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23790/wasm-skia-net9/index.html |
…ime-tfm-66 fix(hr): Probe runtime platform for hot-reload TFM on skia-mobile heads (backport #23790)
|
|
GitHub Issue: closes unoplatform/uno-private#2256
PR Type:
🐞 Bugfix
What changed? 🚀
On skia-rendering Android/iOS (and Mac Catalyst/tvOS) heads, hot reload detects XAML/C# changes but never applies them on the device.
The client computed the platform part of its
RuntimeTargetFrameworkfrom compile-time symbols (__ANDROID__& co.). Those symbols are meaningless on skia-rendering mobile heads: the uno-runtime asset selection swaps the plain-netX.0skia flavor ofUno.UI.RemoteControl.dllin for the per-platform one, so no platform symbol is defined and the client reports thenetX.0-skiapseudo-TFM. The server then restricts the hot-reload workspace to the desktop flavor of the head (Hot-reload workspace restricted to 'net10.0-desktop' for the application's 'net10.0-skia'), and the metadata updates are computed for a target framework the device never runs.This PR probes the platform at runtime through
OperatingSystemchecks instead (IsAndroid(),IsTvOS(),IsMacCatalyst()— tested beforeIsIOS()since Catalyst also reports it —IsIOS(),IsBrowser()), which stays correct in every flavor of the assembly. Desktop heads still report theskiapseudo-TFM, which the server already treats as thenetX.0-desktop/netX.0family; the server-side matching is unchanged.On the server side, the workspace target-framework filtering now systematically logs the loaded flavors, the target framework the application reported and the flavors kept — including the previously-silent single-flavor path (project single-targeted, or
TargetFrameworkalready pinned by the IDE at evaluation). When that single loaded flavor does not match the reported target framework — a workspace pinned to the wrong flavor, from which updates will most likely not apply — it is surfaced as a warning.Validated with the
Uno.HotReload.Testssuite (76 passing, now also asserting the filtering traces and the mismatch warning); the platform probe itself is runtime-OS dependent and covered by the existing server-side matching tests consuming the reported values.PR Checklist ✅
Screenshots Compare Test Runresults.