Skip to content

Fix the Pages deploy for the Uno 7 WASM layout and move Uno to stable 7.0 - #5775

Open
ramezgerges wants to merge 4 commits into
mono:mainfrom
ramezgerges:dev/issue-5771-uno7-site-layout
Open

ramezgerges wants to merge 4 commits into
mono:mainfrom
ramezgerges:dev/issue-5771-uno7-site-layout

Conversation

@ramezgerges

Copy link
Copy Markdown
Contributor

Description

Fixes the Pages deploy, which has failed on every main push since the Uno 7 migration (#5377), and moves SkiaSharp.Views.Uno and the Uno samples from Uno 7 dev builds to stable Uno 7.

Why the deploy broke. Uno.Sdk 7 ships Uno.Wasm.Bootstrap 10, which changed the published wwwroot layout:

  • uno-config.js moved from package_<hash>/ to the wwwroot root, so both Uno smoke scripts failed their first input check (expected path missing: .../package_*/uno-config.js).
  • index.html and service-worker.js gained new root-absolute references ("/uno-config.js", a /_framework/... preload block, WEBAPP_PATH = '/'). The uno_rewrite_dir sed in Assemble site did not cover them, so the apps would also have failed under /SkiaSharp/gallery-uno/, /SkiaSharp/fiddle/ and the staging prefixes once the smoke check was fixed.

Fix.

  • Publish the Gallery and SkiaFiddle with WasmShellWebAppBasePath=./ (a supported Uno.Wasm.Bootstrap property, set in each project). Every bootstrapper-generated path becomes relative, so the same output works at /, under any deployment prefix, and in staging, without post-publish rewriting. The Gallery's manifest.webmanifest start_url/scope are made relative as well.
  • Remove the uno_rewrite_dir sed rewrite and the now-unused uno_gallery_base_href/fiddle_base_href outputs. Instead, each Uno app job checks that no root-absolute asset reference remains, so a future bootstrapper change cannot silently break the deployed apps again. Following Build the docs site in parallel and validate it on every PR #5772, a violation fails only that app, which the site then omits like any other failed app, so the docs still publish.
  • Both smoke scripts now check the Uno 7 layout and serve the app from a sub-path (/smoke-prefix/). A root-absolute reference therefore fails the smoke test, not just the deployed site. The cleanup trap is registered before the temporary serve root is created, so no exit path leaks it.
  • Both smoke drivers exempt the bootstrapper's handled only-if-cached probe (net::ERR_CACHE_MISS), the same exemption BrowserRunningApp already makes for the C# browser sample tests. Once the apps actually boot, this probe otherwise fails the smoke test.

Stable Uno 7.

From To
Uno.WinUI (SkiaSharp.Views.Uno.WinUI, scripts/VERSIONS.txt) 7.0.0-dev.2333 7.0.65
Uno.Sdk (Basic, Gallery and SkiaFiddle samples) 7.0.0-dev.79 7.0.22 (pins Uno.WinUI 7.0.65)
Uno.Monaco.Editor (SkiaFiddle) 7.0.0-dev.3 7.0.1

Important

Blocked on feed mirroring. These stable versions are not yet in dotnet-public, the only feed CI may restore from, so restore fails until they are ingested. The packages restore resolves that are missing from dotnet-public:

  • Uno.Sdk 7.0.22, Uno.Sdk.Extras 6.4.1
  • Uno.WinUI, Uno.WinRT, Uno.Foundation, Uno.Foundation.Logging, Uno.Foundation.Runtime.WebAssembly, Uno.UI.Adapter.Microsoft.Extensions.Logging, Uno.WinUI.Composition.Skia, Uno.WinUI.Composition.WebGpu.Init, Uno.WinUI.Graphics2DSK, Uno.WinUI.Runtime, Uno.WinUI.Runtime.{Android,AppleUIKit,Linux.FrameBuffer,MacOS,WebAssembly.Browser,Win32,X11}, all 7.0.65
  • Uno.Wasm.Bootstrap 10.1.1, Uno.Wasm.Bootstrap.DevServer 10.1.1
  • Uno.Resizetizer 2.0.1, Uno.Settings.DevServer 2.0.6, Uno.Monaco.Editor 7.0.1
  • Silk.NET.WebGPU 2.23.0, Silk.NET.WebGPU.Extensions.WGPU 2.23.0

Related issues

Fixes #5771

Required skia PR

None.

Areas affected

  • Managed API (binding/)
  • Native / C API (externals/skia/src/c, include/c)
  • Generated P/Invoke bindings
  • Native dependency or Skia update (libpng, HarfBuzz, FreeType, zlib, milestone bump, …)
  • Views & integrations (MAUI, Uno, WPF, WinUI, Blazor, …)
  • Rendering output / visual behavior
  • Performance
  • Tests
  • Build, packaging, or CI
  • Documentation or samples

Changes

None. SkiaSharp public API is unchanged.

Behavior

SkiaSharp.Views.Uno.WinUI now depends on stable Uno.WinUI 7.0.65 instead of 7.0.0-dev.2333 (non-Windows TFMs). The Uno samples now produce relative-path WASM output.

Testing

Run locally on Windows, with current-milestone WASM natives (externals-download, since this change has no native component). nuget.org was added to nuget.config temporarily for the stable packages and is not committed:

  • SkiaSharp.Views.Uno.WinUI builds against Uno.WinUI 7.0.65 (all TFMs).
  • The Basic, Gallery and SkiaFiddle samples publish for net10.0-browserwasm using the site workflow's publish arguments.
  • Gallery and SkiaFiddle both pass the updated smoke.sh, served under /smoke-prefix/: the loader is dismissed, the canvas renders, and there are no console errors. Screenshots show the full Gallery catalog, with the icon font, and SkiaFiddle compiling and running its animated sample with Roslyn.
  • The relative-path check passes on both real outputs. It fails, listing the offending paths, on a copy with root-absolute references restored, including the single-quoted WEBAPP_PATH = '/' case the old sed rewrite missed.

Not verified:

  • CI restore, which needs the mirroring above.
  • The deployed site under the real /SkiaSharp/... prefixes. That needs a staging run (automation/staging) once restore works.

Checklist

  • Tests added or updated (if omitted, explain why above): the Uno smoke tests now cover deployment-prefix independence
  • Changes above lists all public API and behavioral changes (or "None.")
  • New/changed public API? Added or updated accurate source /// documentation and regenerated bindings when applicable
  • Native change? Companion mono/skia PR linked above and bindings regenerated

🤖 Generated with Claude Code

ramezgerges and others added 2 commits November 16, 2026 17:21
Uno.Sdk 7 ships Uno.Wasm.Bootstrap 10, which writes uno-config.js at the
wwwroot root instead of package_<hash>/, adds root-absolute references to it
in index.html and service-worker.js, and sets WEBAPP_PATH = '/' in the
service worker. The smoke scripts still required package_*/uno-config.js, so
every Pages - Deploy run on main has failed since mono#5377, and the
Assemble site rewrite no longer covered the new absolute paths.

Publish the Gallery and SkiaFiddle with WasmShellWebAppBasePath=./ so every
bootstrapper-generated path is relative, and make the Gallery manifest's
start_url and scope relative. The copies then work at /gallery-uno/,
/fiddle/ and the staging prefixes without post-publish rewriting, so drop the sed rewrite from Assemble site.
Each Uno app job instead checks that no root-absolute reference reappears;
a violation fails that app, which the site then omits like any other
failed app, so docs still publish.

Update both smoke scripts to check the Uno 7 layout and to serve the app
from a sub-path, so a root-absolute reference fails the smoke test instead
of only breaking the deployed site. Exempt the bootstrapper's handled
only-if-cached probe (net::ERR_CACHE_MISS) in both drivers, matching the
existing exemption in BrowserRunningApp.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Build SkiaSharp.Views.Uno.WinUI against the stable Uno.WinUI 7.0.65 instead of
7.0.0-dev.2333, and move the Basic, Gallery, and SkiaFiddle samples from
Uno.Sdk 7.0.0-dev.79 to the stable Uno.Sdk 7.0.22, which pins the same
Uno.WinUI 7.0.65. SkiaFiddle moves from Uno.Monaco.Editor 7.0.0-dev.3 to the
stable 7.0.1.

These versions are not yet mirrored into dotnet-public, the only package feed
CI may use, so restore fails until they are ingested.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 5775

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5775"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-5775/packages --name skiasharp-pr-5775
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-5775

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey there @ramezgerges! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@mattleibow

Copy link
Copy Markdown
Contributor

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 62a0e9f8 against main at 5e3e1c51 (5 files). This is a static, read-only review; I did not build or run anything.

The Pages deploy fix mentioned in the description is already on main via #5788, so after the merge from main this diff is only the move to stable Uno 7: Uno.Sdk 7.0.22, Uno.WinUI 7.0.65 and Uno.Monaco.Editor 7.0.1. All three are published stable versions on NuGet, scripts/VERSIONS.txt matches the SkiaSharp.Views.Uno.WinUI package reference, and no other 7.0.0-dev pins remain outside historical release-notes data.

One thing I couldn't confirm statically is which Uno.WinUI version Uno.Sdk 7.0.22 pins implicitly. If it is lower than 7.0.65, the samples could see an NU1605 downgrade warning through the project reference. The same relationship existed with the dev versions, so I'm not treating it as a blocker.

LGTM.

@ramezgerges

Copy link
Copy Markdown
Contributor Author

@dalexsoto Checked: Uno.Sdk 7.0.22 pins Uno.WinUI to exactly 7.0.65, the same version SkiaSharp.Views.Uno.WinUI references, so the samples have no downgrade and no NU1605.

@dalexsoto

Copy link
Copy Markdown
Member

In response to @mattleibow's request: The Uno.Sdk 7.0.22 / Uno.WinUI 7.0.65 pins match independently verified SDK metadata. One reviewer coverage gap remains: I have not verified the targets that map UnoFeatures Skia to implicit package references in Uno.Sdk 7.0.22 versus dev.79, including their interaction with the samples' in-repo ProjectReferences. unoplatform/uno.templates@a40be220/src/Uno.Sdk/targets returned HTTP 404; the source search returned no matches and the API helper stopped at its code-search rate-limit reserve. This is a reviewer coverage gap, not a defect identified in this PR. I am retaining the completed five-file review and source evidence to continue from this exact point.

This branch has not been deployed

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

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

Pages - Deploy fails on main since Uno 7 migration: Uno smoke test expects removed package_*/uno-config.js

3 participants