@swift-ci please test
After discussing with Doug, I've updated the PR to relax availability checking on the @MainActor
attribute in general, rather than restricting it to @MainActor(unsafe)
.
Can we cherry-pick this PR to release/5.8? Otherwise Xcode 14.3 with Swift 5.8.0 will break many downstream xcframeworks consumers. If this is too late for Swift 5.8.0, will it be released with Swift 5.8.1?
Upgraded to Xcode 14.3 RC1 today and ran into this issue, I agree with @Kyle-Ye this will likely cause a lot of commotion once 14.3 is fully released (next week?)
Cherry-picked to release/5.8
: #64538
This is fixed in Xcode 14.3 RC 2: Xcode 14.3 RC 2 Release Notes | Apple Developer Documentation
This bug seems to be back in Xcode 15 beta 1 (15A5160n) with Swift 5.9.0.114.6. I'm seeing the "this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.9 (swiftlang-5.9.0.114.6 clang-1500.0.27.1)')" error in a project that compiled fine with Xcode 14.3.1 (Swift 5.8), and with an XCFramework that was definitely built with BUILD_LIBRARY_FOR_DISTRIBUTION turned on.
Has the fix not made it to the Swift 5.9 branch yet? 🤔
@tiwoc Seeing this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.9 (swiftlang-5.9.0.114.6 clang-1500.0.27.1)')
by itself doesn't indicate that you're seeing the issue that was reported and fixed here. That error message is a generic error message printed by the compiler whenever it can't build a module from its swiftinterface for any reason, and there are myriad reasons why a swiftinterface might be unbuildable.
I recommend either filing a GitHub issue or a Feedback with the full build log that includes the errors that were emitted before the this SDK is not supported
message and also a reproducer project if possible.
Thanks for the clarification, @tshortli!
Login to write a write a comment.
The
@MainActor
global actor constraint on a declaration does not carry an inherent ABI impact and therefore use of this constraint should not be limited to OS versions where Swift concurrency is available.This fixes a regression (introduced by #60672) in swiftinterface typechecking for modules that contain public types that implicitly inherit a
@MainActor
attribute.Resolves rdar://105610970