Repository navigation
Align sample dependency and package prerequisites - #5297
mattleibow wants to merge 2 commits into
Conversation
Keep native asset package IDs intact when generating standalone samples, make Uno source references coexist with sibling projects, and pin generated HarfBuzz/SkiaSharp dependencies to the matching artifact families. Exercise HarfBuzz on both console hosts and provide a NuGet-only downloader plus side-by-side SDK workload provisioning without repinning the repository SDK. Co-authored-by: Copilot App <[email protected]>
|
📖 Documentation Preview 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 -- 5297PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5297"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-5297/packages --name skiasharp-pr-5297More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-5297 |
📊 SkiaSharp benchmarks — PR #5297⭐ this PR (full source build) vs 🌙 nightly · Linux · Windows · macOS
Highlights⏱️ Time — 🔴 25 slower · 🟢 36 faster
Full per-OS benchmark deltasLinux⏱️ Time (vs 🌙 nightly
Windows⏱️ Time (vs 🌙 nightly
macOS⏱️ Time (vs 🌙 nightly
|
Keep Console and DockerConsole focused on SkiaSharp and retain the existing repository-SDK workload installation path without extra feeds or SDK overrides. Co-authored-by: Copilot App <[email protected]>
Description
Give independently generated samples the correct native-asset package identities and exact SkiaSharp/HarfBuzzSharp package-family versions. Keep Uno source bindings in the source-only import without deleting unrelated project references, while each generated Uno app declares its own package prerequisites. Add a NuGet-only transport downloader that preserves other build output. The new Console/DockerConsole HarfBuzz demos and extra-SDK workload provisioning have been removed at the maintainer's request; existing Uno/Gallery HarfBuzz use remains unchanged. No test-runner, solution-format, SDK/workload provisioning, package-source, native, or production API change.
Related issues
None.
Required skia PR
None.
Areas affected
binding/)externals/skia/src/c,include/c)Changes
Public API: None; no native ABI change.
Behavior: Generated native asset references retain their own package IDs rather than becoming the base managed package. Uno source imports preserve sibling project references, and generated Uno dependencies use matching package-family versions. Sample drawing output and TFMs remain unchanged.
Testing
Scope reduction at
e43f07a9642d47119ccdee44df8f4ea5edd5ab1f:git diff --check— passed.git diff --exit-code a74f7f9492ddf8696486bffcc7a9f3020ebd7aa8 -- scripts/infra/managed/install-dotnet-workloads.ps1 scripts/azure-templates-jobs-bootstrapper.yml global.json nuget.config samples/Basic/Console/SkiaSharpSample/Program.cs samples/Basic/DockerConsole/SkiaSharpSample/Program.cs samples/Basic/DockerConsole/SkiaSharpSample/SkiaSharpSample.csproj— passed; these files exactly match the original main baseline.dotnet msbuild samples/Basic/Console/SkiaSharpSample/SkiaSharpSample.csproj -getProperty:TargetFramework -getItem:ProjectReference— passed; unchangednet10.0, only SkiaSharp and SkiaSharp Linux.NoDependencies project references remain.dotnet cake --target=externals-download --gitBranch=main --verbosity=quiet— passed; native bootstrap only, no package or source changes.dotnet cake --target=samples-generate --previewLabel=pr.5291 --buildNumber=26505.69 --verbosity=quiet— passed against the previously validated matching 41-package cohort staged in this worktree's own output directory.dotnet build samples/Basic/Console/SkiaSharpSample/SkiaSharpSample.csproj --nologo -v:qanddotnet run --project samples/Basic/Console/SkiaSharpSample/SkiaSharpSample.csproj --no-build -- --output /Users/matthew/.copilot/session-state/ecf3bcae-27d5-4a23-872e-dd6587e3f924/files/e43f07a-source-console.png— passed on macOS ARM64 using repository SDK 10.0.401; rendered an 800 x 600 PNG without HarfBuzz output.dotnet build output/samples-preview/Basic/Console/SkiaSharpSample/SkiaSharpSample.csproj -p:RestoreAdditionalProjectSources="$PWD/output/nugets" --nologo -v:qanddotnet run --project output/samples-preview/Basic/Console/SkiaSharpSample/SkiaSharpSample.csproj --no-build -- --output /Users/matthew/.copilot/session-state/ecf3bcae-27d5-4a23-872e-dd6587e3f924/files/e43f07a-package-console.png— passed; rendered an 800 x 600 PNG byte-identical to the source-mode result. Resolved source/generated dependency graphs contain no HarfBuzz managed/native packages.pwsh -NoLogo -NoProfile -File ./run.ps1fromoutput/samples-preview/Basic/DockerConsolewith matching packages staged — passed on Linux ARM64; existing .NET 10 Docker launcher rendered an 800 x 600 PNG without HarfBuzz output. Only this sample's staged packages were cleaned; no Docker prune.Earlier validation of the unchanged prerequisite fixes before the scope reduction:
dotnet cake --target=nuget-download --gitBranch=main --verbosity=quiet— passed; 41 promoted packages,output/native/and generated samples retained.dotnet build output/samples-preview/Basic/Console/SkiaSharpSample/SkiaSharpSample.csproj -p:RestoreAdditionalProjectSources=<matching-pr-packages> --nologo -v:q— passed; generated Basic Web and BrowserWebAssembly also built successfully.dotnet build <source-or-generated-Uno-project> -p:TargetFramework=net10.0-browserwasm --nologo -v:q— passed for Basic Uno, Gallery Uno, and SkiaFiddle in both source and exact-package modes (generated builds also supplied-p:RestoreAdditionalProjectSources=<matching-pr-packages>). Basic Uno and Gallery Uno also built fornet10.0-desktopin both modes. Evaluated Android, iOS, Windows, desktop, and browser reference graphs for these apps, including Gallery Shared and platform-specific references; all resolved generated SkiaSharp/HarfBuzzSharp packages share the matching PR build suffix. Package generations did not change TFMs.pwsh -NoLogo -NoProfile -File ./run.ps1from each generated Docker app's directory with exact PR packages staged — passed independently on Linux ARM64; DockerConsole rendered an image and DockerWebApi served an image. No Docker prune.dotnet test tests/SkiaSharp.Tests.Console.slnx -p:TargetFramework=net10.0 -p:TargetFrameworks=net10.0 --nologo -v:q— failed on the existing macOS ARM64ganesh-gl/DiagonalLinesgolden mismatch: 6,339 passed, 23 skipped, 1 failed. This PR does not change GPU policy, golden files, or rendering. No dedicated test suite added: existing console/Docker programs and source/generated builds exercise the changed prerequisites.Checklist
Changesabove lists all public API and behavioral changes (or "None.")///documentation and regenerated bindings when applicablemono/skiaPR linked above and bindings regenerated