Build Information
Failed to build SignalRClient, reference 1.1.0 (11e727
), with Swift 6.0 for Linux on 30 Nov 2024 07:45:08 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -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 2>&1
Build Log
288 | cancelDidFail(e)
| |- warning: capture of 'cancelDidFail' with non-sendable type '(any Error) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
289 | }
290 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:297:17: warning: capture of 'cancelDidFail' with non-sendable type '(any Error) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
295 | logger.log(logLevel: .error, message: "Sending cancellation of server side streaming hub method failed: \(error)")
296 | self.callbackQueue.async {
297 | cancelDidFail(error)
| |- warning: capture of 'cancelDidFail' with non-sendable type '(any Error) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
298 | }
299 | }
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:337:13: warning: capture of 'invocationHandler' with non-sendable type 'any ServerInvocationHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
335 |
336 | callbackQueue.async {
337 | invocationHandler.raiseError(error: error)
| `- warning: capture of 'invocationHandler' with non-sendable type 'any ServerInvocationHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
338 | }
339 | }
/host/spi-builder-workspace/Sources/SignalRClient/ServerInvocationHandler.swift:11:19: note: protocol 'ServerInvocationHandler' does not conform to the 'Sendable' protocol
9 | import Foundation
10 |
11 | internal protocol ServerInvocationHandler {
| `- note: protocol 'ServerInvocationHandler' does not conform to the 'Sendable' protocol
12 | func createInvocationMessage(invocationId: String, method: String, arguments: [Encodable], streamIds: [String]?) -> HubMessage
13 | func processStreamItem(streamItemMessage: StreamItemMessage) -> Error?
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:345:17: warning: capture of 'errorHandler' with non-sendable type '(any Error) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
343 | logger.log(logLevel: .error, message: "Attempting to send data before connection has been started.")
344 | callbackQueue.async {
345 | errorHandler(SignalRError.invalidOperation(message: "Attempting to send data before connection has been started."))
| |- warning: capture of 'errorHandler' with non-sendable type '(any Error) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
346 | }
347 | return false
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:368:21: warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 | - note: You need to maintain the reference to the `HubConnection` instance until the connection is stopped
16 | */
17 | public class HubConnection {
| `- note: class 'HubConnection' does not conform to the 'Sendable' protocol
18 |
19 | private var invocationId: Int = 0
:
366 | logger.log(logLevel: .error, message: "Parsing handshake response failed: \(e)")
367 | callbackQueue.async {
368 | self.delegate?.connectionDidFailToOpen(error: e)
| `- warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
369 | }
370 | return
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:374:21: warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 | - note: You need to maintain the reference to the `HubConnection` instance until the connection is stopped
16 | */
17 | public class HubConnection {
| `- note: class 'HubConnection' does not conform to the 'Sendable' protocol
18 |
19 | private var invocationId: Int = 0
:
372 | if originalHandshakeStatus.isReconnect {
373 | callbackQueue.async {
374 | self.delegate?.connectionDidReconnect()
| `- warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
375 | }
376 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:378:21: warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 | - note: You need to maintain the reference to the `HubConnection` instance until the connection is stopped
16 | */
17 | public class HubConnection {
| `- note: class 'HubConnection' does not conform to the 'Sendable' protocol
18 |
19 | private var invocationId: Int = 0
:
376 | } else {
377 | callbackQueue.async {
378 | self.delegate?.connectionDidOpen(hubConnection: self)
| `- warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
379 | }
380 | resetKeepAlive()
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:416:17: warning: capture of 'serverInvocationHandler' with non-sendable type '(any ServerInvocationHandler)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
414 | if serverInvocationHandler != nil {
415 | callbackQueue.async {
416 | serverInvocationHandler!.processCompletion(completionMessage: message)
| `- warning: capture of 'serverInvocationHandler' with non-sendable type '(any ServerInvocationHandler)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
417 | }
418 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/ServerInvocationHandler.swift:11:19: note: protocol 'ServerInvocationHandler' does not conform to the 'Sendable' protocol
9 | import Foundation
10 |
11 | internal protocol ServerInvocationHandler {
| `- note: protocol 'ServerInvocationHandler' does not conform to the 'Sendable' protocol
12 | func createInvocationMessage(invocationId: String, method: String, arguments: [Encodable], streamIds: [String]?) -> HubMessage
13 | func processStreamItem(streamItemMessage: StreamItemMessage) -> Error?
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:416:79: warning: capture of 'message' with non-sendable type 'CompletionMessage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
414 | if serverInvocationHandler != nil {
415 | callbackQueue.async {
416 | serverInvocationHandler!.processCompletion(completionMessage: message)
| `- warning: capture of 'message' with non-sendable type 'CompletionMessage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
417 | }
418 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HubProtocol.swift:166:14: note: class 'CompletionMessage' does not conform to the 'Sendable' protocol
164 | }
165 |
166 | public class CompletionMessage: HubMessage, Codable {
| `- note: class 'CompletionMessage' does not conform to the 'Sendable' protocol
167 | public let type = MessageType.Completion
168 | public let invocationId: String
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:416:17: warning: reference to captured var 'serverInvocationHandler' in concurrently-executing code; this is an error in the Swift 6 language mode
414 | if serverInvocationHandler != nil {
415 | callbackQueue.async {
416 | serverInvocationHandler!.processCompletion(completionMessage: message)
| `- warning: reference to captured var 'serverInvocationHandler' in concurrently-executing code; this is an error in the Swift 6 language mode
417 | }
418 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:449:25: warning: capture of 'callback' with non-sendable type '((ArgumentExtractor) throws -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
447 | callbackQueue.async {
448 | do {
449 | try callback!(ArgumentExtractor(clientInvocationMessage: message))
| |- warning: capture of 'callback' with non-sendable type '((ArgumentExtractor) throws -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
450 | } catch {
451 | self.logger.log(logLevel: .error, message: "Invoking client hub method \(message.target) failed due to: \(error)")
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:449:78: warning: capture of 'message' with non-sendable type 'ClientInvocationMessage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
447 | callbackQueue.async {
448 | do {
449 | try callback!(ArgumentExtractor(clientInvocationMessage: message))
| `- warning: capture of 'message' with non-sendable type 'ClientInvocationMessage' in a `@Sendable` closure; this is an error in the Swift 6 language mode
450 | } catch {
451 | self.logger.log(logLevel: .error, message: "Invoking client hub method \(message.target) failed due to: \(error)")
/host/spi-builder-workspace/Sources/SignalRClient/HubProtocol.swift:80:14: note: class 'ClientInvocationMessage' does not conform to the 'Sendable' protocol
78 | }
79 |
80 | public class ClientInvocationMessage: HubMessage, Decodable {
| `- note: class 'ClientInvocationMessage' does not conform to the 'Sendable' protocol
81 | public let type = MessageType.Invocation
82 | public let target: String
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:451:21: warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 | - note: You need to maintain the reference to the `HubConnection` instance until the connection is stopped
16 | */
17 | public class HubConnection {
| `- note: class 'HubConnection' does not conform to the 'Sendable' protocol
18 |
19 | private var invocationId: Int = 0
:
449 | try callback!(ArgumentExtractor(clientInvocationMessage: message))
450 | } catch {
451 | self.logger.log(logLevel: .error, message: "Invoking client hub method \(message.target) failed due to: \(error)")
| `- warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
452 | }
453 | }
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:449:25: warning: reference to captured var 'callback' in concurrently-executing code; this is an error in the Swift 6 language mode
447 | callbackQueue.async {
448 | do {
449 | try callback!(ArgumentExtractor(clientInvocationMessage: message))
| `- warning: reference to captured var 'callback' in concurrently-executing code; this is an error in the Swift 6 language mode
450 | } catch {
451 | self.logger.log(logLevel: .error, message: "Invoking client hub method \(message.target) failed due to: \(error)")
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:451:94: warning: implicit capture of 'message' requires that 'ClientInvocationMessage' conforms to `Sendable`; this is an error in the Swift 6 language mode
449 | try callback!(ArgumentExtractor(clientInvocationMessage: message))
450 | } catch {
451 | self.logger.log(logLevel: .error, message: "Invoking client hub method \(message.target) failed due to: \(error)")
| `- warning: implicit capture of 'message' requires that 'ClientInvocationMessage' conforms to `Sendable`; this is an error in the Swift 6 language mode
452 | }
453 | }
/host/spi-builder-workspace/Sources/SignalRClient/HubProtocol.swift:80:14: note: class 'ClientInvocationMessage' does not conform to the 'Sendable' protocol
78 | }
79 |
80 | public class ClientInvocationMessage: HubMessage, Decodable {
| `- note: class 'ClientInvocationMessage' does not conform to the 'Sendable' protocol
81 | public let type = MessageType.Invocation
82 | public let target: String
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:479:13: warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 | - note: You need to maintain the reference to the `HubConnection` instance until the connection is stopped
16 | */
17 | public class HubConnection {
| `- note: class 'HubConnection' does not conform to the 'Sendable' protocol
18 |
19 | private var invocationId: Int = 0
:
477 | handshakeStatus = .needsHandling(false)
478 | callbackQueue.async {
479 | self.delegate?.connectionDidClose(error: error)
| `- warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
480 | }
481 | }
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:485:13: warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 | - note: You need to maintain the reference to the `HubConnection` instance until the connection is stopped
16 | */
17 | public class HubConnection {
| `- note: class 'HubConnection' does not conform to the 'Sendable' protocol
18 |
19 | private var invocationId: Int = 0
:
483 | fileprivate func connectionDidFailToOpen(error: Error) {
484 | callbackQueue.async {
485 | self.delegate?.connectionDidFailToOpen(error: error)
| `- warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
486 | }
487 | }
/host/spi-builder-workspace/Sources/SignalRClient/HubConnection.swift:492:13: warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
15 | - note: You need to maintain the reference to the `HubConnection` instance until the connection is stopped
16 | */
17 | public class HubConnection {
| `- note: class 'HubConnection' does not conform to the 'Sendable' protocol
18 |
19 | private var invocationId: Int = 0
:
490 | handshakeStatus = .needsHandling(true)
491 | callbackQueue.async {
492 | self.delegate?.connectionWillReconnect(error: error)
| `- warning: capture of 'self' with non-sendable type 'HubConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
493 | }
494 | }
/host/spi-builder-workspace/Sources/SignalRClient/HubProtocol.swift:270:16: warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'PingMessage' may have shared mutable state; this is an error in the Swift 6 language mode
264 | }
265 |
266 | public class PingMessage : HubMessage, Encodable {
| `- note: class 'PingMessage' does not conform to the 'Sendable' protocol
267 | public let type = MessageType.Ping
268 | private init() { }
269 |
270 | static let instance = PingMessage()
| |- warning: static property 'instance' is not concurrency-safe because non-'Sendable' type 'PingMessage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'instance' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
271 | }
272 |
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:22:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | }
24 |
[20/33] Compiling SignalRClient TransportDelegate.swift
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:18:23: warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
16 | }
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
| |- warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'longPolling' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:19:16: warning: static property 'serverSentEvents' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
| |- warning: static property 'serverSentEvents' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'serverSentEvents' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:20:23: warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
| |- warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'webSockets' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:22:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | }
24 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:15:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | private let logger: Logger
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:16:32: error: cannot find type 'URLSessionWebSocketTask' in scope
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
18 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:17:158: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |
19 | private var isTransportClosed = false
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:55:66: error: cannot find type 'URLSessionWebSocketTask' in scope
53 | }
54 |
55 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
56 | logger.log(logLevel: .info, message: "urlSession didOpenWithProtocol invoked. WebSocket open")
57 | delegate?.transportDidOpen()
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:55:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | logger.log(logLevel: .info, message: "urlSession didOpenWithProtocol invoked. WebSocket open")
57 | delegate?.transportDidOpen()
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:77:41: error: cannot find type 'URLSessionWebSocketTask' in scope
75 | }
76 |
77 | private func handleMessage(message: URLSessionWebSocketTask.Message) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
78 | switch message {
79 | case .string(let text):
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:100:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
98 | }
99 |
100 | public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 | logger.log(logLevel: .debug, message: "urlSession didCompleteWithError invoked")
102 | guard error != nil else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:100:57: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
98 | }
99 |
100 | public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 | logger.log(logLevel: .debug, message: "urlSession didCompleteWithError invoked")
102 | guard error != nil else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:66: error: cannot find type 'URLSessionWebSocketTask' in scope
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:115: error: cannot find type 'URLSessionWebSocketTask' in scope
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:152: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:73: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:179:95: error: cannot find type 'URLRequest' in scope
177 | }
178 |
179 | @inline(__always) private func populateHeaders(headers: [String : String], request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
180 | headers.forEach { (key, value) in
181 | request.addValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:185:102: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | @inline(__always) private func setAccessToken(accessTokenProvider: () -> String?, request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
186 | if let accessToken = accessTokenProvider() {
187 | request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:12:56: error: cannot find type 'URLSessionWebSocketDelegate' in scope
10 |
11 | @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
12 | public class WebsocketsTransport: NSObject, Transport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
13 | private let logger: Logger
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnectionOptions.swift:58:157: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
56 | public var maximumWebsocketMessageSize: Int?
57 |
58 | public var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |
60 | /**
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:33:23: error: cannot find 'URLRequest' in scope
31 | authenticationChallengeHandler = options.authenticationChallengeHandler
32 |
33 | var request = URLRequest(url: convertUrl(url: url))
| `- error: cannot find 'URLRequest' in scope
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:36:22: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
37 | webSocketTask = urlSession!.webSocketTask(with: request)
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:36:49: error: cannot infer contextual base in reference to member 'default'
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
| `- error: cannot infer contextual base in reference to member 'default'
37 | webSocketTask = urlSession!.webSocketTask(with: request)
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:37:37: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
37 | webSocketTask = urlSession!.webSocketTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
39 | webSocketTask?.maximumMessageSize = maximumWebsocketMessageSize
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:46:23: error: cannot find 'URLSessionWebSocketTask' in scope
44 |
45 | public func send(data: Data, sendDidComplete: @escaping (Error?) -> Void) {
46 | let message = URLSessionWebSocketTask.Message.data(data)
| `- error: cannot find 'URLSessionWebSocketTask' in scope
47 | webSocketTask?.send(message, completionHandler: sendDidComplete)
48 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:51:38: error: cannot infer contextual base in reference to member 'normalClosure'
49 |
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
52 | urlSession?.finishTasksAndInvalidate()
53 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:51:61: error: 'nil' requires a contextual type
49 |
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
52 | urlSession?.finishTasksAndInvalidate()
53 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:52:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
52 | urlSession?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
53 | }
54 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:80:65: error: cannot infer contextual base in reference to member 'utf8'
78 | switch message {
79 | case .string(let text):
80 | delegate?.transportDidReceiveData(text.data(using: .utf8)!)
| `- error: cannot infer contextual base in reference to member 'utf8'
81 | case .data(let data):
82 | delegate?.transportDidReceiveData(data)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:113:73: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
111 | }
112 |
113 | let statusCode = (webSocketTask?.response as? HTTPURLResponse)?.statusCode ?? -1
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
114 | logger.log(logLevel: .info, message: "Error starting webSocket. Error: \(error!), HttpStatusCode: \(statusCode), WebSocket closeCode: \(webSocketTask?.closeCode.rawValue ?? -1)")
115 | delegate?.transportDidClose(error)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:147:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
145 | } else {
146 | logger.log(logLevel: .debug, message: "(ws) no auth challenge handler registered - falling back to default handling")
147 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
148 | }
149 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:147:56: error: 'nil' requires a contextual type
145 | } else {
146 | logger.log(logLevel: .debug, message: "(ws) no auth challenge handler registered - falling back to default handling")
147 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
148 | }
149 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:162:38: error: cannot infer contextual base in reference to member 'normalClosure'
160 |
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
163 | urlSession?.finishTasksAndInvalidate()
164 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:162:61: error: 'nil' requires a contextual type
160 |
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
163 | urlSession?.finishTasksAndInvalidate()
164 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:163:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
163 | urlSession?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
164 | }
165 |
[21/33] Compiling SignalRClient TransportType.swift
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:18:23: warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
16 | }
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
| |- warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'longPolling' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:19:16: warning: static property 'serverSentEvents' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
| |- warning: static property 'serverSentEvents' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'serverSentEvents' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:20:23: warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
| |- warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'webSockets' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:22:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | }
24 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:15:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | private let logger: Logger
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:16:32: error: cannot find type 'URLSessionWebSocketTask' in scope
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
18 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:17:158: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |
19 | private var isTransportClosed = false
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:55:66: error: cannot find type 'URLSessionWebSocketTask' in scope
53 | }
54 |
55 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
56 | logger.log(logLevel: .info, message: "urlSession didOpenWithProtocol invoked. WebSocket open")
57 | delegate?.transportDidOpen()
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:55:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | logger.log(logLevel: .info, message: "urlSession didOpenWithProtocol invoked. WebSocket open")
57 | delegate?.transportDidOpen()
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:77:41: error: cannot find type 'URLSessionWebSocketTask' in scope
75 | }
76 |
77 | private func handleMessage(message: URLSessionWebSocketTask.Message) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
78 | switch message {
79 | case .string(let text):
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:100:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
98 | }
99 |
100 | public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 | logger.log(logLevel: .debug, message: "urlSession didCompleteWithError invoked")
102 | guard error != nil else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:100:57: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
98 | }
99 |
100 | public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 | logger.log(logLevel: .debug, message: "urlSession didCompleteWithError invoked")
102 | guard error != nil else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:66: error: cannot find type 'URLSessionWebSocketTask' in scope
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:115: error: cannot find type 'URLSessionWebSocketTask' in scope
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:152: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:73: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:179:95: error: cannot find type 'URLRequest' in scope
177 | }
178 |
179 | @inline(__always) private func populateHeaders(headers: [String : String], request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
180 | headers.forEach { (key, value) in
181 | request.addValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:185:102: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | @inline(__always) private func setAccessToken(accessTokenProvider: () -> String?, request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
186 | if let accessToken = accessTokenProvider() {
187 | request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:12:56: error: cannot find type 'URLSessionWebSocketDelegate' in scope
10 |
11 | @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
12 | public class WebsocketsTransport: NSObject, Transport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
13 | private let logger: Logger
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnectionOptions.swift:58:157: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
56 | public var maximumWebsocketMessageSize: Int?
57 |
58 | public var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |
60 | /**
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:33:23: error: cannot find 'URLRequest' in scope
31 | authenticationChallengeHandler = options.authenticationChallengeHandler
32 |
33 | var request = URLRequest(url: convertUrl(url: url))
| `- error: cannot find 'URLRequest' in scope
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:36:22: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
37 | webSocketTask = urlSession!.webSocketTask(with: request)
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:36:49: error: cannot infer contextual base in reference to member 'default'
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
| `- error: cannot infer contextual base in reference to member 'default'
37 | webSocketTask = urlSession!.webSocketTask(with: request)
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:37:37: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
37 | webSocketTask = urlSession!.webSocketTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
39 | webSocketTask?.maximumMessageSize = maximumWebsocketMessageSize
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:46:23: error: cannot find 'URLSessionWebSocketTask' in scope
44 |
45 | public func send(data: Data, sendDidComplete: @escaping (Error?) -> Void) {
46 | let message = URLSessionWebSocketTask.Message.data(data)
| `- error: cannot find 'URLSessionWebSocketTask' in scope
47 | webSocketTask?.send(message, completionHandler: sendDidComplete)
48 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:51:38: error: cannot infer contextual base in reference to member 'normalClosure'
49 |
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
52 | urlSession?.finishTasksAndInvalidate()
53 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:51:61: error: 'nil' requires a contextual type
49 |
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
52 | urlSession?.finishTasksAndInvalidate()
53 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:52:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
52 | urlSession?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
53 | }
54 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:80:65: error: cannot infer contextual base in reference to member 'utf8'
78 | switch message {
79 | case .string(let text):
80 | delegate?.transportDidReceiveData(text.data(using: .utf8)!)
| `- error: cannot infer contextual base in reference to member 'utf8'
81 | case .data(let data):
82 | delegate?.transportDidReceiveData(data)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:113:73: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
111 | }
112 |
113 | let statusCode = (webSocketTask?.response as? HTTPURLResponse)?.statusCode ?? -1
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
114 | logger.log(logLevel: .info, message: "Error starting webSocket. Error: \(error!), HttpStatusCode: \(statusCode), WebSocket closeCode: \(webSocketTask?.closeCode.rawValue ?? -1)")
115 | delegate?.transportDidClose(error)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:147:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
145 | } else {
146 | logger.log(logLevel: .debug, message: "(ws) no auth challenge handler registered - falling back to default handling")
147 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
148 | }
149 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:147:56: error: 'nil' requires a contextual type
145 | } else {
146 | logger.log(logLevel: .debug, message: "(ws) no auth challenge handler registered - falling back to default handling")
147 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
148 | }
149 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:162:38: error: cannot infer contextual base in reference to member 'normalClosure'
160 |
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
163 | urlSession?.finishTasksAndInvalidate()
164 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:162:61: error: 'nil' requires a contextual type
160 |
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
163 | urlSession?.finishTasksAndInvalidate()
164 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:163:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
163 | urlSession?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
164 | }
165 |
[22/33] Compiling SignalRClient WebsocketsTransport.swift
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:18:23: warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
16 | }
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
| |- warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'longPolling' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:19:16: warning: static property 'serverSentEvents' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
| |- warning: static property 'serverSentEvents' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'serverSentEvents' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:20:23: warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
| |- warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'webSockets' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:22:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | }
24 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:15:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 | private let logger: Logger
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:16:32: error: cannot find type 'URLSessionWebSocketTask' in scope
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
18 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:17:158: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |
19 | private var isTransportClosed = false
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:55:66: error: cannot find type 'URLSessionWebSocketTask' in scope
53 | }
54 |
55 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
56 | logger.log(logLevel: .info, message: "urlSession didOpenWithProtocol invoked. WebSocket open")
57 | delegate?.transportDidOpen()
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:55:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didOpenWithProtocol protocol: String?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | logger.log(logLevel: .info, message: "urlSession didOpenWithProtocol invoked. WebSocket open")
57 | delegate?.transportDidOpen()
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:77:41: error: cannot find type 'URLSessionWebSocketTask' in scope
75 | }
76 |
77 | private func handleMessage(message: URLSessionWebSocketTask.Message) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
78 | switch message {
79 | case .string(let text):
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:100:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
98 | }
99 |
100 | public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 | logger.log(logLevel: .debug, message: "urlSession didCompleteWithError invoked")
102 | guard error != nil else {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:100:57: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
98 | }
99 |
100 | public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 | logger.log(logLevel: .debug, message: "urlSession didCompleteWithError invoked")
102 | guard error != nil else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:66: error: cannot find type 'URLSessionWebSocketTask' in scope
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:115: error: cannot find type 'URLSessionWebSocketTask' in scope
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:119:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | }
118 |
119 | public func urlSession(_ session: URLSession, webSocketTask: URLSessionWebSocketTask, didCloseWith closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | logger.log(logLevel: .debug, message: "urlSession didCloseWith invoked")
121 | var reasonString = ""
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:152: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:141:73: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 | }
140 |
141 | public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping @Sendable (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | if authenticationChallengeHandler != nil {
143 | logger.log(logLevel: .debug, message: "(ws) invoking custom auth challenge handler")
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:179:95: error: cannot find type 'URLRequest' in scope
177 | }
178 |
179 | @inline(__always) private func populateHeaders(headers: [String : String], request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
180 | headers.forEach { (key, value) in
181 | request.addValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:185:102: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | @inline(__always) private func setAccessToken(accessTokenProvider: () -> String?, request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
186 | if let accessToken = accessTokenProvider() {
187 | request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:12:56: error: cannot find type 'URLSessionWebSocketDelegate' in scope
10 |
11 | @available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
12 | public class WebsocketsTransport: NSObject, Transport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
13 | private let logger: Logger
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnectionOptions.swift:58:157: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
56 | public var maximumWebsocketMessageSize: Int?
57 |
58 | public var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |
60 | /**
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:33:23: error: cannot find 'URLRequest' in scope
31 | authenticationChallengeHandler = options.authenticationChallengeHandler
32 |
33 | var request = URLRequest(url: convertUrl(url: url))
| `- error: cannot find 'URLRequest' in scope
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:36:22: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
37 | webSocketTask = urlSession!.webSocketTask(with: request)
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:36:49: error: cannot infer contextual base in reference to member 'default'
34 | populateHeaders(headers: options.headers, request: &request)
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
| `- error: cannot infer contextual base in reference to member 'default'
37 | webSocketTask = urlSession!.webSocketTask(with: request)
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:37:37: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
35 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &request)
36 | urlSession = URLSession(configuration: .default, delegate: self, delegateQueue: OperationQueue())
37 | webSocketTask = urlSession!.webSocketTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
38 | if let maximumWebsocketMessageSize = options.maximumWebsocketMessageSize {
39 | webSocketTask?.maximumMessageSize = maximumWebsocketMessageSize
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:46:23: error: cannot find 'URLSessionWebSocketTask' in scope
44 |
45 | public func send(data: Data, sendDidComplete: @escaping (Error?) -> Void) {
46 | let message = URLSessionWebSocketTask.Message.data(data)
| `- error: cannot find 'URLSessionWebSocketTask' in scope
47 | webSocketTask?.send(message, completionHandler: sendDidComplete)
48 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:51:38: error: cannot infer contextual base in reference to member 'normalClosure'
49 |
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
52 | urlSession?.finishTasksAndInvalidate()
53 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:51:61: error: 'nil' requires a contextual type
49 |
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
52 | urlSession?.finishTasksAndInvalidate()
53 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:52:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
50 | public func close() {
51 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
52 | urlSession?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
53 | }
54 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:80:65: error: cannot infer contextual base in reference to member 'utf8'
78 | switch message {
79 | case .string(let text):
80 | delegate?.transportDidReceiveData(text.data(using: .utf8)!)
| `- error: cannot infer contextual base in reference to member 'utf8'
81 | case .data(let data):
82 | delegate?.transportDidReceiveData(data)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:113:73: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
111 | }
112 |
113 | let statusCode = (webSocketTask?.response as? HTTPURLResponse)?.statusCode ?? -1
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
114 | logger.log(logLevel: .info, message: "Error starting webSocket. Error: \(error!), HttpStatusCode: \(statusCode), WebSocket closeCode: \(webSocketTask?.closeCode.rawValue ?? -1)")
115 | delegate?.transportDidClose(error)
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:147:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
145 | } else {
146 | logger.log(logLevel: .debug, message: "(ws) no auth challenge handler registered - falling back to default handling")
147 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
148 | }
149 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:147:56: error: 'nil' requires a contextual type
145 | } else {
146 | logger.log(logLevel: .debug, message: "(ws) no auth challenge handler registered - falling back to default handling")
147 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
148 | }
149 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:162:38: error: cannot infer contextual base in reference to member 'normalClosure'
160 |
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: cannot infer contextual base in reference to member 'normalClosure'
163 | urlSession?.finishTasksAndInvalidate()
164 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:162:61: error: 'nil' requires a contextual type
160 |
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
| `- error: 'nil' requires a contextual type
163 | urlSession?.finishTasksAndInvalidate()
164 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:163:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
161 | private func shutdownTransport() {
162 | webSocketTask?.cancel(with: .normalClosure, reason: nil)
163 | urlSession?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
164 | }
165 |
[23/33] Compiling SignalRClient CodableHelpers.swift
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:13:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | class DefaultHttpClient: HttpClientProtocol {
12 | private let options: HttpConnectionOptions
13 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 |
15 | public init(options: HttpConnectionOptions) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:58:95: error: cannot find type 'URLRequest' in scope
56 | }
57 |
58 | @inline(__always) private func populateHeaders(headers: [String : String], request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
59 | headers.forEach { (key, value) in
60 | request.addValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:64:102: error: cannot find type 'URLRequest' in scope
62 | }
63 |
64 | @inline(__always) private func setAccessToken(accessTokenProvider: () -> String?, request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
65 | if let accessToken = accessTokenProvider() {
66 | request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:71:63: error: cannot find type 'URLSessionDelegate' in scope
69 | }
70 |
71 | fileprivate class DefaultHttpClientSessionDelegate: NSObject, URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
72 | static var shared = DefaultHttpClientSessionDelegate()
73 |
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:72:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
70 |
71 | fileprivate class DefaultHttpClientSessionDelegate: NSObject, URLSessionDelegate {
72 | static var shared = DefaultHttpClientSessionDelegate()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
73 |
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:74:150: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
72 | static var shared = DefaultHttpClientSessionDelegate()
73 |
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:135: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:66: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:17:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
15 | public init(options: HttpConnectionOptions) {
16 | self.options = options
17 | let sessionConfig = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
18 | sessionConfig.timeoutIntervalForRequest = options.requestTimeout
19 | DefaultHttpClientSessionDelegate.shared.authenticationChallengeHandler = options.authenticationChallengeHandler
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnectionOptions.swift:58:157: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
56 | public var maximumWebsocketMessageSize: Int?
57 |
58 | public var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |
60 | /**
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:20:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
18 | sessionConfig.timeoutIntervalForRequest = options.requestTimeout
19 | DefaultHttpClientSessionDelegate.shared.authenticationChallengeHandler = options.authenticationChallengeHandler
20 | self.session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
21 | configuration: sessionConfig,
22 | delegate: DefaultHttpClientSessionDelegate.shared,
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:23:28: error: 'nil' requires a contextual type
21 | configuration: sessionConfig,
22 | delegate: DefaultHttpClientSessionDelegate.shared,
23 | delegateQueue: nil
| `- error: 'nil' requires a contextual type
24 | )
25 | }
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:41:26: error: cannot find 'URLRequest' in scope
39 |
40 | func sendHttpRequest(url: URL, method: String, body: Data?, completionHandler: @escaping (HttpResponse?, Error?) -> Swift.Void) {
41 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
42 | urlRequest.httpMethod = method
43 | urlRequest.httpBody = body
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:47:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
45 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &urlRequest)
46 |
47 | session.dataTask(with: urlRequest, completionHandler: { (data, response, error) in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
48 |
49 | var resp:HttpResponse?
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:51:80: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
49 | var resp:HttpResponse?
50 | if error == nil {
51 | resp = HttpResponse(statusCode: (response as! HTTPURLResponse).statusCode, contents: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
52 | }
53 |
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:80:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
78 | challengeHandler(session, challenge, completionHandler)
79 | } else {
80 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
81 | }
82 | }
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:80:56: error: 'nil' requires a contextual type
78 | challengeHandler(session, challenge, completionHandler)
79 | } else {
80 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
81 | }
82 | }
[24/33] Compiling SignalRClient Connection.swift
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:13:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | class DefaultHttpClient: HttpClientProtocol {
12 | private let options: HttpConnectionOptions
13 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 |
15 | public init(options: HttpConnectionOptions) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:58:95: error: cannot find type 'URLRequest' in scope
56 | }
57 |
58 | @inline(__always) private func populateHeaders(headers: [String : String], request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
59 | headers.forEach { (key, value) in
60 | request.addValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:64:102: error: cannot find type 'URLRequest' in scope
62 | }
63 |
64 | @inline(__always) private func setAccessToken(accessTokenProvider: () -> String?, request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
65 | if let accessToken = accessTokenProvider() {
66 | request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:71:63: error: cannot find type 'URLSessionDelegate' in scope
69 | }
70 |
71 | fileprivate class DefaultHttpClientSessionDelegate: NSObject, URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
72 | static var shared = DefaultHttpClientSessionDelegate()
73 |
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:72:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
70 |
71 | fileprivate class DefaultHttpClientSessionDelegate: NSObject, URLSessionDelegate {
72 | static var shared = DefaultHttpClientSessionDelegate()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
73 |
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:74:150: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
72 | static var shared = DefaultHttpClientSessionDelegate()
73 |
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:135: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:66: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:17:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
15 | public init(options: HttpConnectionOptions) {
16 | self.options = options
17 | let sessionConfig = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
18 | sessionConfig.timeoutIntervalForRequest = options.requestTimeout
19 | DefaultHttpClientSessionDelegate.shared.authenticationChallengeHandler = options.authenticationChallengeHandler
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnectionOptions.swift:58:157: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
56 | public var maximumWebsocketMessageSize: Int?
57 |
58 | public var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |
60 | /**
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:20:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
18 | sessionConfig.timeoutIntervalForRequest = options.requestTimeout
19 | DefaultHttpClientSessionDelegate.shared.authenticationChallengeHandler = options.authenticationChallengeHandler
20 | self.session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
21 | configuration: sessionConfig,
22 | delegate: DefaultHttpClientSessionDelegate.shared,
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:23:28: error: 'nil' requires a contextual type
21 | configuration: sessionConfig,
22 | delegate: DefaultHttpClientSessionDelegate.shared,
23 | delegateQueue: nil
| `- error: 'nil' requires a contextual type
24 | )
25 | }
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:41:26: error: cannot find 'URLRequest' in scope
39 |
40 | func sendHttpRequest(url: URL, method: String, body: Data?, completionHandler: @escaping (HttpResponse?, Error?) -> Swift.Void) {
41 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
42 | urlRequest.httpMethod = method
43 | urlRequest.httpBody = body
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:47:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
45 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &urlRequest)
46 |
47 | session.dataTask(with: urlRequest, completionHandler: { (data, response, error) in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
48 |
49 | var resp:HttpResponse?
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:51:80: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
49 | var resp:HttpResponse?
50 | if error == nil {
51 | resp = HttpResponse(statusCode: (response as! HTTPURLResponse).statusCode, contents: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
52 | }
53 |
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:80:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
78 | challengeHandler(session, challenge, completionHandler)
79 | } else {
80 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
81 | }
82 | }
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:80:56: error: 'nil' requires a contextual type
78 | challengeHandler(session, challenge, completionHandler)
79 | } else {
80 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
81 | }
82 | }
[25/33] Compiling SignalRClient ConnectionDelegate.swift
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:13:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | class DefaultHttpClient: HttpClientProtocol {
12 | private let options: HttpConnectionOptions
13 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 |
15 | public init(options: HttpConnectionOptions) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:58:95: error: cannot find type 'URLRequest' in scope
56 | }
57 |
58 | @inline(__always) private func populateHeaders(headers: [String : String], request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
59 | headers.forEach { (key, value) in
60 | request.addValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:64:102: error: cannot find type 'URLRequest' in scope
62 | }
63 |
64 | @inline(__always) private func setAccessToken(accessTokenProvider: () -> String?, request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
65 | if let accessToken = accessTokenProvider() {
66 | request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:71:63: error: cannot find type 'URLSessionDelegate' in scope
69 | }
70 |
71 | fileprivate class DefaultHttpClientSessionDelegate: NSObject, URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
72 | static var shared = DefaultHttpClientSessionDelegate()
73 |
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:72:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
70 |
71 | fileprivate class DefaultHttpClientSessionDelegate: NSObject, URLSessionDelegate {
72 | static var shared = DefaultHttpClientSessionDelegate()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
73 |
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:74:150: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
72 | static var shared = DefaultHttpClientSessionDelegate()
73 |
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:135: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:66: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:17:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
15 | public init(options: HttpConnectionOptions) {
16 | self.options = options
17 | let sessionConfig = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
18 | sessionConfig.timeoutIntervalForRequest = options.requestTimeout
19 | DefaultHttpClientSessionDelegate.shared.authenticationChallengeHandler = options.authenticationChallengeHandler
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnectionOptions.swift:58:157: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
56 | public var maximumWebsocketMessageSize: Int?
57 |
58 | public var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |
60 | /**
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:20:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
18 | sessionConfig.timeoutIntervalForRequest = options.requestTimeout
19 | DefaultHttpClientSessionDelegate.shared.authenticationChallengeHandler = options.authenticationChallengeHandler
20 | self.session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
21 | configuration: sessionConfig,
22 | delegate: DefaultHttpClientSessionDelegate.shared,
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:23:28: error: 'nil' requires a contextual type
21 | configuration: sessionConfig,
22 | delegate: DefaultHttpClientSessionDelegate.shared,
23 | delegateQueue: nil
| `- error: 'nil' requires a contextual type
24 | )
25 | }
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:41:26: error: cannot find 'URLRequest' in scope
39 |
40 | func sendHttpRequest(url: URL, method: String, body: Data?, completionHandler: @escaping (HttpResponse?, Error?) -> Swift.Void) {
41 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
42 | urlRequest.httpMethod = method
43 | urlRequest.httpBody = body
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:47:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
45 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &urlRequest)
46 |
47 | session.dataTask(with: urlRequest, completionHandler: { (data, response, error) in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
48 |
49 | var resp:HttpResponse?
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:51:80: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
49 | var resp:HttpResponse?
50 | if error == nil {
51 | resp = HttpResponse(statusCode: (response as! HTTPURLResponse).statusCode, contents: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
52 | }
53 |
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:80:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
78 | challengeHandler(session, challenge, completionHandler)
79 | } else {
80 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
81 | }
82 | }
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:80:56: error: 'nil' requires a contextual type
78 | challengeHandler(session, challenge, completionHandler)
79 | } else {
80 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
81 | }
82 | }
[26/33] Compiling SignalRClient DefaultHttpClient.swift
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:13:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 | class DefaultHttpClient: HttpClientProtocol {
12 | private let options: HttpConnectionOptions
13 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 |
15 | public init(options: HttpConnectionOptions) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:58:95: error: cannot find type 'URLRequest' in scope
56 | }
57 |
58 | @inline(__always) private func populateHeaders(headers: [String : String], request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
59 | headers.forEach { (key, value) in
60 | request.addValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:64:102: error: cannot find type 'URLRequest' in scope
62 | }
63 |
64 | @inline(__always) private func setAccessToken(accessTokenProvider: () -> String?, request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
65 | if let accessToken = accessTokenProvider() {
66 | request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:71:63: error: cannot find type 'URLSessionDelegate' in scope
69 | }
70 |
71 | fileprivate class DefaultHttpClientSessionDelegate: NSObject, URLSessionDelegate {
| `- error: cannot find type 'URLSessionDelegate' in scope
72 | static var shared = DefaultHttpClientSessionDelegate()
73 |
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:72:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
70 |
71 | fileprivate class DefaultHttpClientSessionDelegate: NSObject, URLSessionDelegate {
72 | static var shared = DefaultHttpClientSessionDelegate()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'shared' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
73 |
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:74:150: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
72 | static var shared = DefaultHttpClientSessionDelegate()
73 |
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:135: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:76:66: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 | var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
75 |
76 | func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
| `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | if let challengeHandler = authenticationChallengeHandler {
78 | challengeHandler(session, challenge, completionHandler)
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
| `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:17:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
15 | public init(options: HttpConnectionOptions) {
16 | self.options = options
17 | let sessionConfig = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
18 | sessionConfig.timeoutIntervalForRequest = options.requestTimeout
19 | DefaultHttpClientSessionDelegate.shared.authenticationChallengeHandler = options.authenticationChallengeHandler
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnectionOptions.swift:58:157: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
56 | public var maximumWebsocketMessageSize: Int?
57 |
58 | public var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |
60 | /**
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:20:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
18 | sessionConfig.timeoutIntervalForRequest = options.requestTimeout
19 | DefaultHttpClientSessionDelegate.shared.authenticationChallengeHandler = options.authenticationChallengeHandler
20 | self.session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
21 | configuration: sessionConfig,
22 | delegate: DefaultHttpClientSessionDelegate.shared,
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:23:28: error: 'nil' requires a contextual type
21 | configuration: sessionConfig,
22 | delegate: DefaultHttpClientSessionDelegate.shared,
23 | delegateQueue: nil
| `- error: 'nil' requires a contextual type
24 | )
25 | }
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:41:26: error: cannot find 'URLRequest' in scope
39 |
40 | func sendHttpRequest(url: URL, method: String, body: Data?, completionHandler: @escaping (HttpResponse?, Error?) -> Swift.Void) {
41 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
42 | urlRequest.httpMethod = method
43 | urlRequest.httpBody = body
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:47:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
45 | setAccessToken(accessTokenProvider: options.accessTokenProvider, request: &urlRequest)
46 |
47 | session.dataTask(with: urlRequest, completionHandler: { (data, response, error) in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
48 |
49 | var resp:HttpResponse?
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:51:80: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
49 | var resp:HttpResponse?
50 | if error == nil {
51 | resp = HttpResponse(statusCode: (response as! HTTPURLResponse).statusCode, contents: data)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
52 | }
53 |
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:80:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
78 | challengeHandler(session, challenge, completionHandler)
79 | } else {
80 | completionHandler(.performDefaultHandling, nil)
| `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
81 | }
82 | }
/host/spi-builder-workspace/Sources/SignalRClient/DefaultHttpClient.swift:80:56: error: 'nil' requires a contextual type
78 | challengeHandler(session, challenge, completionHandler)
79 | } else {
80 | completionHandler(.performDefaultHandling, nil)
| `- error: 'nil' requires a contextual type
81 | }
82 | }
[27/33] Compiling SignalRClient StreamHandle.swift
[28/33] Compiling SignalRClient TransferFormat.swift
[29/33] Compiling SignalRClient Transport.swift
[30/33] Compiling SignalRClient DefaultTransportFactory.swift
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:20:23: warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
| |- warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'webSockets' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:18:23: warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
16 | }
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
| |- warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'longPolling' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:22:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | }
24 |
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:187:13: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
185 | logger.log(logLevel: .debug, message: "Invoking connectionDidFailToOpen")
186 | options.callbackQueue.async {
187 | self.delegate?.connectionDidFailToOpen(error: error)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
188 | }
189 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:198:17: warning: capture of 'sendDidComplete' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
196 | // Never synchronously respond to avoid upstream deadlocks based on async assumptions
197 | options.callbackQueue.async {
198 | sendDidComplete(SignalRError.invalidState)
| |- warning: capture of 'sendDidComplete' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
199 | }
200 | return
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:230:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
228 | logger.log(logLevel: .debug, message: "Invoking connectionDidClose (\(#function): \(#line))")
229 | options.callbackQueue.async {
230 | self.delegate?.connectionDidClose(error: stopError)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
231 | }
232 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:246:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
244 | self.connectionId = connectionId
245 | options.callbackQueue.async {
246 | self.delegate?.connectionDidOpen(connection: self)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
247 | }
248 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:256:13: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
254 | logger.log(logLevel: .debug, message: "Received data from transport")
255 | options.callbackQueue.async {
256 | self.delegate?.connectionDidReceiveData(connection: self, data: data)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
257 | }
258 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:273:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
271 | logger.log(logLevel: .debug, message: "Invoking connectionDidFailToOpen")
272 | options.callbackQueue.async {
273 | self.delegate?.connectionDidFailToOpen(error: self.stopError ?? error!)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
274 | }
275 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:281:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
279 |
280 | options.callbackQueue.async {
281 | self.delegate?.connectionDidClose(error: self.stopError ?? error)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
282 | }
283 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:16:32: error: cannot find type 'URLSessionWebSocketTask' in scope
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
18 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:17:158: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |
19 | private var isTransportClosed = false
[31/33] Compiling SignalRClient HandshakeProtocol.swift
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:20:23: warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
| |- warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'webSockets' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:18:23: warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
16 | }
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
| |- warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'longPolling' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:22:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | }
24 |
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:187:13: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
185 | logger.log(logLevel: .debug, message: "Invoking connectionDidFailToOpen")
186 | options.callbackQueue.async {
187 | self.delegate?.connectionDidFailToOpen(error: error)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
188 | }
189 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:198:17: warning: capture of 'sendDidComplete' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
196 | // Never synchronously respond to avoid upstream deadlocks based on async assumptions
197 | options.callbackQueue.async {
198 | sendDidComplete(SignalRError.invalidState)
| |- warning: capture of 'sendDidComplete' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
199 | }
200 | return
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:230:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
228 | logger.log(logLevel: .debug, message: "Invoking connectionDidClose (\(#function): \(#line))")
229 | options.callbackQueue.async {
230 | self.delegate?.connectionDidClose(error: stopError)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
231 | }
232 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:246:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
244 | self.connectionId = connectionId
245 | options.callbackQueue.async {
246 | self.delegate?.connectionDidOpen(connection: self)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
247 | }
248 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:256:13: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
254 | logger.log(logLevel: .debug, message: "Received data from transport")
255 | options.callbackQueue.async {
256 | self.delegate?.connectionDidReceiveData(connection: self, data: data)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
257 | }
258 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:273:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
271 | logger.log(logLevel: .debug, message: "Invoking connectionDidFailToOpen")
272 | options.callbackQueue.async {
273 | self.delegate?.connectionDidFailToOpen(error: self.stopError ?? error!)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
274 | }
275 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:281:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
279 |
280 | options.callbackQueue.async {
281 | self.delegate?.connectionDidClose(error: self.stopError ?? error)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
282 | }
283 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:16:32: error: cannot find type 'URLSessionWebSocketTask' in scope
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
18 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:17:158: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |
19 | private var isTransportClosed = false
[32/33] Compiling SignalRClient HttpClientProtocol.swift
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:20:23: warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
| |- warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'webSockets' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:18:23: warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
16 | }
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
| |- warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'longPolling' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:22:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | }
24 |
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:187:13: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
185 | logger.log(logLevel: .debug, message: "Invoking connectionDidFailToOpen")
186 | options.callbackQueue.async {
187 | self.delegate?.connectionDidFailToOpen(error: error)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
188 | }
189 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:198:17: warning: capture of 'sendDidComplete' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
196 | // Never synchronously respond to avoid upstream deadlocks based on async assumptions
197 | options.callbackQueue.async {
198 | sendDidComplete(SignalRError.invalidState)
| |- warning: capture of 'sendDidComplete' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
199 | }
200 | return
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:230:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
228 | logger.log(logLevel: .debug, message: "Invoking connectionDidClose (\(#function): \(#line))")
229 | options.callbackQueue.async {
230 | self.delegate?.connectionDidClose(error: stopError)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
231 | }
232 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:246:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
244 | self.connectionId = connectionId
245 | options.callbackQueue.async {
246 | self.delegate?.connectionDidOpen(connection: self)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
247 | }
248 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:256:13: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
254 | logger.log(logLevel: .debug, message: "Received data from transport")
255 | options.callbackQueue.async {
256 | self.delegate?.connectionDidReceiveData(connection: self, data: data)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
257 | }
258 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:273:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
271 | logger.log(logLevel: .debug, message: "Invoking connectionDidFailToOpen")
272 | options.callbackQueue.async {
273 | self.delegate?.connectionDidFailToOpen(error: self.stopError ?? error!)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
274 | }
275 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:281:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
279 |
280 | options.callbackQueue.async {
281 | self.delegate?.connectionDidClose(error: self.stopError ?? error)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
282 | }
283 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:16:32: error: cannot find type 'URLSessionWebSocketTask' in scope
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
18 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:17:158: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |
19 | private var isTransportClosed = false
[33/33] Compiling SignalRClient HttpConnection.swift
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:20:23: warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
| |- warning: static property 'webSockets' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'webSockets' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:18:23: warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
16 | }
17 |
18 | public static let longPolling = TransportType(rawValue: 1 << 0)
| |- warning: static property 'longPolling' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'longPolling' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | static let serverSentEvents = TransportType(rawValue: 1 << 1) // Not supported
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
/host/spi-builder-workspace/Sources/SignalRClient/TransportType.swift:22:23: warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public struct TransportType: OptionSet {
| `- note: consider making struct 'TransportType' conform to the 'Sendable' protocol
12 | public let rawValue: Int
13 |
:
20 | public static let webSockets = TransportType(rawValue: 1 << 2)
21 |
22 | public static let all: TransportType = [ .longPolling, .webSockets ]
| |- warning: static property 'all' is not concurrency-safe because non-'Sendable' type 'TransportType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'all' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
23 | }
24 |
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:187:13: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
185 | logger.log(logLevel: .debug, message: "Invoking connectionDidFailToOpen")
186 | options.callbackQueue.async {
187 | self.delegate?.connectionDidFailToOpen(error: error)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
188 | }
189 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:198:17: warning: capture of 'sendDidComplete' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
196 | // Never synchronously respond to avoid upstream deadlocks based on async assumptions
197 | options.callbackQueue.async {
198 | sendDidComplete(SignalRError.invalidState)
| |- warning: capture of 'sendDidComplete' with non-sendable type '((any Error)?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
199 | }
200 | return
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:230:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
228 | logger.log(logLevel: .debug, message: "Invoking connectionDidClose (\(#function): \(#line))")
229 | options.callbackQueue.async {
230 | self.delegate?.connectionDidClose(error: stopError)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
231 | }
232 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:246:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
244 | self.connectionId = connectionId
245 | options.callbackQueue.async {
246 | self.delegate?.connectionDidOpen(connection: self)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
247 | }
248 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:256:13: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
254 | logger.log(logLevel: .debug, message: "Received data from transport")
255 | options.callbackQueue.async {
256 | self.delegate?.connectionDidReceiveData(connection: self, data: data)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
257 | }
258 | }
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:273:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
271 | logger.log(logLevel: .debug, message: "Invoking connectionDidFailToOpen")
272 | options.callbackQueue.async {
273 | self.delegate?.connectionDidFailToOpen(error: self.stopError ?? error!)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
274 | }
275 | } else {
/host/spi-builder-workspace/Sources/SignalRClient/HttpConnection.swift:281:17: warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
9 | import Foundation
10 |
11 | public class HttpConnection: Connection {
| `- note: class 'HttpConnection' does not conform to the 'Sendable' protocol
12 | private let connectionQueue: DispatchQueue
13 | private let startDispatchGroup: DispatchGroup
:
279 |
280 | options.callbackQueue.async {
281 | self.delegate?.connectionDidClose(error: self.stopError ?? error)
| `- warning: capture of 'self' with non-sendable type 'HttpConnection' in a `@Sendable` closure; this is an error in the Swift 6 language mode
282 | }
283 | }
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:16:32: error: cannot find type 'URLSessionWebSocketTask' in scope
14 | private let dispatchQueue = DispatchQueue(label: "SignalR.webSocketTransport.queue")
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
18 |
/host/spi-builder-workspace/Sources/SignalRClient/WebsocketsTransport.swift:17:158: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
15 | private var urlSession: URLSession?
16 | private var webSocketTask: URLSessionWebSocketTask?
17 | private var authenticationChallengeHandler: ((_ session: URLSession, _ challenge: URLAuthenticationChallenge, _ completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)?
| `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
18 |
19 | private var isTransportClosed = false
BUILD FAILURE 6.0 linux