Open macmade opened 1 month ago
This project has warnings-as-errors turned on. Switch the build setting and the warnings are just that - only warnings. This is correct behavior.
The project indeed has warnings-as-errors enabled. Disabling this is not a valid solution. Treating warnings as errors can be a requirement on some projects.
At least provide a way to turn these warnings in Swift 5 projects as a build setting.
Since there is a -warn-concurrency flag, please provide a -no-warn-concurrency or -disable-warn-concurrency so we can use them on specific files while keeping warning as errors on.
Description
Concurrency errors related to the Sendable protocol are produced in a project, although it is configured for Swift 5. This behavior is new in Xcode 16.0 beta 3 (16A5202i) and breaks the build. Previous beta versions were not affected.
I've attached an Xcode project showing the issues.
Error 1 - Using WebKit:
This produces the following error:
Add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'WebKit'
Error 2 - Using @preconcurrency
In a Swift 5 project, this produces the following error:
'@preconcurrency' attribute on module 'WebKit' has no effect
Error 3 - Closures and Sendable
Capture of 'test' with non-sendable type 'NSTreeController' in a
@Sendable
closure; this is an error in the Swift 6 language modeThese issues make building a Swift 5 project impossible with Xcode 16.0 beta 3.
Files
Test.zip