Skip to content

Dependencies issue fix#397

Merged
wieslawsoltes merged 8 commits into
wieslawsoltes:masterfrom
RomanKalachik:bug/FixDeps
Aug 6, 2025
Merged

Dependencies issue fix#397
wieslawsoltes merged 8 commits into
wieslawsoltes:masterfrom
RomanKalachik:bug/FixDeps

Conversation

@RomanKalachik
Copy link
Copy Markdown
Contributor

@RomanKalachik RomanKalachik commented Aug 6, 2025

The problem:
https://www.nuget.org/packages/Avalonia.Skia/11.3.3#dependencies-body-tab
SkiaSharp.NativeAssets.Linux (>= 2.88.9)
SkiaSharp.NativeAssets.WebAssembly (>= 2.88.9)

Svg.Controls.Skia.Avalonia has SkiaSharp version 3.116.1 https://www.nuget.org/packages/Svg.Controls.Skia.Avalonia/11.3.0.2#dependencies-body-tab

To avoid these conflicts I suggest using the same SkiaSharp version as used Avalonia package.
As shown in this PR.

OR if you want to force a custom SkiaSharp version in the Svg.Controls.Skia.Avalonia package, you must care about
dependent assets:
SkiaSharp.NativeAssets.Linux
SkiaSharp.NativeAssets.Win32
SkiaSharp.NativeAssets.WebAssembly

@wieslawsoltes
Copy link
Copy Markdown
Owner

Did you check if it works with SkiaSharp 3.0 ?

@wieslawsoltes
Copy link
Copy Markdown
Owner

Why I would care about:

SkiaSharp.NativeAssets.Linux
SkiaSharp.NativeAssets.Win32
SkiaSharp.NativeAssets.WebAssembly

in Svg.Controls.Skia.Avalonia its user responsibility to add platform specific dependencies, this is unnecessary dependency

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses dependency conflicts between SkiaSharp versions used by different packages in the project. The main issue is that Avalonia.Skia uses SkiaSharp version 2.88.9 while Svg.Controls.Skia.Avalonia was using version 3.116.1, creating compatibility problems.

  • Consolidates dependency management by replacing separate SkiaSharp.props and Avalonia.props imports with a unified Avalonia.Skia.props
  • Updates SkiaSharp API usage to maintain compatibility with the older version 2.88.9
  • Removes redundant import statements across multiple project files

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Svg.Skia/Svg.Skia.csproj Replaces SkiaSharp-specific imports with unified Avalonia.Skia.props
src/Svg.Skia/SkiaModel.cs Updates API call to use older SkiaSharp version's filtering method
src/Svg.Controls.Skia.Avalonia/Svg.Controls.Skia.Avalonia.csproj Removes separate SkiaSharp and Avalonia imports, keeps unified Avalonia.Skia.props
src/Svg.Controls.Avalonia/Svg.Controls.Avalonia.csproj Removes commented-out import statements
src/Skia.Controls.Avalonia/Skia.Controls.Avalonia.csproj Removes separate SkiaSharp and Avalonia imports, keeps unified Avalonia.Skia.props

Comment thread src/Svg.Skia/SkiaModel.cs Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread src/Svg.Skia/Svg.Skia.csproj Outdated
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Aug 6, 2025
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants