Skip to content

Uno 6.7.x pins SkiaSharp 3.119.x throughout; apps on SkiaSharp 4.x get a silently mixed graph (SkiaSharp.Views 3.119.0 against SkiaSharp 4.151.1) #24259

Closed

Description

@MartinZikmund

Summary

Every first-party Uno package in Uno.Sdk 6.7.18 depends on SkiaSharp 3.119.x. The current stable SkiaSharp.Views.Uno.WinUI on nuget.org is 4.151.1. An app that references the 4.x line ends up with a graph where most SkiaSharp packages unify up to 4.151.1 but SkiaSharp.Views stays at 3.119.0, running against SkiaSharp 4.151.1 — a cross-major mismatch.

NuGet emits no warning, because dependency versions are minimums and 4.151.1 satisfies >= 3.119.0 even across a major version.

Evidence

From obj/project.assets.json of a five-head app (net10.0-windows10.0.26100, net10.0-desktop, net10.0-android, net10.0-ios, net10.0-browserwasm) on Uno.Sdk 6.7.18:

What Uno's own packages ask for:

Package Depends on
Uno.WinUI.Graphics2DSK SkiaSharp 3.119.0
Uno.WinUI.Runtime.Skia.Android SkiaSharp 3.119.0, SkiaSharp.Views 3.119.0
Uno.WinUI.Runtime.Skia.AppleUIKit SkiaSharp 3.119.0, SkiaSharp.Views 3.119.0
Uno.WinUI.Runtime.Skia.WebAssembly.Browser SkiaSharp 3.119.0
Uno.WinUI.Runtime.Skia.X11 / .MacOS / .Linux.FrameBuffer SkiaSharp 3.119.0
Uno.WinUI.Lottie SkiaSharp.Skottie 3.119.0, SkiaSharp.Views.Uno.WinUI 3.119.0
Uno.WinUI.Svg SkiaSharp.Views.Uno.WinUI 3.119.0
Uno.UI.HotDesign SkiaSharp.Views.Uno.WinUI 3.119.2, SkiaSharp.Views.WinUI 3.119.2
Uno.UI.App.Mcp SkiaSharp 3.119.0
Uno.Extensions.{Core,Hosting,Http,Localization,Logging,Storage}.WinUI SkiaSharp.Views.Uno.WinUI 3.119.0-preview.1.2

What actually resolves:

SkiaSharp/4.151.1
SkiaSharp.Views.Uno.WinUI/4.151.1
SkiaSharp.Views.WinUI/4.151.1
SkiaSharp.Skottie/4.151.1
SkiaSharp.NativeAssets.*/4.151.1
SkiaSharp.Views/3.119.0     <-- left behind at 3.x

SkiaSharp.Views 3.119.0 is pulled in by the Android and AppleUIKit rendering runtimes, so this lands on exactly the two heads that are hardest to test.

Questions

  1. What is the supported SkiaSharp version for a consumer app on Uno 6.7.x? If it is 3.119.x, that should be stated somewhere prominent — SkiaSharp.Views.Uno.WinUI 4.151.1 being the current stable on nuget.org makes 4.x the obvious pick, and nothing pushes back.
  2. Is SkiaSharp.Views 3.119.0 running against SkiaSharp 4.151.1 expected to work, or is it a latent break on Android/iOS?
  3. Should the Uno packages use a version range (or a floor plus an upper bound) so a cross-major mix produces an NU1608-style warning instead of resolving silently?

Smaller thing, same area

The Uno.Extensions.*.WinUI stable packages depend on SkiaSharp.Views.Uno.WinUI 3.119.0-preview.1.2 — a prerelease. That looks unintended for a stable release, and it means a stable app graph contains a preview package.

Why this is easy to walk into

The obvious defensive move — pinning <SkiaSharpVersion> to one major — is what I did, and it is precisely what produced the mixed graph, because I pinned to the newer one following the current stable on nuget.org. Everything builds clean on all five heads and the WinAppSDK, desktop and WebAssembly heads render correctly, so nothing surfaces the problem until something breaks at runtime on a device.

The known failure mode from the 3.x -> 4.x break is quiet: obsolete SKPaint text members became errors, and a parameterless SKFont uses SKTypeface.Empty, so text renders as nothing rather than throwing. That is the kind of thing that ships.

Environment

  • Uno.Sdk 6.7.18, .NET 10, Windows 11
  • Direct references: SkiaSharp.Views.Uno.WinUI 4.151.1, SkiaSharp.Skottie 4.151.1, Svg.Skia 5.2.2, SkiaSharp 4.151.1
  • UnoFeatures: SkiaRenderer; Hosting; Logging; Mvvm; Configuration; HttpRefit; Serialization; Localization; Svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions