Commit 71f4caa5b9

71f4caa5b9a400b97e9ba84a5b095dbe4de4712d

parent: d6f71d1fce

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-08 04:37 UTC

Explicit deinit on PagedListModel for the Release optimizer

With the deployment target at iOS 18 the Swift 6.3.3 optimizer crashes
inlining the synthesized deinit of this generic @Observable class
(EarlyPerfInliner, isCallerAndCalleeLayoutConstraintsCompatible). Only
a Release build reaches the pass, so the Debug test runs never saw it.
An explicit empty deinit sidesteps it.

Layout: unified · split

gitbay/Repos/PagedListModel.swift +6
@@ -33,6 +33,12 @@ final class PagedListModel<Element: Decodable & Sendable> {
3333 self.pageSize = pageSize
3434 }
3535
36 // An explicit deinit: with the deployment target at iOS 18 the Swift
37 // 6.3 optimizer crashes inlining the synthesized one of this generic
38 // @Observable class (isCallerAndCalleeLayoutConstraintsCompatible),
39 // which only a Release build reaches.
40 deinit {}
41
3642 func reload() async {
3743 state = .loading
3844 next = nil