Repository navigation
fix(devserver): bridge cross-major AssemblyRef requests in host (backport #23287 + #23308) - #23638
Conversation
…ontext fix(devserver): isolate add-ins in a custom AssemblyLoadContext
fix(devserver): load add-ins into a single ALC for cross-add-in type sharing
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23638/wasm-skia-net9/index.html |
Runner images picked up a Homebrew version that refuses formulas from third-party taps until explicitly trusted, breaking every iOS UI test stage overnight: Error: Refusing to load formula facebook/fb/idb-companion from untrusted tap facebook/fb. Trust only the idb-companion formula (least privilege), with tap-level trust as fallback and a no-op on older brews that have no trust command. Also document what this script does and where idb comes from (sha256-pinned facebook/idb v1.1.8 artifact; tap dormant since 2022).
|
Heads-up: this branch now carries a cherry-pick of #23640 ( Once #23640 is merged on |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23638/wasm-skia-net9/index.html |
GitHub Issue: fixes unoplatform/uno.rider#489, fixes unoplatform/uno.studio#1027 — parent tracking issue unoplatform/uno-private#1968
PR Type:
What is the current behavior? 🤔
On a .NET 9-only machine, the DevServer host (
Uno.UI.RemoteControl.Host) from the 6.6 servicing line crash-loops at startup with exit code-532462766:The licensing add-in (
Uno.Settings.DevServer.dll, net9.0) carries the net8.0 build ofMicrosoft.Kiota.Serialization.Json(Kiota 1.22.2 ships no net9.0 TFM), whose strictAssemblyReftoSystem.Text.Encodings.Web 8.0.0.0cannot be satisfied: the host's defaultAssemblyLoadContextonly carries the v9 copy from the shared framework, and onrelease/stable/6.6add-ins are loaded with a bareAssembly.LoadFrom— the cross-major bridging that fixes this onmaster(PRs #23287 / #23308) was never backported.As a result the DevServer cannot start on .NET 9-only hosts from any IDE integration, even though the CLI launch path itself works.
What is the new behavior? 🚀
Backport of the net effect of #23287 + #23308 (two cherry-picks,
-m 1, in merge order):HostAssemblyResolution.Install()runs first thing inProgram.Main: registers anAssemblyLoadContext.Default.Resolvingbridge (TryBridgeBySimpleName— same simple name, requested version ≤ loaded version, matching PKT for signed refs) and eager-loadsSystem.*/Microsoft.Extensions.*OOB assemblies from the host directory.UNO_DEVSERVER_DISABLE_ADDIN_ALCkill switch and cross-add-in type sharing preserved), matching the shipping design onmaster.Given_HostAssemblyResolution, theAddInWithCrossMajorVersionRefs/ shared-contract fixtures, the add-in version-alignment test project, and the Linux DevServer CI test stage.With this, the v8
System.Text.Encodings.Webrequest from the licensing add-in binds to the v9/v10 copy already loaded, and the host starts on .NET 9-only machines.PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️
release/stable/6.6was limited toUno.UI.RemoteControl.Host.csprojversion drift: kept the branch'sMessagePack 3.1.7(newer security bump) and tookUno.DevTools.Telemetry 1.2.1(intentional bump from fix(devserver): load add-ins into a single ALC for cross-add-in type sharing #23308, consistent withUno.UI.RemoteControl.Server.csproj).master(HostAssemblyResolution.cs,AssemblyHelper.cs,AddInsExtensions.cs,Given_HostAssemblyResolution.cs);Uno.UI.RemoteControl.Hostbuilds clean;Given_HostAssemblyResolutionsuite: 8 passed, 1 environment-dependent inconclusive skip.Uno.WinUI.DevServer6.6.x servicing package embeds this.