Build Information
Successful build of SwiftNet, reference 2.0.6 (24560f
), with Swift 6.1 for macOS (SPM) on 28 Apr 2025 07:40:01 UTC.
Swift 6 data race errors: 45
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
18 | public static var accessTokenErrorCodes: [Int] = [401]
19 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:18:23: warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
| |- warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenErrorCodes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenErrorCodes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 |
20 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/AccessTokenStorage.swift:12:28: warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension SNConfig {
12 | fileprivate static var accessTokens: [String: SNAccessToken] = [:]
| |- warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokens' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokens' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | }
14 |
[233/281] Emitting module SwiftNet
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:12:20: warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
| |- warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'pinningModes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'pinningModes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:13:20: warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
| |- warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sitesExcludedFromPinning' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'sitesExcludedFromPinning' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:14:20: warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
| |- warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultJSONDecoder' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultJSONDecoder' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:15:20: warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
| |- warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultAccessTokenStrategy' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultAccessTokenStrategy' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:16:20: warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
| |- warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'keychainInstance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'keychainInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:17:23: warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
| |- warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenStorage' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenStorage' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static var accessTokenErrorCodes: [Int] = [401]
19 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:18:23: warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
| |- warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenErrorCodes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenErrorCodes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 |
20 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/AccessTokenStorage.swift:12:28: warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension SNConfig {
12 | fileprivate static var accessTokens: [String: SNAccessToken] = [:]
| |- warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokens' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokens' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/Encodable + extensions.swift:95:20: warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public struct EncodableConversionOptions: OptionSet {
| `- note: consider making struct 'EncodableConversionOptions' conform to the 'Sendable' protocol
88 | public let rawValue: Int
89 |
:
93 |
94 | /// Keeps empty collections in final output
95 | public static let keepEmptyCollections = EncodableConversionOptions(rawValue: 1 << 0)
| |- warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'keepEmptyCollections' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | }
97 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNDebugInfo.swift:27:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
25 |
26 | public class SNDebugInfo {
27 | private static var loggers: [String: SNLogger] = [:]
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 |
29 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:11:13: warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
9 |
10 | public struct SNError: Error {
11 | public let type: ErrorType
| `- warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
12 | public let details: SNErrorDetails?
13 | public let data: Data?
:
21 |
22 | public extension SNError {
23 | enum ErrorType {
| `- note: consider making enum 'ErrorType' conform to the 'Sendable' protocol
24 | case failedToBuildRequest, failedToMapResponse, unexpectedResponse, authenticationFailed, notConnected, emptyResponse, conversionFailed, noInternetConnection, requestFinished, finishedWithoutValue
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:12:13: warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
10 | public struct SNError: Error {
11 | public let type: ErrorType
12 | public let details: SNErrorDetails?
| `- warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
13 | public let data: Data?
14 |
:
60 | }
61 |
62 | public struct SNErrorDetails {
| `- note: consider making struct 'SNErrorDetails' conform to the 'Sendable' protocol
63 | public let statusCode: Int
64 | public let localizedString: String
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:17:20: warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
15 | }
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
| |- warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ssl' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
19 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:18:20: warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
| |- warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'certificate' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:16:13: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
15 |
16 | static let shared = SNNetworkMonitor()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 | private init() { }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:11:14: warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
| `- warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:12:6: warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
| `- warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
13 |
14 | public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:20:14: warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
18 |
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
| `- warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
21 | private let mode: PinningMode
22 | private let excludedSites: [String]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/CertificateExplorer.swift:10:7: note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class CertificateExplorer {
| `- note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
11 | func fetchCertificates() -> [SecCertificate] {
12 | var certificates: [SecCertificate] = []
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:21:14: warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
21 | private let mode: PinningMode
| `- warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:10:15: note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:24:19: warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
24 | private lazy var pinnedCerts = certExplorer.fetchCertificates()
| `- warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
25 | private lazy var pinnedKeys = certExplorer.fetchSLLKeys()
26 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:11:12: warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | open class SNWebSocket: NSObject {
| `- warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | private var webSocket: URLSessionWebSocketTask
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:12:14: warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
10 |
11 | open class SNWebSocket: NSObject {
12 | private var webSocket: URLSessionWebSocketTask
| `- warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
13 |
14 | private(set) public var failedToConnect: Bool = false
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:12:20: warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
| |- warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'pinningModes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'pinningModes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:13:20: warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
| |- warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sitesExcludedFromPinning' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'sitesExcludedFromPinning' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:14:20: warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
| |- warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultJSONDecoder' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultJSONDecoder' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:15:20: warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
| |- warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultAccessTokenStrategy' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultAccessTokenStrategy' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:16:20: warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
| |- warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'keychainInstance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'keychainInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:17:23: warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
| |- warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenStorage' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenStorage' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static var accessTokenErrorCodes: [Int] = [401]
19 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:18:23: warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
| |- warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenErrorCodes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenErrorCodes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 |
20 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/AccessTokenStorage.swift:12:28: warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension SNConfig {
12 | fileprivate static var accessTokens: [String: SNAccessToken] = [:]
| |- warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokens' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokens' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/Encodable + extensions.swift:95:20: warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public struct EncodableConversionOptions: OptionSet {
| `- note: consider making struct 'EncodableConversionOptions' conform to the 'Sendable' protocol
88 | public let rawValue: Int
89 |
:
93 |
94 | /// Keeps empty collections in final output
95 | public static let keepEmptyCollections = EncodableConversionOptions(rawValue: 1 << 0)
| |- warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'keepEmptyCollections' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | }
97 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNDebugInfo.swift:27:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
25 |
26 | public class SNDebugInfo {
27 | private static var loggers: [String: SNLogger] = [:]
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 |
29 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:11:13: warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
9 |
10 | public struct SNError: Error {
11 | public let type: ErrorType
| `- warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
12 | public let details: SNErrorDetails?
13 | public let data: Data?
:
21 |
22 | public extension SNError {
23 | enum ErrorType {
| `- note: consider making enum 'ErrorType' conform to the 'Sendable' protocol
24 | case failedToBuildRequest, failedToMapResponse, unexpectedResponse, authenticationFailed, notConnected, emptyResponse, conversionFailed, noInternetConnection, requestFinished, finishedWithoutValue
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:12:13: warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
10 | public struct SNError: Error {
11 | public let type: ErrorType
12 | public let details: SNErrorDetails?
| `- warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
13 | public let data: Data?
14 |
:
60 | }
61 |
62 | public struct SNErrorDetails {
| `- note: consider making struct 'SNErrorDetails' conform to the 'Sendable' protocol
63 | public let statusCode: Int
64 | public let localizedString: String
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:17:20: warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
15 | }
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
| |- warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ssl' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
19 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:18:20: warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
| |- warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'certificate' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:16:13: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
15 |
16 | static let shared = SNNetworkMonitor()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 | private init() { }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:11:14: warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
| `- warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:12:6: warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
| `- warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
13 |
14 | public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:20:14: warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
18 |
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
| `- warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
21 | private let mode: PinningMode
22 | private let excludedSites: [String]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/CertificateExplorer.swift:10:7: note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class CertificateExplorer {
| `- note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
11 | func fetchCertificates() -> [SecCertificate] {
12 | var certificates: [SecCertificate] = []
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:21:14: warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
21 | private let mode: PinningMode
| `- warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:10:15: note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:24:19: warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
24 | private lazy var pinnedCerts = certExplorer.fetchCertificates()
| `- warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
25 | private lazy var pinnedKeys = certExplorer.fetchSLLKeys()
26 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:11:12: warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | open class SNWebSocket: NSObject {
| `- warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | private var webSocket: URLSessionWebSocketTask
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:12:14: warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
10 |
11 | open class SNWebSocket: NSObject {
12 | private var webSocket: URLSessionWebSocketTask
| `- warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
13 |
14 | private(set) public var failedToConnect: Bool = false
[235/283] Compiling SwiftNet SNConfig.swift
[236/283] Compiling SwiftNet AccessTokenStorage.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/Encodable + extensions.swift:95:20: warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public struct EncodableConversionOptions: OptionSet {
| `- note: consider making struct 'EncodableConversionOptions' conform to the 'Sendable' protocol
88 | public let rawValue: Int
89 |
:
93 |
94 | /// Keeps empty collections in final output
95 | public static let keepEmptyCollections = EncodableConversionOptions(rawValue: 1 << 0)
| |- warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'keepEmptyCollections' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | }
97 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/Encodable + extensions.swift:95:20: warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public struct EncodableConversionOptions: OptionSet {
| `- note: consider making struct 'EncodableConversionOptions' conform to the 'Sendable' protocol
88 | public let rawValue: Int
89 |
:
93 |
94 | /// Keeps empty collections in final output
95 | public static let keepEmptyCollections = EncodableConversionOptions(rawValue: 1 << 0)
| |- warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'keepEmptyCollections' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | }
97 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/Encodable + extensions.swift:95:20: warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public struct EncodableConversionOptions: OptionSet {
| `- note: consider making struct 'EncodableConversionOptions' conform to the 'Sendable' protocol
88 | public let rawValue: Int
89 |
:
93 |
94 | /// Keeps empty collections in final output
95 | public static let keepEmptyCollections = EncodableConversionOptions(rawValue: 1 << 0)
| |- warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'keepEmptyCollections' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | }
97 |
[240/283] Compiling SwiftNet SNProvider + Test.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNDebugInfo.swift:27:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
25 |
26 | public class SNDebugInfo {
27 | private static var loggers: [String: SNLogger] = [:]
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 |
29 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:11:13: warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
9 |
10 | public struct SNError: Error {
11 | public let type: ErrorType
| `- warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
12 | public let details: SNErrorDetails?
13 | public let data: Data?
:
21 |
22 | public extension SNError {
23 | enum ErrorType {
| `- note: consider making enum 'ErrorType' conform to the 'Sendable' protocol
24 | case failedToBuildRequest, failedToMapResponse, unexpectedResponse, authenticationFailed, notConnected, emptyResponse, conversionFailed, noInternetConnection, requestFinished, finishedWithoutValue
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:12:13: warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
10 | public struct SNError: Error {
11 | public let type: ErrorType
12 | public let details: SNErrorDetails?
| `- warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
13 | public let data: Data?
14 |
:
60 | }
61 |
62 | public struct SNErrorDetails {
| `- note: consider making struct 'SNErrorDetails' conform to the 'Sendable' protocol
63 | public let statusCode: Int
64 | public let localizedString: String
[241/283] Compiling SwiftNet BridgingEndpoint.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNDebugInfo.swift:27:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
25 |
26 | public class SNDebugInfo {
27 | private static var loggers: [String: SNLogger] = [:]
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 |
29 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:11:13: warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
9 |
10 | public struct SNError: Error {
11 | public let type: ErrorType
| `- warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
12 | public let details: SNErrorDetails?
13 | public let data: Data?
:
21 |
22 | public extension SNError {
23 | enum ErrorType {
| `- note: consider making enum 'ErrorType' conform to the 'Sendable' protocol
24 | case failedToBuildRequest, failedToMapResponse, unexpectedResponse, authenticationFailed, notConnected, emptyResponse, conversionFailed, noInternetConnection, requestFinished, finishedWithoutValue
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:12:13: warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
10 | public struct SNError: Error {
11 | public let type: ErrorType
12 | public let details: SNErrorDetails?
| `- warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
13 | public let data: Data?
14 |
:
60 | }
61 |
62 | public struct SNErrorDetails {
| `- note: consider making struct 'SNErrorDetails' conform to the 'Sendable' protocol
63 | public let statusCode: Int
64 | public let localizedString: String
[242/283] Compiling SwiftNet EndpointBuilder.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNDebugInfo.swift:27:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
25 |
26 | public class SNDebugInfo {
27 | private static var loggers: [String: SNLogger] = [:]
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 |
29 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:11:13: warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
9 |
10 | public struct SNError: Error {
11 | public let type: ErrorType
| `- warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
12 | public let details: SNErrorDetails?
13 | public let data: Data?
:
21 |
22 | public extension SNError {
23 | enum ErrorType {
| `- note: consider making enum 'ErrorType' conform to the 'Sendable' protocol
24 | case failedToBuildRequest, failedToMapResponse, unexpectedResponse, authenticationFailed, notConnected, emptyResponse, conversionFailed, noInternetConnection, requestFinished, finishedWithoutValue
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:12:13: warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
10 | public struct SNError: Error {
11 | public let type: ErrorType
12 | public let details: SNErrorDetails?
| `- warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
13 | public let data: Data?
14 |
:
60 | }
61 |
62 | public struct SNErrorDetails {
| `- note: consider making struct 'SNErrorDetails' conform to the 'Sendable' protocol
63 | public let statusCode: Int
64 | public let localizedString: String
[243/283] Compiling SwiftNet EndpointModel.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/AnyPublisher + toAsyncTask.swift:31:34: warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
29 | } receiveValue: { output in
30 | finishedWithoutValue = false
31 | continuation.resume(with: .success(output))
| |- warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
| `- note: Passing task-isolated value of non-Sendable type 'Result<Output, any Error>' as a 'sending' parameter risks causing races inbetween task-isolated uses and uses reachable from the callee
32 | }
33 | }
[244/283] Compiling SwiftNet AnyPublisher + asAccessTokenConvertible.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/AnyPublisher + toAsyncTask.swift:31:34: warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
29 | } receiveValue: { output in
30 | finishedWithoutValue = false
31 | continuation.resume(with: .success(output))
| |- warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
| `- note: Passing task-isolated value of non-Sendable type 'Result<Output, any Error>' as a 'sending' parameter risks causing races inbetween task-isolated uses and uses reachable from the callee
32 | }
33 | }
[245/283] Compiling SwiftNet AnyPublisher + toAsyncTask.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/AnyPublisher + toAsyncTask.swift:31:34: warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
29 | } receiveValue: { output in
30 | finishedWithoutValue = false
31 | continuation.resume(with: .success(output))
| |- warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
| `- note: Passing task-isolated value of non-Sendable type 'Result<Output, any Error>' as a 'sending' parameter risks causing races inbetween task-isolated uses and uses reachable from the callee
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/EndpointBuilder/BridgingEndpoint.swift:63:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | let publisher: PassthroughSubject<AccessTokenConvertible, Error> = .init()
62 |
63 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | let token = try await task()
| `- note: closure captures non-Sendable 'task'
66 | publisher.send(token)
| `- note: closure captures non-Sendable 'publisher'
67 | } catch {
68 | publisher.send(completion: .failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/EndpointBuilder/BridgingEndpoint.swift:63:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | let publisher: PassthroughSubject<AccessTokenConvertible, Error> = .init()
62 |
63 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | let token = try await task()
| `- note: closure captures non-Sendable 'task'
66 | publisher.send(token)
| `- note: closure captures non-Sendable 'publisher'
67 | } catch {
68 | publisher.send(completion: .failure(error))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/EndpointBuilder/BridgingEndpoint.swift:63:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | let publisher: PassthroughSubject<AccessTokenConvertible, Error> = .init()
62 |
63 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | let token = try await task()
| `- note: closure captures non-Sendable 'task'
66 | publisher.send(token)
| `- note: closure captures non-Sendable 'publisher'
67 | } catch {
68 | publisher.send(completion: .failure(error))
[249/283] Compiling SwiftNet Keychain.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:17:20: warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
15 | }
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
| |- warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ssl' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
19 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:18:20: warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
| |- warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'certificate' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 |
[250/283] Compiling SwiftNet PinningMode.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:17:20: warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
15 | }
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
| |- warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ssl' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
19 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:18:20: warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
| |- warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'certificate' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 |
[251/283] Compiling SwiftNet UploadResponse.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNDebugInfo.swift:27:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
25 |
26 | public class SNDebugInfo {
27 | private static var loggers: [String: SNLogger] = [:]
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 |
29 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:11:13: warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
9 |
10 | public struct SNError: Error {
11 | public let type: ErrorType
| `- warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
12 | public let details: SNErrorDetails?
13 | public let data: Data?
:
21 |
22 | public extension SNError {
23 | enum ErrorType {
| `- note: consider making enum 'ErrorType' conform to the 'Sendable' protocol
24 | case failedToBuildRequest, failedToMapResponse, unexpectedResponse, authenticationFailed, notConnected, emptyResponse, conversionFailed, noInternetConnection, requestFinished, finishedWithoutValue
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:12:13: warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
10 | public struct SNError: Error {
11 | public let type: ErrorType
12 | public let details: SNErrorDetails?
| `- warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
13 | public let data: Data?
14 |
:
60 | }
61 |
62 | public struct SNErrorDetails {
| `- note: consider making struct 'SNErrorDetails' conform to the 'Sendable' protocol
63 | public let statusCode: Int
64 | public let localizedString: String
[252/283] Compiling SwiftNet SNDebugInfo.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNDebugInfo.swift:27:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
25 |
26 | public class SNDebugInfo {
27 | private static var loggers: [String: SNLogger] = [:]
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 |
29 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:11:13: warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
9 |
10 | public struct SNError: Error {
11 | public let type: ErrorType
| `- warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
12 | public let details: SNErrorDetails?
13 | public let data: Data?
:
21 |
22 | public extension SNError {
23 | enum ErrorType {
| `- note: consider making enum 'ErrorType' conform to the 'Sendable' protocol
24 | case failedToBuildRequest, failedToMapResponse, unexpectedResponse, authenticationFailed, notConnected, emptyResponse, conversionFailed, noInternetConnection, requestFinished, finishedWithoutValue
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:12:13: warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
10 | public struct SNError: Error {
11 | public let type: ErrorType
12 | public let details: SNErrorDetails?
| `- warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
13 | public let data: Data?
14 |
:
60 | }
61 |
62 | public struct SNErrorDetails {
| `- note: consider making struct 'SNErrorDetails' conform to the 'Sendable' protocol
63 | public let statusCode: Int
64 | public let localizedString: String
[253/283] Compiling SwiftNet SNError.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNDebugInfo.swift:27:21: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
25 |
26 | public class SNDebugInfo {
27 | private static var loggers: [String: SNLogger] = [:]
| |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'loggers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
28 |
29 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:11:13: warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
9 |
10 | public struct SNError: Error {
11 | public let type: ErrorType
| `- warning: stored property 'type' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNError.ErrorType'; this is an error in the Swift 6 language mode
12 | public let details: SNErrorDetails?
13 | public let data: Data?
:
21 |
22 | public extension SNError {
23 | enum ErrorType {
| `- note: consider making enum 'ErrorType' conform to the 'Sendable' protocol
24 | case failedToBuildRequest, failedToMapResponse, unexpectedResponse, authenticationFailed, notConnected, emptyResponse, conversionFailed, noInternetConnection, requestFinished, finishedWithoutValue
25 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Debugging/SNError.swift:12:13: warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
10 | public struct SNError: Error {
11 | public let type: ErrorType
12 | public let details: SNErrorDetails?
| `- warning: stored property 'details' of 'Sendable'-conforming struct 'SNError' has non-sendable type 'SNErrorDetails?'; this is an error in the Swift 6 language mode
13 | public let data: Data?
14 |
:
60 | }
61 |
62 | public struct SNErrorDetails {
| `- note: consider making struct 'SNErrorDetails' conform to the 'Sendable' protocol
63 | public let statusCode: Int
64 | public let localizedString: String
[254/283] Compiling SwiftNet SNWebSocket.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:11:12: warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | open class SNWebSocket: NSObject {
| `- warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | private var webSocket: URLSessionWebSocketTask
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:12:14: warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
10 |
11 | open class SNWebSocket: NSObject {
12 | private var webSocket: URLSessionWebSocketTask
| `- warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
13 |
14 | private(set) public var failedToConnect: Bool = false
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:152:46: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 |
135 | /// Sends message to WebSocket server
136 | open func send(_ message: URLSessionWebSocketTask.Message, completion: @escaping (Error?) -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
137 | if !isConnected {
138 | if isConnecting {
:
150 | }
151 |
152 | webSocket.send(message, completionHandler: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
153 | }
154 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:172:4: warning: capture of 'onReceive' with non-sendable type '(Result<URLSessionWebSocketTask.Message, any Error>) -> Void' in a '@Sendable' closure
170 |
171 | webSocket.receive { [weak self] in
172 | onReceive($0)
| |- warning: capture of 'onReceive' with non-sendable type '(Result<URLSessionWebSocketTask.Message, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
173 | self?.listen(onReceive: onReceive)
174 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:180:5: warning: capture of 'onError' with non-sendable type '(any Error) -> Void' in a '@Sendable' closure
178 | webSocket.sendPing { [weak self] in
179 | if let error = $0 {
180 | onError(error)
| |- warning: capture of 'onError' with non-sendable type '(any Error) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
181 | if stopAfterError {
182 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:159:30: warning: sending 'onReceive' risks causing data races; this is an error in the Swift 6 language mode
157 | if isConnecting {
158 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
159 | self?.listen(onReceive: onReceive)
| |- warning: sending 'onReceive' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'onReceive' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
160 | }
161 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:140:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
138 | if isConnecting {
139 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
140 | self?.send(message, completion: completion)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
141 | }
142 | return
[255/283] Compiling SwiftNet WebSocketConnectionParameters.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:11:12: warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | open class SNWebSocket: NSObject {
| `- warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | private var webSocket: URLSessionWebSocketTask
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:12:14: warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
10 |
11 | open class SNWebSocket: NSObject {
12 | private var webSocket: URLSessionWebSocketTask
| `- warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
13 |
14 | private(set) public var failedToConnect: Bool = false
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:152:46: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 |
135 | /// Sends message to WebSocket server
136 | open func send(_ message: URLSessionWebSocketTask.Message, completion: @escaping (Error?) -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
137 | if !isConnected {
138 | if isConnecting {
:
150 | }
151 |
152 | webSocket.send(message, completionHandler: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
153 | }
154 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:172:4: warning: capture of 'onReceive' with non-sendable type '(Result<URLSessionWebSocketTask.Message, any Error>) -> Void' in a '@Sendable' closure
170 |
171 | webSocket.receive { [weak self] in
172 | onReceive($0)
| |- warning: capture of 'onReceive' with non-sendable type '(Result<URLSessionWebSocketTask.Message, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
173 | self?.listen(onReceive: onReceive)
174 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:180:5: warning: capture of 'onError' with non-sendable type '(any Error) -> Void' in a '@Sendable' closure
178 | webSocket.sendPing { [weak self] in
179 | if let error = $0 {
180 | onError(error)
| |- warning: capture of 'onError' with non-sendable type '(any Error) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
181 | if stopAfterError {
182 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:159:30: warning: sending 'onReceive' risks causing data races; this is an error in the Swift 6 language mode
157 | if isConnecting {
158 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
159 | self?.listen(onReceive: onReceive)
| |- warning: sending 'onReceive' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'onReceive' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
160 | }
161 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:140:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
138 | if isConnecting {
139 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
140 | self?.send(message, completion: completion)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
141 | }
142 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:11:12: warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | open class SNWebSocket: NSObject {
| `- warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | private var webSocket: URLSessionWebSocketTask
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:12:14: warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
10 |
11 | open class SNWebSocket: NSObject {
12 | private var webSocket: URLSessionWebSocketTask
| `- warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
13 |
14 | private(set) public var failedToConnect: Bool = false
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:152:46: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 |
135 | /// Sends message to WebSocket server
136 | open func send(_ message: URLSessionWebSocketTask.Message, completion: @escaping (Error?) -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
137 | if !isConnected {
138 | if isConnecting {
:
150 | }
151 |
152 | webSocket.send(message, completionHandler: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
153 | }
154 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:172:4: warning: capture of 'onReceive' with non-sendable type '(Result<URLSessionWebSocketTask.Message, any Error>) -> Void' in a '@Sendable' closure
170 |
171 | webSocket.receive { [weak self] in
172 | onReceive($0)
| |- warning: capture of 'onReceive' with non-sendable type '(Result<URLSessionWebSocketTask.Message, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
173 | self?.listen(onReceive: onReceive)
174 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:180:5: warning: capture of 'onError' with non-sendable type '(any Error) -> Void' in a '@Sendable' closure
178 | webSocket.sendPing { [weak self] in
179 | if let error = $0 {
180 | onError(error)
| |- warning: capture of 'onError' with non-sendable type '(any Error) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
181 | if stopAfterError {
182 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:159:30: warning: sending 'onReceive' risks causing data races; this is an error in the Swift 6 language mode
157 | if isConnecting {
158 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
159 | self?.listen(onReceive: onReceive)
| |- warning: sending 'onReceive' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'onReceive' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
160 | }
161 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:140:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
138 | if isConnecting {
139 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
140 | self?.send(message, completion: completion)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
141 | }
142 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:11:12: warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | open class SNWebSocket: NSObject {
| `- warning: non-final class 'SNWebSocket' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | private var webSocket: URLSessionWebSocketTask
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:12:14: warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
10 |
11 | open class SNWebSocket: NSObject {
12 | private var webSocket: URLSessionWebSocketTask
| `- warning: stored property 'webSocket' of 'Sendable'-conforming class 'SNWebSocket' is mutable; this is an error in the Swift 6 language mode
13 |
14 | private(set) public var failedToConnect: Bool = false
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:152:46: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
134 |
135 | /// Sends message to WebSocket server
136 | open func send(_ message: URLSessionWebSocketTask.Message, completion: @escaping (Error?) -> Void) {
| `- note: parameter 'completion' is implicitly non-sendable
137 | if !isConnected {
138 | if isConnecting {
:
150 | }
151 |
152 | webSocket.send(message, completionHandler: completion)
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
153 | }
154 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:172:4: warning: capture of 'onReceive' with non-sendable type '(Result<URLSessionWebSocketTask.Message, any Error>) -> Void' in a '@Sendable' closure
170 |
171 | webSocket.receive { [weak self] in
172 | onReceive($0)
| |- warning: capture of 'onReceive' with non-sendable type '(Result<URLSessionWebSocketTask.Message, any Error>) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
173 | self?.listen(onReceive: onReceive)
174 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:180:5: warning: capture of 'onError' with non-sendable type '(any Error) -> Void' in a '@Sendable' closure
178 | webSocket.sendPing { [weak self] in
179 | if let error = $0 {
180 | onError(error)
| |- warning: capture of 'onError' with non-sendable type '(any Error) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
181 | if stopAfterError {
182 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:159:30: warning: sending 'onReceive' risks causing data races; this is an error in the Swift 6 language mode
157 | if isConnecting {
158 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
159 | self?.listen(onReceive: onReceive)
| |- warning: sending 'onReceive' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'onReceive' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
160 | }
161 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/WebSocket/SNWebSocket.swift:140:38: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
138 | if isConnecting {
139 | DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
140 | self?.send(message, completion: completion)
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
141 | }
142 | return
[258/283] Compiling SwiftNet SNSessionDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/EndpointBuilder/BridgingEndpoint.swift:63:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | let publisher: PassthroughSubject<AccessTokenConvertible, Error> = .init()
62 |
63 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | let token = try await task()
| `- note: closure captures non-Sendable 'task'
66 | publisher.send(token)
| `- note: closure captures non-Sendable 'publisher'
67 | } catch {
68 | publisher.send(completion: .failure(error))
[259/283] Compiling SwiftNet SNProvider + defaultURLMapper.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/EndpointBuilder/BridgingEndpoint.swift:63:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | let publisher: PassthroughSubject<AccessTokenConvertible, Error> = .init()
62 |
63 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | let token = try await task()
| `- note: closure captures non-Sendable 'task'
66 | publisher.send(token)
| `- note: closure captures non-Sendable 'publisher'
67 | } catch {
68 | publisher.send(completion: .failure(error))
[260/283] Compiling SwiftNet SNProvider.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/EndpointBuilder/BridgingEndpoint.swift:63:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
61 | let publisher: PassthroughSubject<AccessTokenConvertible, Error> = .init()
62 |
63 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
64 | do {
65 | let token = try await task()
| `- note: closure captures non-Sendable 'task'
66 | publisher.send(token)
| `- note: closure captures non-Sendable 'publisher'
67 | } catch {
68 | publisher.send(completion: .failure(error))
[261/283] Compiling SwiftNet URLRequest + cURL.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/Encodable + extensions.swift:95:20: warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public struct EncodableConversionOptions: OptionSet {
| `- note: consider making struct 'EncodableConversionOptions' conform to the 'Sendable' protocol
88 | public let rawValue: Int
89 |
:
93 |
94 | /// Keeps empty collections in final output
95 | public static let keepEmptyCollections = EncodableConversionOptions(rawValue: 1 << 0)
| |- warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'keepEmptyCollections' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | }
97 |
[262/283] Compiling SwiftNet CertificateExplorer.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/Encodable + extensions.swift:95:20: warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public struct EncodableConversionOptions: OptionSet {
| `- note: consider making struct 'EncodableConversionOptions' conform to the 'Sendable' protocol
88 | public let rawValue: Int
89 |
:
93 |
94 | /// Keeps empty collections in final output
95 | public static let keepEmptyCollections = EncodableConversionOptions(rawValue: 1 << 0)
| |- warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'keepEmptyCollections' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | }
97 |
[263/283] Compiling SwiftNet SNNetworkMonitor.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/Encodable + extensions.swift:95:20: warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
85 | }
86 |
87 | public struct EncodableConversionOptions: OptionSet {
| `- note: consider making struct 'EncodableConversionOptions' conform to the 'Sendable' protocol
88 | public let rawValue: Int
89 |
:
93 |
94 | /// Keeps empty collections in final output
95 | public static let keepEmptyCollections = EncodableConversionOptions(rawValue: 1 << 0)
| |- warning: static property 'keepEmptyCollections' is not concurrency-safe because non-'Sendable' type 'EncodableConversionOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'keepEmptyCollections' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
96 | }
97 |
[264/283] Compiling SwiftNet SNTaskType.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:16:13: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
15 |
16 | static let shared = SNNetworkMonitor()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 | private init() { }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:23:5: warning: capture of 'self' with non-sendable type 'SNNetworkMonitor' in a '@Sendable' closure; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
:
21 | monitor.pathUpdateHandler = { [unowned self] in
22 | if $0.status == .requiresConnection || $0.status == .unsatisfied {
23 | self.connectionPublisher.send(.unavailable)
| `- warning: capture of 'self' with non-sendable type 'SNNetworkMonitor' in a '@Sendable' closure; this is an error in the Swift 6 language mode
24 | } else if $0.usesInterfaceType(.cellular) {
25 | self.connectionPublisher.send(.cellular)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:11:14: warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
| `- warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:12:6: warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
| `- warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
13 |
14 | public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:20:14: warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
18 |
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
| `- warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
21 | private let mode: PinningMode
22 | private let excludedSites: [String]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/CertificateExplorer.swift:10:7: note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class CertificateExplorer {
| `- note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
11 | func fetchCertificates() -> [SecCertificate] {
12 | var certificates: [SecCertificate] = []
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:21:14: warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
21 | private let mode: PinningMode
| `- warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:10:15: note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:24:19: warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
24 | private lazy var pinnedCerts = certExplorer.fetchCertificates()
| `- warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
25 | private lazy var pinnedKeys = certExplorer.fetchSLLKeys()
26 |
[265/283] Compiling SwiftNet SNConfig + extensions.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:16:13: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
15 |
16 | static let shared = SNNetworkMonitor()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 | private init() { }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:23:5: warning: capture of 'self' with non-sendable type 'SNNetworkMonitor' in a '@Sendable' closure; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
:
21 | monitor.pathUpdateHandler = { [unowned self] in
22 | if $0.status == .requiresConnection || $0.status == .unsatisfied {
23 | self.connectionPublisher.send(.unavailable)
| `- warning: capture of 'self' with non-sendable type 'SNNetworkMonitor' in a '@Sendable' closure; this is an error in the Swift 6 language mode
24 | } else if $0.usesInterfaceType(.cellular) {
25 | self.connectionPublisher.send(.cellular)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:11:14: warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
| `- warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:12:6: warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
| `- warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
13 |
14 | public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:20:14: warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
18 |
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
| `- warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
21 | private let mode: PinningMode
22 | private let excludedSites: [String]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/CertificateExplorer.swift:10:7: note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class CertificateExplorer {
| `- note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
11 | func fetchCertificates() -> [SecCertificate] {
12 | var certificates: [SecCertificate] = []
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:21:14: warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
21 | private let mode: PinningMode
| `- warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:10:15: note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:24:19: warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
24 | private lazy var pinnedCerts = certExplorer.fetchCertificates()
| `- warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
25 | private lazy var pinnedKeys = certExplorer.fetchSLLKeys()
26 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/AnyPublisher + toAsyncTask.swift:31:34: warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
29 | } receiveValue: { output in
30 | finishedWithoutValue = false
31 | continuation.resume(with: .success(output))
| |- warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
| `- note: Passing task-isolated value of non-Sendable type 'Result<Output, any Error>' as a 'sending' parameter risks causing races inbetween task-isolated uses and uses reachable from the callee
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/AnyPublisher + toAsyncTask.swift:31:34: warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
29 | } receiveValue: { output in
30 | finishedWithoutValue = false
31 | continuation.resume(with: .success(output))
| |- warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
| `- note: Passing task-isolated value of non-Sendable type 'Result<Output, any Error>' as a 'sending' parameter risks causing races inbetween task-isolated uses and uses reachable from the callee
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/AnyPublisher + toAsyncTask.swift:31:34: warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
29 | } receiveValue: { output in
30 | finishedWithoutValue = false
31 | continuation.resume(with: .success(output))
| |- warning: sending value of non-Sendable type 'Result<Output, any Error>' risks causing data races; this is an error in the Swift 6 language mode
| `- note: Passing task-isolated value of non-Sendable type 'Result<Output, any Error>' as a 'sending' parameter risks causing races inbetween task-isolated uses and uses reachable from the callee
32 | }
33 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:17:20: warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
15 | }
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
| |- warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ssl' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
19 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:18:20: warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
| |- warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'certificate' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:17:20: warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
15 | }
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
| |- warning: static property 'ssl' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'ssl' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
19 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:18:20: warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
:
16 |
17 | public static let ssl = PinningMode(rawValue: 1 << 0)
18 | public static let certificate = PinningMode(rawValue: 1 << 1)
| |- warning: static property 'certificate' is not concurrency-safe because non-'Sendable' type 'PinningMode' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'certificate' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:319:5: warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
317 | let task = session.uploadTask(with: urlRequest, from: data) { data, response, error in
318 | if let error = error {
319 | publisher.send(completion: .failure(error))
| `- warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
320 | return
321 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:9:12: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | @_exported import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 | @_exported import SNUtilities
11 | @_exported import SwiftNetMacros
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:15:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
13 | fileprivate func runOnMain(_ completion: @escaping () -> Void) {
14 | DispatchQueue.main.async {
15 | completion()
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:174:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | let wrapper: PassthroughSubject<U, Error> = .init()
173 |
174 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | do {
176 | let data = try await task(
| `- note: closure captures 'self' which is accessible to code in the current task
177 | for: endpoint,
178 | responseType: responseType,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:319:5: warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
317 | let task = session.uploadTask(with: urlRequest, from: data) { data, response, error in
318 | if let error = error {
319 | publisher.send(completion: .failure(error))
| `- warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
320 | return
321 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:9:12: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | @_exported import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 | @_exported import SNUtilities
11 | @_exported import SwiftNetMacros
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:15:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
13 | fileprivate func runOnMain(_ completion: @escaping () -> Void) {
14 | DispatchQueue.main.async {
15 | completion()
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:174:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | let wrapper: PassthroughSubject<U, Error> = .init()
173 |
174 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | do {
176 | let data = try await task(
| `- note: closure captures 'self' which is accessible to code in the current task
177 | for: endpoint,
178 | responseType: responseType,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:319:5: warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
317 | let task = session.uploadTask(with: urlRequest, from: data) { data, response, error in
318 | if let error = error {
319 | publisher.send(completion: .failure(error))
| `- warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
320 | return
321 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:9:12: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | @_exported import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 | @_exported import SNUtilities
11 | @_exported import SwiftNetMacros
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:15:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
13 | fileprivate func runOnMain(_ completion: @escaping () -> Void) {
14 | DispatchQueue.main.async {
15 | completion()
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:174:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | let wrapper: PassthroughSubject<U, Error> = .init()
173 |
174 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | do {
176 | let data = try await task(
| `- note: closure captures 'self' which is accessible to code in the current task
177 | for: endpoint,
178 | responseType: responseType,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:12:20: warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
| |- warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'pinningModes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'pinningModes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:13:20: warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
| |- warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sitesExcludedFromPinning' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'sitesExcludedFromPinning' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:14:20: warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
| |- warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultJSONDecoder' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultJSONDecoder' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:15:20: warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
| |- warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultAccessTokenStrategy' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultAccessTokenStrategy' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:16:20: warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
| |- warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'keychainInstance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'keychainInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:17:23: warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
| |- warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenStorage' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenStorage' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static var accessTokenErrorCodes: [Int] = [401]
19 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:18:23: warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
| |- warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenErrorCodes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenErrorCodes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 |
20 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/AccessTokenStorage.swift:12:28: warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension SNConfig {
12 | fileprivate static var accessTokens: [String: SNAccessToken] = [:]
| |- warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokens' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokens' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:12:20: warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
| |- warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'pinningModes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'pinningModes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:13:20: warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
| |- warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sitesExcludedFromPinning' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'sitesExcludedFromPinning' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:14:20: warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
| |- warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultJSONDecoder' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultJSONDecoder' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:15:20: warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
| |- warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultAccessTokenStrategy' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultAccessTokenStrategy' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:16:20: warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
| |- warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'keychainInstance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'keychainInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:17:23: warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
| |- warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenStorage' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenStorage' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static var accessTokenErrorCodes: [Int] = [401]
19 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:18:23: warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
| |- warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenErrorCodes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenErrorCodes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 |
20 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/AccessTokenStorage.swift:12:28: warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension SNConfig {
12 | fileprivate static var accessTokens: [String: SNAccessToken] = [:]
| |- warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokens' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokens' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:12:20: warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
| |- warning: static property 'pinningModes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'pinningModes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'pinningModes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:13:20: warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
11 | public class SNConfig {
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
| |- warning: static property 'sitesExcludedFromPinning' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'sitesExcludedFromPinning' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'sitesExcludedFromPinning' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:14:20: warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
12 | public static var pinningModes: PinningMode = PinningMode(rawValue: 0)
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
| |- warning: static property 'defaultJSONDecoder' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultJSONDecoder' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultJSONDecoder' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:15:20: warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
13 | public static var sitesExcludedFromPinning: [String] = []
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
| |- warning: static property 'defaultAccessTokenStrategy' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'defaultAccessTokenStrategy' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'defaultAccessTokenStrategy' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:16:20: warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 | public static var defaultJSONDecoder: JSONDecoder = .init()
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
| |- warning: static property 'keychainInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'keychainInstance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'keychainInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:17:23: warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
15 | public static var defaultAccessTokenStrategy: AccessTokenStrategy = .global
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
| |- warning: static property 'accessTokenStorage' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenStorage' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenStorage' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static var accessTokenErrorCodes: [Int] = [401]
19 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Config/SNConfig.swift:18:23: warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
16 | public static var keychainInstance: Keychain?
17 | public static var accessTokenStorage: AccessTokenStorage = SNStorage()
18 | public static var accessTokenErrorCodes: [Int] = [401]
| |- warning: static property 'accessTokenErrorCodes' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokenErrorCodes' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokenErrorCodes' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 |
20 | private init() {}
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Data/AccessTokenStorage.swift:12:28: warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension SNConfig {
12 | fileprivate static var accessTokens: [String: SNAccessToken] = [:]
| |- warning: static property 'accessTokens' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'accessTokens' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'accessTokens' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | }
14 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:16:13: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
15 |
16 | static let shared = SNNetworkMonitor()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 | private init() { }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:23:5: warning: capture of 'self' with non-sendable type 'SNNetworkMonitor' in a '@Sendable' closure; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
:
21 | monitor.pathUpdateHandler = { [unowned self] in
22 | if $0.status == .requiresConnection || $0.status == .unsatisfied {
23 | self.connectionPublisher.send(.unavailable)
| `- warning: capture of 'self' with non-sendable type 'SNNetworkMonitor' in a '@Sendable' closure; this is an error in the Swift 6 language mode
24 | } else if $0.usesInterfaceType(.cellular) {
25 | self.connectionPublisher.send(.cellular)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:11:14: warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
| `- warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:12:6: warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
| `- warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
13 |
14 | public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:20:14: warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
18 |
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
| `- warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
21 | private let mode: PinningMode
22 | private let excludedSites: [String]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/CertificateExplorer.swift:10:7: note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class CertificateExplorer {
| `- note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
11 | func fetchCertificates() -> [SecCertificate] {
12 | var certificates: [SecCertificate] = []
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:21:14: warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
21 | private let mode: PinningMode
| `- warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:10:15: note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:24:19: warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
24 | private lazy var pinnedCerts = certExplorer.fetchCertificates()
| `- warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
25 | private lazy var pinnedKeys = certExplorer.fetchSLLKeys()
26 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:16:13: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
15 |
16 | static let shared = SNNetworkMonitor()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SNNetworkMonitor' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 | private init() { }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNNetworkMonitor.swift:23:5: warning: capture of 'self' with non-sendable type 'SNNetworkMonitor' in a '@Sendable' closure; this is an error in the Swift 6 language mode
10 | import Network
11 |
12 | public class SNNetworkMonitor {
| `- note: class 'SNNetworkMonitor' does not conform to the 'Sendable' protocol
13 | private let monitor = NWPathMonitor()
14 | private let connectionPublisher: PassthroughSubject<ConnectionType, Never> = .init()
:
21 | monitor.pathUpdateHandler = { [unowned self] in
22 | if $0.status == .requiresConnection || $0.status == .unsatisfied {
23 | self.connectionPublisher.send(.unavailable)
| `- warning: capture of 'self' with non-sendable type 'SNNetworkMonitor' in a '@Sendable' closure; this is an error in the Swift 6 language mode
24 | } else if $0.usesInterfaceType(.cellular) {
25 | self.connectionPublisher.send(.cellular)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:11:14: warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 | import Combine
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
| `- warning: non-final class 'SNSimpleSessionDelegate' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
13 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:12:6: warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
12 | let uploadProgress: PassthroughSubject<(id: Int, progress: Double), Never> = .init()
| `- warning: stored property 'uploadProgress' of 'Sendable'-conforming class 'SNSimpleSessionDelegate' has non-sendable type 'PassthroughSubject<(id: Int, progress: Double), Never>'; this is an error in the Swift 6 language mode
13 |
14 | public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 |
11 | public class SNSimpleSessionDelegate: NSObject, URLSessionTaskDelegate {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:20:14: warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
18 |
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
| `- warning: stored property 'certExplorer' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'CertificateExplorer'; this is an error in the Swift 6 language mode
21 | private let mode: PinningMode
22 | private let excludedSites: [String]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/CertificateExplorer.swift:10:7: note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | class CertificateExplorer {
| `- note: class 'CertificateExplorer' does not conform to the 'Sendable' protocol
11 | func fetchCertificates() -> [SecCertificate] {
12 | var certificates: [SecCertificate] = []
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:21:14: warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
19 | final public class SNSessionDelegate: SNSimpleSessionDelegate {
20 | private let certExplorer = CertificateExplorer()
21 | private let mode: PinningMode
| `- warning: stored property 'mode' of 'Sendable'-conforming class 'SNSessionDelegate' has non-sendable type 'PinningMode'; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/PinningMode.swift:10:15: note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
8 | import Foundation
9 |
10 | public struct PinningMode: OptionSet {
| `- note: consider making struct 'PinningMode' conform to the 'Sendable' protocol
11 | public let rawValue: Int
12 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Session/SNSessionDelegate.swift:24:19: warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
22 | private let excludedSites: [String]
23 |
24 | private lazy var pinnedCerts = certExplorer.fetchCertificates()
| `- warning: stored property '$__lazy_storage_$_pinnedCerts' of 'Sendable'-conforming class 'SNSessionDelegate' is mutable; this is an error in the Swift 6 language mode
25 | private lazy var pinnedKeys = certExplorer.fetchSLLKeys()
26 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:319:5: warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
317 | let task = session.uploadTask(with: urlRequest, from: data) { data, response, error in
318 | if let error = error {
319 | publisher.send(completion: .failure(error))
| `- warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
320 | return
321 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:9:12: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | @_exported import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 | @_exported import SNUtilities
11 | @_exported import SwiftNetMacros
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:15:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
13 | fileprivate func runOnMain(_ completion: @escaping () -> Void) {
14 | DispatchQueue.main.async {
15 | completion()
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:174:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | let wrapper: PassthroughSubject<U, Error> = .init()
173 |
174 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | do {
176 | let data = try await task(
| `- note: closure captures 'self' which is accessible to code in the current task
177 | for: endpoint,
178 | responseType: responseType,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:319:5: warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
317 | let task = session.uploadTask(with: urlRequest, from: data) { data, response, error in
318 | if let error = error {
319 | publisher.send(completion: .failure(error))
| `- warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
320 | return
321 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:9:12: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | @_exported import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 | @_exported import SNUtilities
11 | @_exported import SwiftNetMacros
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:15:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
13 | fileprivate func runOnMain(_ completion: @escaping () -> Void) {
14 | DispatchQueue.main.async {
15 | completion()
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:174:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | let wrapper: PassthroughSubject<U, Error> = .init()
173 |
174 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | do {
176 | let data = try await task(
| `- note: closure captures 'self' which is accessible to code in the current task
177 | for: endpoint,
178 | responseType: responseType,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:319:5: warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
317 | let task = session.uploadTask(with: urlRequest, from: data) { data, response, error in
318 | if let error = error {
319 | publisher.send(completion: .failure(error))
| `- warning: capture of 'publisher' with non-sendable type 'PassthroughSubject<UploadResponse<U>, any Error>' in a '@Sendable' closure
320 | return
321 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:9:12: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 |
8 | import Foundation
9 | @_exported import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 | @_exported import SNUtilities
11 | @_exported import SwiftNetMacros
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: capture of 'endpoint' with non-sendable type 'T' in a '@Sendable' closure
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:325:37: warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
32 |
33 | @available(macOS 10.15, *)
34 | open class SNProvider<T: Endpoint> {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
35 | private var didRetry: [String] = []
36 | private let endpointURLMapper: EndpointURLMapper
:
323 | if (response as? HTTPURLResponse)?.statusCode == 200, let data = data {
324 | do {
325 | let response = try (decoder ?? endpoint.jsonDecoder).decode(U.self, from: data)
| `- warning: implicit capture of 'endpoint' requires that 'T' conforms to 'Sendable'; this is an error in the Swift 6 language mode
326 | publisher.send(.response(data: response))
327 | return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:15:9: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
13 | fileprivate func runOnMain(_ completion: @escaping () -> Void) {
14 | DispatchQueue.main.async {
15 | completion()
| |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
16 | }
17 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftNet/Request/SNProvider.swift:174:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | let wrapper: PassthroughSubject<U, Error> = .init()
173 |
174 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | do {
176 | let data = try await task(
| `- note: closure captures 'self' which is accessible to code in the current task
177 | for: endpoint,
178 | responseType: responseType,
Build complete! (32.98s)
Build complete.
{
"dependencies" : [
{
"identity" : "swift-syntax",
"requirement" : {
"range" : [
{
"lower_bound" : "509.0.0",
"upper_bound" : "510.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-syntax.git"
}
],
"manifest_display_name" : "SwiftNet",
"name" : "SwiftNet",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "ios",
"version" : "13.0"
}
],
"products" : [
{
"name" : "SwiftNet",
"targets" : [
"SwiftNet",
"SNUtilities",
"SwiftNetMacros"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "SNMacros",
"targets" : [
"SNMacros"
],
"type" : {
"macro" : null
}
}
],
"targets" : [
{
"c99name" : "SwiftNetTests",
"module_type" : "SwiftTarget",
"name" : "SwiftNetTests",
"path" : "Tests/SwiftNetTests",
"sources" : [
"AccessTokenManipulationTests.swift",
"Comment.swift",
"EncodableConversionTests.swift",
"MacroPoweredApproachTests.swift",
"Post.swift",
"RemoteEndpoint.swift",
"SwiftNetTests.swift",
"TestEndpoint.swift",
"TestParamsModel.swift",
"Todo.swift",
"WebSocketTests.swift"
],
"target_dependencies" : [
"SwiftNet",
"SwiftNetMacros",
"SNMacros"
],
"type" : "test"
},
{
"c99name" : "SwiftNetMacrosTests",
"module_type" : "SwiftTarget",
"name" : "SwiftNetMacrosTests",
"path" : "Tests/SwiftNetMacrosTests",
"product_dependencies" : [
"SwiftSyntaxMacrosTestSupport"
],
"sources" : [
"SwiftNetMacrosTests.swift"
],
"target_dependencies" : [
"SwiftNetMacros"
],
"type" : "test"
},
{
"c99name" : "SwiftNetMacros",
"module_type" : "SwiftTarget",
"name" : "SwiftNetMacros",
"path" : "Sources/SwiftNetMacros",
"product_memberships" : [
"SwiftNet"
],
"sources" : [
"SwiftNetMacros.swift"
],
"target_dependencies" : [
"SNMacros",
"SNUtilities"
],
"type" : "library"
},
{
"c99name" : "SwiftNet",
"module_type" : "SwiftTarget",
"name" : "SwiftNet",
"path" : "Sources/SwiftNet",
"product_memberships" : [
"SwiftNet"
],
"sources" : [
"Config/SNConfig + extensions.swift",
"Config/SNConfig.swift",
"Data/AccessTokenStorage.swift",
"Data/Encodable + extensions.swift",
"Data/Endpoint.swift",
"Data/SNDataEncoder.swift",
"Data/UploadResponse.swift",
"Debugging/SNDebugInfo.swift",
"Debugging/SNError.swift",
"Debugging/SNProvider + Test.swift",
"EndpointBuilder/BridgingEndpoint.swift",
"EndpointBuilder/EndpointBuilder.swift",
"EndpointBuilder/EndpointModel.swift",
"Request/AnyPublisher + asAccessTokenConvertible.swift",
"Request/AnyPublisher + toAsyncTask.swift",
"Request/SNProvider + defaultURLMapper.swift",
"Request/SNProvider.swift",
"Request/SNTaskType.swift",
"Request/URLRequest + cURL.swift",
"Session/CertificateExplorer.swift",
"Session/Keychain.swift",
"Session/PinningMode.swift",
"Session/SNNetworkMonitor.swift",
"Session/SNSessionDelegate.swift",
"WebSocket/SNWebSocket.swift",
"WebSocket/WebSocketConnectionParameters.swift"
],
"target_dependencies" : [
"SNUtilities",
"SwiftNetMacros"
],
"type" : "library"
},
{
"c99name" : "SNUtilities",
"module_type" : "SwiftTarget",
"name" : "SNUtilities",
"path" : "Sources/SNUtilities",
"product_memberships" : [
"SwiftNet",
"SNMacros"
],
"sources" : [
"Authorization/AccessTokenConvertible.swift",
"Authorization/AccessTokenStrategy.swift",
"Authorization/SNAccessToken.swift",
"Request/Boundary.swift",
"Request/EndpointData.swift",
"Request/EndpointDescriptor.swift",
"Request/Method.swift"
],
"type" : "library"
},
{
"c99name" : "SNMacros",
"module_type" : "SwiftTarget",
"name" : "SNMacros",
"path" : "Sources/SNMacros",
"product_dependencies" : [
"SwiftSyntaxMacros",
"SwiftCompilerPlugin"
],
"product_memberships" : [
"SwiftNet",
"SNMacros"
],
"sources" : [
"EndpointMacro/EndpointMacro.swift",
"RequestMacros/RequestMacros.swift",
"RequestMacros/VariableDetector.swift",
"SNDiagnostics.swift",
"SNMacrosPlugin.swift"
],
"target_dependencies" : [
"SNUtilities"
],
"type" : "macro"
}
],
"tools_version" : "5.9"
}
Done.