fix(cmux-next): Release compile crash on main-actor generic class deinits (macOS 14 target)
The fleet Release compile of feat-cmux-next is red. swift-frontend (Xcode 26.6) crashes in EarlyPerfInliner (isCallerAndCalleeLayoutConstraintsCompatible) on the deinit of ThemedPicker.Coordinator, a MainActor class nested in the generic ThemedPicker<ID>. The crash started after the package moved to a macOS 14 deployment target (ae366487).
The cause is one class of bug. In the UI targets (defaultIsolation(MainActor)) a class's deinit is isolated, and below macOS 15 that runs through the back-deploy path. The Release inliner crashes on it for a generic class. TaskLocal+InTask's ImmediateRun already opts out with nonisolated deinit {}.
ThemedPicker: the pop-up's target is now one non-generic class,ThemedPickerTarget. On each update the picker sets the closure it calls. Behavior is unchanged: a choice still writes the binding, and an out-of-range index is still ignored.CEFReplyWaitersandBrowserHistoryWriter.Once, the remaining main-actor generic classes, get anonisolated deinit {}. The first fix's compile crashed next onCEFReplyWaiters. Neither class had a deinit body.
A scan of the package's Sources (generic classes, and classes nested in generic types) finds no other main-actor generic class without a nonisolated deinit.
Verification
- Red: fleet Release compile of base afbe6faf1ec8 crashes on
ThemedPicker.Coordinator's deinit. - Green: fleet Release compile of this head (receipt in a comment below).
check-concurrency.shandcrash_ratchet.pypass.
Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the fleet Release compile crash of feat-cmux-next: swift-frontend (Xcode 26.6) crashed in EarlyPerfInliner on the deinit of ThemedPicker.Coordinator, a MainActor class nested in the generic ThemedPicker<ID>, after the package moved to a macOS 14 deployment target.
The cause is one class of bug. In the UI targets (defaultIsolation(MainActor)) a class's deinit is isolated, and below macOS 15 that runs through the back-deploy path. The Release inliner crashes on it for a generic class; TaskLocal+InTask's ImmediateRun already opts out with nonisolated deinit {}.
ThemedPicker: the pop-up's target is now one non-generic class,ThemedPickerTarget. On each update the picker sets the closure it calls. Behavior is unchanged: a choice still writes the binding, and an out-of-range index is still ignored.CEFReplyWaitersandBrowserHistoryWriter.Once, the remaining main-actor generic classes, get anonisolated deinit {}. Neither had a deinit body.- A scan of the package's Sources finds no other main-actor generic class without a nonisolated deinit.
Verification
- Fleet Release compile of the old base crashes on
ThemedPicker.Coordinator's deinit; this head compiles green. check-concurrency.shandcrash_ratchet.pypass.