Skip to content

fix(hr): Probe runtime platform for hot-reload TFM on skia-mobile heads (backport #23790) - #23791

Merged
dr1rrb merged 3 commits into
release/stable/6.6from
dev/dr/hr-skia-mobile-runtime-tfm-66
Jul 16, 2026
Merged

dr1rrb merged 3 commits into
release/stable/6.6from
dev/dr/hr-skia-mobile-runtime-tfm-66

Conversation

@dr1rrb

@dr1rrb dr1rrb commented Jul 16, 2026

Copy link
Copy Markdown
Member

GitHub Issue: unoplatform/uno-private#2256

Backport of #23790 to release/stable/6.6 (cherry-picks of the three commits).

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 RuntimeTargetFramework from compile-time symbols (__ANDROID__ & co.). Those symbols are meaningless on skia-rendering mobile 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 no platform symbol is defined and the client reports the netX.0-skia pseudo-TFM. The server then restricts the hot-reload workspace to the desktop flavor of the head, and the metadata updates are computed for a target framework the device never runs. The client now probes the platform at runtime through OperatingSystem checks, which stays correct in every flavor of the assembly.

The server-side workspace target-framework filtering (living in RoslynTargetFrameworkExtensions on this branch — git followed the rename from the Uno.HotReload split on master) also systematically logs the loaded flavors, the reported target framework and the flavors kept, and warns when the single loaded flavor does not match the reported one.

Compared to #23790, the unit-test changes are not carried over: the Uno.HotReload.Tests project is not part of this branch (the folder only holds an orphaned file not referenced by any project here). The touched projects (Uno.UI.RemoteControl.Server.Processors, Uno.UI.RemoteControl.Skia) build; the behavior is covered by the test suite on master.

PR Checklist ✅

dr1rrb added 3 commits July 16, 2026 07:56
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.
…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.
@dr1rrb
dr1rrb marked this pull request as ready for review July 16, 2026 15:05
@dr1rrb
dr1rrb merged commit 10877d0 into release/stable/6.6 Jul 16, 2026
20 of 37 checks passed
@dr1rrb
dr1rrb deleted the dev/dr/hr-skia-mobile-runtime-tfm-66 branch July 16, 2026 15:25
@unodevops

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants