Repository navigation
Fix docs/Pages deployment for the existing Uno 7 WASM layout - #5788
Conversation
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 #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]>
|
📖 Documentation Preview Every PR builds and smoke-tests the site. Add the Removing the label removes the preview. While the label is present, each new commit updates it. This comment is automatically updated by the documentation staging workflow. |
📦 Try the packages from this PRWarning 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 -- 5788PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5788"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-5788/packages --name skiasharp-pr-5788More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-5788 |
The existing smoke-test Playwright version cannot install Chromium on ubuntu-latest now that it resolves to Ubuntu 26.04. Keep the existing dependencies and run the Pages app jobs on Ubuntu 24.04 instead. Co-authored-by: Copilot App <[email protected]>
📊 SkiaSharp benchmarks — PR #5788⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 53 slower · 🟢 20 faster
📦 Allocations — 🔴 1 more alloc · 🟢 0 less alloc
Full per-OS benchmark deltasLinux⏱️ Time (vs 🌙 nightly
📦 Allocations (vs 🌙 nightly
Windows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
Description
Split the docs/Pages deployment fix from #5775 so it can land independently of the stable Uno package updates. This PR preserves Ramez Ragaa's original deployment commit
4511522811d5f4d80fe872682f25a485333eaef1, unchanged, and excludes the version-only commit. Stable Uno version updates remain in #5775; that PR and its branch are untouched.Uno 7 emits
uno-config.jsat the publish root, not insidepackage_*. Update both smoke scripts for that layout and serve the apps under/smoke-prefix/so deployment-prefix errors are exercised. SetWasmShellWebAppBasePath=./in Gallery and SkiaFiddle, make the Gallery manifest relative, and replace incomplete post-publish rewriting with an asset-path check in the workflow. Exempt the bootstrapper's handled cache-miss probe alongside the existing exemptions.Also pin the app-validation jobs to
ubuntu-24.04: the first run confirmed both Linux publishes work with the original versions, but the existing pinned Playwright cannot install Chromium on Ubuntu 26.04, now selected byubuntu-latest. This addresses that deployment-validation blocker without upgrading dependencies.No dependency versions or feeds change:
Uno.Sdkstays7.0.0-dev.79,Uno.WinUIstays7.0.0-dev.2333, andUno.Monaco.Editorstays7.0.0-dev.3;scripts/VERSIONS.txt, the Basic sample, and the Uno views project matchmainexactly.Related issues
Fixes #5771
Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)Changes
No public API or dependency changes. Gallery and SkiaFiddle emit relative WASM paths so the same output works under production and staging prefixes. Smoke tests validate the Uno 7 publish layout and boot from a sub-path.
Testing
Validated locally on macOS ARM64, .NET SDK 10.0.404, with the original dev versions and unchanged repository feeds. Stable-version validation from #5775 is not used as evidence here. Resolved assets confirm Uno.WinUI
7.0.0-dev.2333, Uno.Wasm.Bootstrap10.1.0-dev.282, and Uno.Monaco.Editor7.0.0-dev.3.dotnet cake --target=externals-downloaddotnet docfx documentation/docfx/docfx.jsondotnet publish samples/Gallery/Uno/SkiaSharpSample.Uno.csproj -c Release -o output/gallery-uno-publish -p:PlatformTargetFrameworks="" -p:BuildFooter="Deployment-only validation" -f net10.0-browserwasm -p:WasmEnableSIMD=falsedotnet restore samples/SkiaFiddle/SkiaFiddle.csproj -p:PlatformTargetFrameworks=""dotnet publish samples/SkiaFiddle/SkiaFiddle.csproj -c Release -o output/fiddle-publish -p:PlatformTargetFrameworks="" -p:BuildFooter="Deployment-only validation" -f net10.0-browserwasm -p:WasmEnableSIMD=falsebash samples/Gallery/Uno/scripts/smoke.sh output/gallery-uno-publish/wwwroot --screenshot output/gallery-uno-smoke.png/smoke-prefix/: loader dismissed, canvas rendered, no unignored console/page errors. Screenshot shows Gallery catalog and icons.bash samples/SkiaFiddle/scripts/smoke.sh output/fiddle-publish/wwwroot --screenshot output/fiddle-smoke.png/smoke-prefix/: loader dismissed, canvas rendered, no unignored console/page errors. Screenshot shows Monaco and Roslyn's running animated sample.dotnet test tests/SkiaSharp.Tests.Console.slnx -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0bash -n samples/Gallery/Uno/scripts/smoke.sh samples/SkiaFiddle/scripts/smoke.shnode --check samples/Gallery/Uno/scripts/smoke-driver.mjsnode --check samples/SkiaFiddle/scripts/smoke-driver.mjsactionlint -shellcheck= .github/workflows/build-site.ymlactionlint .github/workflows/build-site.ymlgit show origin/main:.github/workflows/build-site.yml | actionlint -stdin-filename .github/workflows/build-site.yml -reproduces the same diagnostic types. No unrelated lint changes included.git diff --check origin/main...HEADgit diff --exit-code origin/main -- nuget.config scripts/VERSIONS.txt samples/Basic/UnoPlatform/SkiaSharpSample/SkiaSharpSample.csproj source/SkiaSharp.Views.Uno/SkiaSharp.Views.Uno.WinUI/SkiaSharp.Views.Uno.WinUI.csprojThe workflow's asset-path pattern was also run against both real publish outputs; both passed:
Regression evidence: running the
origin/mainGallery smoke script against the same published Gallery output fails withexpected path missing: output/gallery-uno-publish/wwwroot/package_*/uno-config.js; the updated script passes against that identical output.CI: Initial Pages run passed Docs, WASM natives, both Uno publish steps, Blazor, and site assembly. Both Uno smoke steps failed before browser launch with
Playwright does not support chromium on ubuntu26.04-x64. The follow-up commit pins only the app jobs to supported Ubuntu 24.04. Updated Pages run is in progress; Linux browser-smoke confirmation for that runner change is not yet available.Not run: a real published staging/production preview, Windows validation, and the Basic Uno sample publish (unchanged). No staging label was applied and no deployment was requested. This is a deployment-path change, not a graphics-rendering change; golden images are unchanged.
Checklist
Changesabove lists all public API and behavioral changes (or "None.")///documentation and regenerated bindings when applicablemono/skiaPR linked above and bindings regenerated