Skip to content

Chore/upgrade nuget packages - #44

Open
hflexgrig wants to merge 3 commits into
TheEightBot:mainfrom
hflexgrig:chore/upgrade-nuget-packages
Open

hflexgrig wants to merge 3 commits into
TheEightBot:mainfrom
hflexgrig:chore/upgrade-nuget-packages

Conversation

@hflexgrig

@hflexgrig hflexgrig commented Oct 30, 2026 •

Copy link
Copy Markdown

Summary

Upgrades all NuGet packages to their latest versions and fixes the sample app crashing on launch on iOS 27.

Package upgrades

Package Old New
SkiaSharp / SkiaSharp.Views.Maui.Controls 3.119.2 4.154.0
Svg.Skia 3.2.1 5.2.3
Microsoft.Maui.Controls (MauiVersion, now pinned) 10.0.110 10.0.120
Microsoft.Extensions.Logging.Debug 10.0.0 10.0.14
Microsoft.SourceLink.GitHub 8.0.0 10.0.403
Microsoft.NET.Test.Sdk 17.12.0 18.11.0
xunit 2.9.2 2.9.3
xunit.runner.visualstudio 2.8.2 4.0.1
coverlet.collector 6.0.2 10.1.0

Code changes

  • SkiaSharp 4 removed SKPaint.FilterQuality. SkiaDrawingContext.DrawImage / DrawTintedImage now use SKSamplingOptions(SKCubicResampler.Mitchell), which is what SKFilterQuality.High mapped to. Bitmaps are drawn through SKImage.FromBitmap.
  • MauiVersion is pinned to 10.0.120 in the MAUI projects. MAUI 10.0.110's Resizetizer crashed while generating the sample's app icon (MissingMethodException on HarfBuzzSharp.Font.SetVariations); 10.0.120 fixes it.
  • The sample app now uses the UIScene lifecycle on iOS and Mac Catalyst (scene manifest in Info.plist plus a SceneDelegate : MauiUISceneDelegate). Apps built with the iOS 27 SDK crash on launch without it (UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption).

Testing

  • dotnet test tests/MintedTextEditor.Core.Tests: 600 passed, 0 failed.
  • The library projects build for every target framework.
  • Built the sample for the iOS simulator and launched it on an iPhone 18 Pro Max simulator running iOS 27: the editor loads with no crash. A clean build (delete the iOS bin/obj folders) is needed so the new Info.plist gets picked up.
  • Not tested: the sample doesn't build for Mac Catalyst locally because its SupportedOSPlatformVersion (15.0) is below the 17.0 the installed Mac Catalyst SDK requires. That problem is unrelated to this PR.
  • Image rendering after the SkiaSharp 4 sampling change was not checked visually.

Checklist

  • dotnet test passes for tests/MintedTextEditor.Core.Tests (tests/MintedTextEditor.SkiaSharp.Tests does not exist in the repo)
  • Changes under src/ have an entry under ## [Unreleased] in CHANGELOG.md (or the PR has the skip-changelog label)
  • Public API changes have XML documentation, and README / docs/ are updated where needed (no public API changes)

hflexgrig and others added 2 commits October 30, 2026 22:54
- SkiaSharp / SkiaSharp.Views.Maui.Controls / SkiaSharp.NativeAssets.Linux 4.153.1 -> 4.154.0
- HarfBuzzSharp / HarfBuzzSharp.NativeAssets.Linux 14.2.1.301 -> 14.2.1.400
- Pin MauiVersion to 10.0.120 (fixes Resizetizer MissingMethodException in 10.0.110)
- Microsoft.Extensions.Logging.Debug 10.0.0 -> 10.0.14
- Microsoft.SourceLink.GitHub 10.0.402 -> 10.0.403

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Apps built with the iOS 27 SDK crash on launch without a scene manifest
(UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption). Add the
standard MAUI UIApplicationSceneManifest and a SceneDelegate deriving from
MauiUISceneDelegate for iOS and Mac Catalyst.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@hflexgrig
hflexgrig force-pushed the chore/upgrade-nuget-packages branch from d531eba to 82b2f90 Compare October 30, 2026 19:09
HarfBuzz applies a legacy 'kern' table (e.g. Helvetica on iOS/macOS) by
splitting the kerning between the first glyph's advance and the second
glyph's x offset. The caret used the pen position and ignored the offset,
so it landed halfway between the kerned and unkerned positions. Record
each glyph's drawn x (pen + offset) instead.

