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> {
33 self.pageSize = pageSize 33 self.pageSize = pageSize
34 } 34 }
35 35
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
36 func reload() async { 42 func reload() async {
37 state = .loading 43 state = .loading
38 next = nil 44 next = nil