Open KeithBauerANZ opened 2 months ago
@KeithBauerANZ does explicitly writing @preconcurrency
on var actionHandler
work around the issue?
@preconcurrency open var actionHandler: ActionHandler?
Yep, that also works around the problem.
Description
I have a package with two types:
This is using swift tools version 5.10, and enables the upcoming feature "strict concurrency".
I have an app consuming it, also using swift 5, but not using strict concurrency yet:
This results in undefined symbols:
It seems there's two getters from the
actionHandler
, one@MainActor
and one not (only one of which is defined for some reason), which makes me suspect SE-0423 @hborla @xedinExplicitly adding
@MainActor
to the button types resolves the issue (but requires the app's caller to be updated too).Reproduction
Full Xcode project attached:
OpenMainActor.zip
Expected behavior
This compiles and links when using Xcode 15, but breaks with the Xcode 16 betas.
Environment
🌸 xcodebuild -version Xcode 16.0 Build version 16A5202i 🌸 swift --version
swift-driver version: 1.111.2 Apple Swift version 6.0 (swiftlang-6.0.0.5.15 clang-1600.0.22.6)
Additional information
No response