Fix missing strict concurrency error (#231)

Current strict concurrency checks don't work consistently in Xcode. This
PR adds an additional flag (`-Xfrontend`) to our set of strict
concurrency flags to make sure nothing has been missed when building. It
also fixes an additional error uncovered after adding it.
This commit is contained in:
Gus Cairo 2025-04-09 15:08:12 +01:00 committed by GitHub
parent 92bb536b7e
commit 9eb2ebde13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ let strictConcurrencySettings: [SwiftSetting] = {
if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
// get tripped up on -require-explicit-sendable.
initialSettings.append(.unsafeFlags(["-require-explicit-sendable", "-warnings-as-errors"]))
initialSettings.append(.unsafeFlags(["-Xfrontend", "-require-explicit-sendable", "-warnings-as-errors"]))
}
return initialSettings

View File

@ -21,7 +21,7 @@ import NIOCore
public protocol NIOTSError: Error, Equatable {}
@available(OSX 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *)
public enum NIOTSErrors {
public enum NIOTSErrors: Sendable {
/// ``InvalidChannelStateTransition`` is thrown when a channel has been asked to do something
/// that is incompatible with its current channel state: e.g. attempting to register an
/// already registered channel.