I have a Swift package with many targets that form a dependency stack, and after making some changes the package now experiences an immediate run-time crash when run on my iPhone. The crash message is along the lines of:
symbol not found: _swift_getExtendedExistentialTypeMetadata
expected in /usr/lib/swift/libswiftCore.dylib
The crash does not occur on the iOS simulator. It doesn't occur on the macOS app that runs the same package. The same error does appear, however, when attempting to archive on any platform. I'm going to attempt to slowly reverse all the recent changes I made before noticing the crash on iOS, but any help would be hugely appreciated if anyone knows what's going on (@Slava_Pestov as the most likely candidate, but please simply disregard if not, and I'm sorry to distract you!)
Update
I succeeded in whittling the problem down to the following:
public struct Foo {
let bar: @MainActor ()->any Baz<Void>
}
protocol Baz <A> {
associatedtype A
}
To reproduce, paste the above code into a module that is part of a macOS or iOS app and then archive.
After reducing the problem code, the error changed slightly:
error build: Undefined symbol: _swift_getExtendedExistentialTypeMetadata_unique