Closed darronschall closed 1 year ago
I was able to workaround the Swift 5.8 compiler crash by making both CFlowPublisher
and CFlowSubscription
no longer generic and instead pinning Output
to AnyObject
. This requires casting the cFlow
from createPublisher
via cFlow as! CFlow<AnyObject>
since we lose the generic T
, but that's OK and should always succeed because T
has to be constrained to AnyObject
anyway.
I'll submit a PR for further discussion.
FYI, I logged the Swift 5.8 compiler crash against the Swift project at https://github.com/apple/swift/issues/65331
I'm unable to upgrade a KMM project to Xcode 14.3 / Swift 5.8 using MOKO-MVVM's CFlowExt SwiftUI helper.
This is likely a Swift compiler bug. Xcode 14.2 / Swift 5.7 works just fine, but the Swift 5.8 compiler throws the following stack trace:
I've narrowed the crash down to the
CFlowSubscription
class. That is, if I comment the class out and do not reference it inCFlowPublisher
'sreceive
, then the compiler doesn't crash anymore. But, I haven't been able to determine a workaround yet to bring the functionality back.Has anyone else run into this, or is it just me?