Upgrade to Avalonia 12.0#473
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5fa69bfb7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1cbc3e21f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a5f1b5cfd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" /> | ||
| <PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" /> | ||
| <PackageVersion Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" /> | ||
| <PackageVersion Include="ProDiagnostics" Version="$(AvaloniaVersion)" /> |
There was a problem hiding this comment.
Replace invalid diagnostics package ID
ProDiagnostics is wired as the central diagnostics package version, but this repo’s NuGet.Config only allows nuget.org and Avalonia’s own tooling docs/packages use AvaloniaUI.DiagnosticsSupport (with Avalonia.Diagnostics explicitly deprecated). Because all sample projects import build/Avalonia.Diagnostics.props, restore will attempt to resolve ProDiagnostics at $(AvaloniaVersion) and fail with a missing-package error on a clean environment.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Re-checked this after 784f10b9f74cb35512a77fc2b68ac343f9b9d18e (Use ProDiagnostics for devtools) and 1aaaa347d04eb6c579a3b71f942438a090ad8149 (Always reference ProDiagnostics). No code rollback was needed: ProDiagnostics is published on nuget.org, including 12.0.0 (https://api.nuget.org/v3-flatcontainer/prodiagnostics/index.json lists it), and the branch currently restores/builds successfully with the shared build/Avalonia.Diagnostics.props import in place. I also reran dotnet build Svg.Skia.slnx -c Release on the current branch after making the diagnostics wiring unconditional.
Avalonia 12.0.0 upgrade
Summary
This branch updates the Avalonia integration in
Svg.Skiato stable12.0.0, retargets the Avalonia-specific packages to supported TFMs, migrates the remaining Avalonia 12 API breakages in controls, editor code, and samples, switches optional devtools support toProDiagnostics, and updates the docs/test infrastructure to match the new Avalonia lane.Key changes
Package and version updates
Directory.Packages.props12.0.0.Avalonia.Diagnosticswith opt-inProDiagnostics.xunit.v3centrally for the Avalonia headless test projects.Directory.Build.propsVersionPrefix=4.0.0.AvaloniaVersionPrefix=12.0.0.build/SkiaSharp.v3.propsandbuild/SkiaSharp.Native.v3.props3.119.3-preview.1.1, which is required by the Avalonia 12 dependency chain.build/ReactiveUI.Avalonia.propsReactiveUI.AvaloniaforTestApp.Avalonia project targeting and test infrastructure
Skia.Controls.Avalonia,Svg.Controls.Avalonia,Svg.Controls.Skia.Avalonia,Svg.Editor.Avalonia, andSvg.Editor.Skia.Avalonianet8.0;net10.0.TestAppandAvaloniaSKPictureImageSamplexunit.v3andOutputType=Exefor the Avalonia headless host.tests/Avalonia.Svg.Skia.UiTests/Avalonia.Svg.Skia.UiTests.csprojAvalonia 12 API migrations
src/Svg.Controls.Avalonia/AvaloniaSvgAssetLoader.csCharacterToGlyphMapandTryGetHorizontalGlyphAdvance.src/Svg.Editor.Skia.Avalonia/SvgEditorWorkspace.axaml.csDataTransfer,TryGetFiles(), andDragDrop.DoDragDropAsync(...).ContainerFromIndex(...).samples/AvaloniaSvgSample/MainWindow.axaml.cssamples/AvaloniaSvgSkiaSample/MainWindow.axaml.cssamples/TestApp/Services/StorageService.cssrc/Svg.Editor.Avalonia/InsertElementPickerView.axaml.cssrc/Svg.Editor.Avalonia/SymbolPickerView.axaml.csGotFocusEventArgstoFocusChangedEventArgs.samples/TestApp/Views/MainView.axamlWatermarkwithPlaceholderTextwhere required by Avalonia 12.Samples, diagnostics, and docs
AttachDevTools()in debug builds.build/Avalonia.Diagnostics.propsUseAvaloniaDiagnostics=trueand routes that toProDiagnostics..github/workflows/docs.ymlsite/config.scribanand related docs articlesnetstandard2.0as the default API extraction target, while overriding the Avalonia 12 packages tonet8.0and the Uno control package tonet10.0.Validation
Validated with:
dotnet build Svg.Skia.slnx -c Release dotnet test Svg.Skia.slnx -c Release --no-buildObserved results from the latest full solution run:
ShimSkiaSharp.UnitTests:128 passedSvg.Model.UnitTests:64 passedSvg.Editor.Skia.UnitTests:10 passedSvg.Editor.Svg.UnitTests:4 passedSvg.Controls.Skia.Uno.UnitTests:17 passedSvg.Controls.Avalonia.UnitTests:10 passedSvg.Controls.Skia.Avalonia.UnitTests:19 passedSvg.Editor.Skia.Avalonia.UnitTests:18 passedSvg.Skia.UnitTests:1327 passed,769 skippedNo test failures were observed in the final branch state.