Lock SkiaSharp version range to [3.119.4, 4.0.0) and document CI compatibility test (#2115) (#2122)

Th
This commit is contained in:
William Tanksley Jr authored and GitHub committed 2026-10-27 12:40:46 -06:00
1 parent 8003ae6f29
commit 7f37f3a62e
3 files changed
+15 -6

No files matched your search

+3 -3
View File
@@ -10,9 +10,9 @@
</PropertyGroup>
<ItemGroup>
<!-- Rasterizes the Liberate column's icons. Kept on the same major version as the one
Avalonia.Skia resolves, so the Avalonia app doesn't get a mismatched native Skia. -->
<PackageReference Include="SkiaSharp" Version="3.119.4" />
<!-- Rasterizes the Liberate column's icons. Bounded to [3.119.4, 4.0.0) so package updaters
cannot bump to 4.x, which removes native entry points expected by Avalonia.Skia (e.g. #2115). -->
<PackageReference Include="SkiaSharp" Version="[3.119.4, 4.0.0)" />
</ItemGroup>
<ItemGroup>
@@ -12,8 +12,9 @@
<PackageReference Include="MSTest" Version="4.5.1" />
<PackageReference Include="Google.Protobuf" Version="3.36.2" />
<!-- The Liberate icon tests rasterize with SkiaSharp, whose Linux native isn't
brought in by the SkiaSharp package itself the way Windows' and macOS' are. -->
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="3.119.4" Condition="$([MSBuild]::IsOSPlatform('Linux'))" />
brought in by the SkiaSharp package itself the way Windows' and macOS' are.
Bounded to [3.119.4, 4.0.0) to match LibationUiBase and Avalonia.Skia. -->
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="[3.119.4, 4.0.0)" Condition="$([MSBuild]::IsOSPlatform('Linux'))" />
</ItemGroup>
<ItemGroup>
@@ -7,7 +7,15 @@ namespace LibationUiBase.Tests;
[TestClass]
public class SkiaVersionCheck
{
/// <summary>
/// Avalonia.Skia runtime links against native SkiaSharp symbols (e.g. sk_fontmgr_ref_default).
/// Major upgrades such as SkiaSharp 4.x remove or rename these native exports, causing an
/// EntryPointNotFoundException crash on launch for Avalonia apps on macOS and Linux (#2115).
///
/// LibationUiBase locks the SkiaSharp PackageReference to [3.119.4, 4.0.0) so package updaters
/// and automated bots do not bump past 3.x. This test acts as a safety net in CI if the
/// PackageReference is ever manually changed or overridden.
/// </summary>
[TestMethod]
public void SkiaVersionIs3x()
{