Fixes MeasureCaretOffset_IncludesKerningOfTheWholeRun on macOS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@michaelstonis michaelstonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this! The kerning fix and the iOS 27 scene-lifecycle change both look good. A few things to sort out before merging, mostly housekeeping.

I merged this branch into current main locally (Linux) and ran the suites: Core.Tests 1186/1186 and SkiaSharp.Tests 33/33 pass. The MAUI library and sample can't be built on Linux, and CI hasn't run on this PR yet (fork workflows need maintainer approval).

1. Kerning fix (HarfBuzzTextShaper.cs): looks correct

  • The comment matches how HarfBuzz applies a legacy kern table: half the kern goes on the first glyph's advance, and the rest on the second glyph's advance and x_offset. So the old caret position before the second glyph was off by half the kern.
  • Using the drawn x (penX + XOffset) for GlyphX fixes that. Drawing is unchanged, since Positions was already computed that way.
  • Combining marks aren't affected: they share the base glyph's cluster, and CaretOffset only reads the first glyph of each cluster.
  • Suggestion: a regression test would be good, if a small font with a legacy kern table could be added to the test project (the Linux CI fonts may not have one).

2. The PR description is out of date

Most of it describes an earlier version of the branch: the SkiaSharp 3 → 4 upgrade, the FilterQuality / SKSamplingOptions change, Svg.Skia and the test-stack upgrades are already on main and not in this diff. It also says tests/MintedTextEditor.SkiaSharp.Tests doesn't exist (it does) and reports 600 tests. Could you rewrite it to cover what's actually here: the kerning fix, the iOS / Mac Catalyst scene lifecycle in the sample, the MauiVersion pin, and the version bumps?

3. MauiVersion pin in src/MintedTextEditor.Maui/MintedTextEditor.Maui.csproj

The Resizetizer crash only affects app builds, so the pin is needed in samples/SampleApp.Maui/SampleApp.Maui.csproj. In the library it also raises the minimum Microsoft.Maui.Controls version for everyone consuming the NuGet package to 10.0.120. Unless that's intended, I'd keep the pin in the sample only.

4. Scene lifecycle (sample only): looks right

SceneDelegate : MauiUISceneDelegate plus the UIApplicationSceneManifest in Info.plist is the standard setup. UIApplicationSupportsMultipleScenes = true allows multiple windows on iPad / Mac Catalyst. That's safe here because App.CreateWindow returns a new Window each time.

5. Overlap with the open Dependabot PRs

The version bumps here are behind what Dependabot now proposes:

  • #49 has Microsoft.SourceLink.GitHub 11.0.100 (here: 10.0.403).
  • #52 has SkiaSharp / SkiaSharp.NativeAssets.Linux 4.157.0 and HarfBuzzSharp / HarfBuzzSharp.NativeAssets.Linux 14.4.0.200 (here: 4.154.0 / 14.2.1.400).

Each of these PRs merges cleanly into main on its own, but this PR conflicts with #49 (Directory.Build.props) and #52 (both SkiaSharp .csproj files), only on those version lines. The suggested order is to merge #45, #51, #49 and #52 first, then this PR last. After merging main into this branch, it would need to:

  • keep the newer versions from #49 and #52 in the conflicted lines;
  • bump SkiaSharp.Views.Maui.Controls (library and sample) to 4.157.0 so it matches core SkiaSharp (#52 doesn't touch it);
  • drop or justify the library MauiVersion pin (point 3);
  • update the description (point 2).

Then CI can be approved and run on the result.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants