Build Information
Failed to build SwiftPhoenixClient, reference master (25a4d8), with Swift 6.1 for Wasm on 30 May 2025 05:30:06 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1Build Log
46 |
47 | /// Default encode function, utilizing JSONSerialization.data
48 | public static let encode: (Any) -> Data = { json in
| |- warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'encode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | return try! JSONSerialization
50 | .data(withJSONObject: json,
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:55:21: warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode
53 |
54 | /// Default decode function, utilizing JSONSerialization.jsonObject
55 | public static let decode: (Data) -> Any? = { data in
| |- warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'decode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
56 | guard
57 | let json = try? JSONSerialization
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:64:37: error: cannot find type 'DispatchQueue' in scope
62 | }
63 |
64 | public static let heartbeatQueue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
65 | = DispatchQueue(label: "com.phoenix.socket.heartbeat")
66 | }
[7/14] Compiling SwiftPhoenixClient Defaults.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:55:17: error: cannot find type 'DispatchWorkItem' in scope
53 |
54 | /// The work to be done when the queue fires
55 | var workItem: DispatchWorkItem? = nil
| `- error: cannot find type 'DispatchWorkItem' in scope
56 |
57 | /// The number of times the underlyingTimer hass been set off.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:33:38: error: cannot find type 'DispatchTimeInterval' in scope
31 |
32 | /// Default maximum amount of time which the system may delay heartbeat events in order to minimize power usage
33 | public static let heartbeatLeeway: DispatchTimeInterval = .milliseconds(10)
| `- error: cannot find type 'DispatchTimeInterval' in scope
34 |
35 | /// Default reconnect algorithm for the socket
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:36:21: warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
34 |
35 | /// Default reconnect algorithm for the socket
36 | public static let reconnectSteppedBackOff: (Int) -> TimeInterval = { tries in
| |- warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'reconnectSteppedBackOff' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
37 | return tries > 9 ? 5.0 : [0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.5, 1.0, 2.0][tries - 1]
38 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:41:21: warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
39 |
40 | /** Default rejoin algorithm for individual channels */
41 | public static let rejoinSteppedBackOff: (Int) -> TimeInterval = { tries in
| |- warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'rejoinSteppedBackOff' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
42 | return tries > 3 ? 10 : [1, 2, 5][tries - 1]
43 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:48:21: warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
46 |
47 | /// Default encode function, utilizing JSONSerialization.data
48 | public static let encode: (Any) -> Data = { json in
| |- warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'encode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | return try! JSONSerialization
50 | .data(withJSONObject: json,
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:55:21: warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode
53 |
54 | /// Default decode function, utilizing JSONSerialization.jsonObject
55 | public static let decode: (Data) -> Any? = { data in
| |- warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'decode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
56 | guard
57 | let json = try? JSONSerialization
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:64:37: error: cannot find type 'DispatchQueue' in scope
62 | }
63 |
64 | public static let heartbeatQueue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
65 | = DispatchQueue(label: "com.phoenix.socket.heartbeat")
66 | }
[8/14] Compiling SwiftPhoenixClient Push.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Push.swift:47:24: error: cannot find type 'DispatchWorkItem' in scope
45 |
46 | /// WorkItem to be performed when the timeout timer fires
47 | var timeoutWorkItem: DispatchWorkItem?
| `- error: cannot find type 'DispatchWorkItem' in scope
48 |
49 | /// Hooks into a Push. Where .receive("ok", callback(Payload)) are stored
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Push.swift:242:20: error: cannot find 'DispatchWorkItem' in scope
240 |
241 | /// Setup and start the Timeout timer.
242 | let workItem = DispatchWorkItem {
| `- error: cannot find 'DispatchWorkItem' in scope
243 | self.trigger("timeout", payload: [:])
244 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:106:51: error: cannot find type 'DispatchWorkItem' in scope
104 | static var main = TimerQueue()
105 |
106 | func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
| `- error: cannot find type 'DispatchWorkItem' in scope
107 | // TimeInterval is always in seconds. Multiply it by 1000 to convert
108 | // to milliseconds and round to the nearest millisecond.
[9/14] Compiling SwiftPhoenixClient Socket.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:39:67: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | /// Struct that gathers callbacks assigned to the Socket
38 | struct StateChangeCallbacks {
39 | let open: SynchronizedArray<(ref: String, callback: Delegated<URLResponse?, Void>)> = .init()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | let close: SynchronizedArray<(ref: String, callback: Delegated<(Int, String?), Void>)> = .init()
41 | let error: SynchronizedArray<(ref: String, callback: Delegated<(Error, URLResponse?), Void>)> = .init()
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:41:76: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | let open: SynchronizedArray<(ref: String, callback: Delegated<URLResponse?, Void>)> = .init()
40 | let close: SynchronizedArray<(ref: String, callback: Delegated<(Int, String?), Void>)> = .init()
41 | let error: SynchronizedArray<(ref: String, callback: Delegated<(Error, URLResponse?), Void>)> = .init()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | let message: SynchronizedArray<(ref: String, callback: Delegated<Message, Void>)> = .init()
43 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:108:31: error: cannot find type 'DispatchTimeInterval' in scope
106 |
107 | /// The maximum amount of time which the system may delay heartbeats in order to optimize power usage
108 | public var heartbeatLeeway: DispatchTimeInterval = Defaults.heartbeatLeeway
| `- error: cannot find type 'DispatchTimeInterval' in scope
109 |
110 | /// Interval between socket reconnect attempts, in seconds
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:135:39: error: cannot find type 'SSLCipherSuite' in scope
133 | /// allowed cipher suites supported by your server. This must be
134 | /// set before calling `socket.connect()` in order to apply.
135 | public var enabledSSLCipherSuites: [SSLCipherSuite]?
| `- error: cannot find type 'SSLCipherSuite' in scope
136 | #endif
137 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:341:43: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
339 | /// - parameter callback: Called when the Socket is opened
340 | @discardableResult
341 | public func onOpen(callback: @escaping (URLResponse?) -> Void) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
342 | var delegated = Delegated<URLResponse?, Void>()
343 | delegated.manuallyDelegate(with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:378:69: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
376 | @discardableResult
377 | public func delegateOnOpen<T: AnyObject>(to owner: T,
378 | callback: @escaping ((T, URLResponse?) -> Void)) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
379 | var delegated = Delegated<URLResponse?, Void>()
380 | delegated.delegate(to: owner, with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:466:52: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
464 | /// - parameter callback: Called when the Socket errors
465 | @discardableResult
466 | public func onError(callback: @escaping ((Error, URLResponse?)) -> Void) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
467 | var delegated = Delegated<(Error, URLResponse?), Void>()
468 | delegated.manuallyDelegate(with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:486:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
484 | @discardableResult
485 | public func delegateOnError<T: AnyObject>(to owner: T,
486 | callback: @escaping ((T, (Error, URLResponse?)) -> Void)) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
487 | var delegated = Delegated<(Error, URLResponse?), Void>()
488 | delegated.delegate(to: owner, with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:652:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
650 | //----------------------------------------------------------------------
651 | /// Called when the underlying Websocket connects to it's host
652 | internal func onConnectionOpen(response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
653 | self.logItems("transport", "Connected to \(endPoint)")
654 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:689:61: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
687 | }
688 |
689 | internal func onConnectionError(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
690 | self.logItems("transport", error, response ?? "")
691 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:812:4: error: Objective-C interoperability is disabled
810 |
811 | /// Sends a heartbeat payload to the phoenix servers
812 | @objc func sendHeartbeat() {
| `- error: Objective-C interoperability is disabled
813 | // Do not send if the connection is closed
814 | guard isConnected else { return }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:858:32: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
856 | // MARK: - TransportDelegate
857 | //----------------------------------------------------------------------
858 | public func onOpen(response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
859 | self.onConnectionOpen(response: response)
860 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:862:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
860 | }
861 |
862 | public func onError(error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
863 | self.onConnectionError(error, response: response)
864 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:67: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:55:17: error: cannot find type 'DispatchWorkItem' in scope
53 |
54 | /// The work to be done when the queue fires
55 | var workItem: DispatchWorkItem? = nil
| `- error: cannot find type 'DispatchWorkItem' in scope
56 |
57 | /// The number of times the underlyingTimer hass been set off.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:342:31: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
340 | @discardableResult
341 | public func onOpen(callback: @escaping (URLResponse?) -> Void) -> String {
342 | var delegated = Delegated<URLResponse?, Void>()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
343 | delegated.manuallyDelegate(with: callback)
344 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:379:31: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
377 | public func delegateOnOpen<T: AnyObject>(to owner: T,
378 | callback: @escaping ((T, URLResponse?) -> Void)) -> String {
379 | var delegated = Delegated<URLResponse?, Void>()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
380 | delegated.delegate(to: owner, with: callback)
381 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:467:39: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
465 | @discardableResult
466 | public func onError(callback: @escaping ((Error, URLResponse?)) -> Void) -> String {
467 | var delegated = Delegated<(Error, URLResponse?), Void>()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
468 | delegated.manuallyDelegate(with: callback)
469 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:487:39: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 | public func delegateOnError<T: AnyObject>(to owner: T,
486 | callback: @escaping ((T, (Error, URLResponse?)) -> Void)) -> String {
487 | var delegated = Delegated<(Error, URLResponse?), Void>()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
488 | delegated.delegate(to: owner, with: callback)
489 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:43: error: cannot find type 'DispatchQueue' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchQueue' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:92: error: cannot find type 'DispatchTimeInterval' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchTimeInterval' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:805:83: error: extra argument 'leeway' in call
803 | guard !skipHeartbeat else { return }
804 |
805 | self.heartbeatTimer = HeartbeatTimer(timeInterval: heartbeatInterval, leeway: heartbeatLeeway)
| `- error: extra argument 'leeway' in call
806 | self.heartbeatTimer?.start(eventHandler: { [weak self] in
807 | self?.sendHeartbeat()
error: emit-module command failed with exit code 1 (use -v to see invocation)
[10/14] Compiling SwiftPhoenixClient Presence.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Presence.swift:111:23: warning: static property 'defaults' is not concurrency-safe because non-'Sendable' type 'Presence.Options' may have shared mutable state; this is an error in the Swift 6 language mode
104 | /// let options = Options(events: [.state: "my_state", .diff: "my_diff"])
105 | /// let presence = Presence(channel, opts: options)
106 | public struct Options {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
107 | let events: [Events: String]
108 |
109 | /// Default set of Options used when creating Presence. Uses the
110 | /// phoenix events "presence_state" and "presence_diff"
111 | static public let defaults
| |- warning: static property 'defaults' is not concurrency-safe because non-'Sendable' type 'Presence.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
112 | = Options(events: [.state: "presence_state",
113 | .diff: "presence_diff"])
[11/14] Emitting module SwiftPhoenixClient
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:33:38: error: cannot find type 'DispatchTimeInterval' in scope
31 |
32 | /// Default maximum amount of time which the system may delay heartbeat events in order to minimize power usage
33 | public static let heartbeatLeeway: DispatchTimeInterval = .milliseconds(10)
| `- error: cannot find type 'DispatchTimeInterval' in scope
34 |
35 | /// Default reconnect algorithm for the socket
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:36:21: warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
34 |
35 | /// Default reconnect algorithm for the socket
36 | public static let reconnectSteppedBackOff: (Int) -> TimeInterval = { tries in
| |- warning: static property 'reconnectSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'reconnectSteppedBackOff' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
37 | return tries > 9 ? 5.0 : [0.01, 0.05, 0.1, 0.15, 0.2, 0.25, 0.5, 1.0, 2.0][tries - 1]
38 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:41:21: warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
39 |
40 | /** Default rejoin algorithm for individual channels */
41 | public static let rejoinSteppedBackOff: (Int) -> TimeInterval = { tries in
| |- warning: static property 'rejoinSteppedBackOff' is not concurrency-safe because non-'Sendable' type '(Int) -> TimeInterval' (aka '(Int) -> Double') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'rejoinSteppedBackOff' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
42 | return tries > 3 ? 10 : [1, 2, 5][tries - 1]
43 | }
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:48:21: warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
46 |
47 | /// Default encode function, utilizing JSONSerialization.data
48 | public static let encode: (Any) -> Data = { json in
| |- warning: static property 'encode' is not concurrency-safe because non-'Sendable' type '(Any) -> Data' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'encode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
49 | return try! JSONSerialization
50 | .data(withJSONObject: json,
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:55:21: warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode
53 |
54 | /// Default decode function, utilizing JSONSerialization.jsonObject
55 | public static let decode: (Data) -> Any? = { data in
| |- warning: static property 'decode' is not concurrency-safe because non-'Sendable' type '(Data) -> Any?' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'decode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
56 | guard
57 | let json = try? JSONSerialization
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:64:37: error: cannot find type 'DispatchQueue' in scope
62 | }
63 |
64 | public static let heartbeatQueue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
65 | = DispatchQueue(label: "com.phoenix.socket.heartbeat")
66 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:41:15: error: cannot find type 'DispatchTimeInterval' in scope
39 |
40 | /// The maximum amount of time which the system may delay the delivery of the timer events
41 | let leeway: DispatchTimeInterval
| `- error: cannot find type 'DispatchTimeInterval' in scope
42 |
43 | // The DispatchQueue to schedule the timers on
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:44:14: error: cannot find type 'DispatchQueue' in scope
42 |
43 | // The DispatchQueue to schedule the timers on
44 | let queue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
45 |
46 | // UUID which specifies the Timer instance. Verifies that timers are different
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:53:31: error: cannot find type 'DispatchSourceTimer' in scope
51 | //----------------------------------------------------------------------
52 | // The underlying, cancelable, resettable, timer.
53 | private var temporaryTimer: DispatchSourceTimer? = nil
| `- error: cannot find type 'DispatchSourceTimer' in scope
54 | // The event handler that is called by the timer when it fires.
55 | private var temporaryEventHandler: (() -> Void)? = nil
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:43: error: cannot find type 'DispatchQueue' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchQueue' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:92: error: cannot find type 'DispatchTimeInterval' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchTimeInterval' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:78:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | - Parameter response: Response from the server indicating that the WebSocket handshake was successful and the connection has been upgraded to webSockets
77 | */
78 | func onOpen(response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 |
80 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:87:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 |
86 | */
87 | func onError(error: Error, response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
88 |
89 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:147:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 |
146 | /// The URLSession configuration
147 | internal let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:150:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
150 | private var session: URLSession? = nil
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |
152 | /// The ongoing task. Assigned during `connect()`
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/SwiftPhoenixClient/PhoenixTransport.swift:153:21: error: cannot find type 'URLSessionWebSocketTask' in scope
151 |
152 | /// The ongoing task. Assigned during `connect()`
153 | private var task: URLSessionWebSocketTask? = nil
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
154 |
155 | /// Holds the current receive task
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:40: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:67: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:255:39: error: cannot find type 'URLSessionWebSocketTask' in scope
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
255 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
256 | didOpenWithProtocol protocol: String?) {
257 | // The Websocket is connected. Set Transport state to open and inform delegate
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:254:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
252 |
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | webSocketTask: URLSessionWebSocketTask,
256 | didOpenWithProtocol protocol: String?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:266:39: error: cannot find type 'URLSessionWebSocketTask' in scope
264 |
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
268 | reason: Data?) {
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:267:48: error: cannot find type 'URLSessionWebSocketTask' in scope
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
268 | reason: Data?) {
269 | // A close frame was received from the server.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:265:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 | }
264 |
265 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
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/SwiftPhoenixClient/PhoenixTransport.swift:274:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | }
273 |
274 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
275 | task: URLSessionTask,
276 | didCompleteWithError error: Error?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:275:30: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
273 |
274 | open func urlSession(_ session: URLSession,
275 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
276 | didCompleteWithError error: Error?) {
277 | // The task has terminated. Inform the delegate that the transport has closed abnormally
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/SwiftPhoenixClient/PhoenixTransport.swift:311:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
309 | }
310 |
311 | private func abnormalErrorReceived(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 | // Set the state of the Transport to closed
313 | self.readyState = .closed
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:140:61: error: cannot find type 'URLSessionWebSocketDelegate' in scope
138 | */
139 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
140 | open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
141 |
142 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Presence.swift:111:23: warning: static property 'defaults' is not concurrency-safe because non-'Sendable' type 'Presence.Options' may have shared mutable state; this is an error in the Swift 6 language mode
104 | /// let options = Options(events: [.state: "my_state", .diff: "my_diff"])
105 | /// let presence = Presence(channel, opts: options)
106 | public struct Options {
| `- note: consider making struct 'Options' conform to the 'Sendable' protocol
107 | let events: [Events: String]
108 |
109 | /// Default set of Options used when creating Presence. Uses the
110 | /// phoenix events "presence_state" and "presence_diff"
111 | static public let defaults
| |- warning: static property 'defaults' is not concurrency-safe because non-'Sendable' type 'Presence.Options' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
112 | = Options(events: [.state: "presence_state",
113 | .diff: "presence_diff"])
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Push.swift:47:24: error: cannot find type 'DispatchWorkItem' in scope
45 |
46 | /// WorkItem to be performed when the timeout timer fires
47 | var timeoutWorkItem: DispatchWorkItem?
| `- error: cannot find type 'DispatchWorkItem' in scope
48 |
49 | /// Hooks into a Push. Where .receive("ok", callback(Payload)) are stored
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:39:67: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | /// Struct that gathers callbacks assigned to the Socket
38 | struct StateChangeCallbacks {
39 | let open: SynchronizedArray<(ref: String, callback: Delegated<URLResponse?, Void>)> = .init()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | let close: SynchronizedArray<(ref: String, callback: Delegated<(Int, String?), Void>)> = .init()
41 | let error: SynchronizedArray<(ref: String, callback: Delegated<(Error, URLResponse?), Void>)> = .init()
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:41:76: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | let open: SynchronizedArray<(ref: String, callback: Delegated<URLResponse?, Void>)> = .init()
40 | let close: SynchronizedArray<(ref: String, callback: Delegated<(Int, String?), Void>)> = .init()
41 | let error: SynchronizedArray<(ref: String, callback: Delegated<(Error, URLResponse?), Void>)> = .init()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | let message: SynchronizedArray<(ref: String, callback: Delegated<Message, Void>)> = .init()
43 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:108:31: error: cannot find type 'DispatchTimeInterval' in scope
106 |
107 | /// The maximum amount of time which the system may delay heartbeats in order to optimize power usage
108 | public var heartbeatLeeway: DispatchTimeInterval = Defaults.heartbeatLeeway
| `- error: cannot find type 'DispatchTimeInterval' in scope
109 |
110 | /// Interval between socket reconnect attempts, in seconds
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:135:39: error: cannot find type 'SSLCipherSuite' in scope
133 | /// allowed cipher suites supported by your server. This must be
134 | /// set before calling `socket.connect()` in order to apply.
135 | public var enabledSSLCipherSuites: [SSLCipherSuite]?
| `- error: cannot find type 'SSLCipherSuite' in scope
136 | #endif
137 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:341:43: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
339 | /// - parameter callback: Called when the Socket is opened
340 | @discardableResult
341 | public func onOpen(callback: @escaping (URLResponse?) -> Void) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
342 | var delegated = Delegated<URLResponse?, Void>()
343 | delegated.manuallyDelegate(with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:378:69: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
376 | @discardableResult
377 | public func delegateOnOpen<T: AnyObject>(to owner: T,
378 | callback: @escaping ((T, URLResponse?) -> Void)) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
379 | var delegated = Delegated<URLResponse?, Void>()
380 | delegated.delegate(to: owner, with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:466:52: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
464 | /// - parameter callback: Called when the Socket errors
465 | @discardableResult
466 | public func onError(callback: @escaping ((Error, URLResponse?)) -> Void) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
467 | var delegated = Delegated<(Error, URLResponse?), Void>()
468 | delegated.manuallyDelegate(with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:486:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
484 | @discardableResult
485 | public func delegateOnError<T: AnyObject>(to owner: T,
486 | callback: @escaping ((T, (Error, URLResponse?)) -> Void)) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
487 | var delegated = Delegated<(Error, URLResponse?), Void>()
488 | delegated.delegate(to: owner, with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:652:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
650 | //----------------------------------------------------------------------
651 | /// Called when the underlying Websocket connects to it's host
652 | internal func onConnectionOpen(response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
653 | self.logItems("transport", "Connected to \(endPoint)")
654 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:689:61: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
687 | }
688 |
689 | internal func onConnectionError(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
690 | self.logItems("transport", error, response ?? "")
691 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:812:4: error: Objective-C interoperability is disabled
810 |
811 | /// Sends a heartbeat payload to the phoenix servers
812 | @objc func sendHeartbeat() {
| `- error: Objective-C interoperability is disabled
813 | // Do not send if the connection is closed
814 | guard isConnected else { return }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:858:32: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
856 | // MARK: - TransportDelegate
857 | //----------------------------------------------------------------------
858 | public func onOpen(response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
859 | self.onConnectionOpen(response: response)
860 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:862:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
860 | }
861 |
862 | public func onError(error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
863 | self.onConnectionError(error, response: response)
864 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:13:29: error: cannot find 'DispatchQueue' in scope
11 | /// A thread-safe array.
12 | public class SynchronizedArray<Element> {
13 | fileprivate let queue = DispatchQueue(label: "spc_sync_array", attributes: .concurrent)
| `- error: cannot find 'DispatchQueue' in scope
14 | fileprivate var array: [Element]
15 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:13:81: error: cannot infer contextual base in reference to member 'concurrent'
11 | /// A thread-safe array.
12 | public class SynchronizedArray<Element> {
13 | fileprivate let queue = DispatchQueue(label: "spc_sync_array", attributes: .concurrent)
| `- error: cannot infer contextual base in reference to member 'concurrent'
14 | fileprivate var array: [Element]
15 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:55:17: error: cannot find type 'DispatchWorkItem' in scope
53 |
54 | /// The work to be done when the queue fires
55 | var workItem: DispatchWorkItem? = nil
| `- error: cannot find type 'DispatchWorkItem' in scope
56 |
57 | /// The number of times the underlyingTimer hass been set off.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:104:14: warning: static property 'main' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
102 |
103 | // Can be overriden in tests
104 | static var main = TimerQueue()
| |- warning: static property 'main' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'main' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'main' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
105 |
106 | func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:106:51: error: cannot find type 'DispatchWorkItem' in scope
104 | static var main = TimerQueue()
105 |
106 | func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
| `- error: cannot find type 'DispatchWorkItem' in scope
107 | // TimeInterval is always in seconds. Multiply it by 1000 to convert
108 | // to milliseconds and round to the nearest millisecond.
[12/14] Compiling SwiftPhoenixClient Message.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:78:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | - Parameter response: Response from the server indicating that the WebSocket handshake was successful and the connection has been upgraded to webSockets
77 | */
78 | func onOpen(response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 |
80 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:87:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 |
86 | */
87 | func onError(error: Error, response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
88 |
89 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:147:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 |
146 | /// The URLSession configuration
147 | internal let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:150:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
150 | private var session: URLSession? = nil
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |
152 | /// The ongoing task. Assigned during `connect()`
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/SwiftPhoenixClient/PhoenixTransport.swift:153:21: error: cannot find type 'URLSessionWebSocketTask' in scope
151 |
152 | /// The ongoing task. Assigned during `connect()`
153 | private var task: URLSessionWebSocketTask? = nil
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
154 |
155 | /// Holds the current receive task
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:40: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:67: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:255:39: error: cannot find type 'URLSessionWebSocketTask' in scope
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
255 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
256 | didOpenWithProtocol protocol: String?) {
257 | // The Websocket is connected. Set Transport state to open and inform delegate
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:254:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
252 |
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | webSocketTask: URLSessionWebSocketTask,
256 | didOpenWithProtocol protocol: String?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:266:39: error: cannot find type 'URLSessionWebSocketTask' in scope
264 |
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
268 | reason: Data?) {
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:267:48: error: cannot find type 'URLSessionWebSocketTask' in scope
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
268 | reason: Data?) {
269 | // A close frame was received from the server.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:265:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 | }
264 |
265 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
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/SwiftPhoenixClient/PhoenixTransport.swift:274:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | }
273 |
274 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
275 | task: URLSessionTask,
276 | didCompleteWithError error: Error?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:275:30: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
273 |
274 | open func urlSession(_ session: URLSession,
275 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
276 | didCompleteWithError error: Error?) {
277 | // The task has terminated. Inform the delegate that the transport has closed abnormally
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/SwiftPhoenixClient/PhoenixTransport.swift:311:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
309 | }
310 |
311 | private func abnormalErrorReceived(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 | // Set the state of the Transport to closed
313 | self.readyState = .closed
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:140:61: error: cannot find type 'URLSessionWebSocketDelegate' in scope
138 | */
139 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
140 | open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
141 |
142 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:214:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
212 |
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
215 | var request = URLRequest(url: url)
216 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:214:97: error: 'nil' requires a contextual type
212 |
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
215 | var request = URLRequest(url: url)
216 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:215:19: error: cannot find 'URLRequest' in scope
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
215 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
216 |
217 | headers.forEach { (key: String, value: Any) in
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:222:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
220 | }
221 |
222 | self.task = self.session?.webSocketTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
223 |
224 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:236:27: error: cannot find 'URLSessionWebSocketTask' in scope
234 | 3. Provide default .normalClosure function
235 | */
236 | guard let closeCode = URLSessionWebSocketTask.CloseCode.init(rawValue: code) else {
| `- error: cannot find 'URLSessionWebSocketTask' in scope
237 | fatalError("Could not create a CloseCode with invalid code: [\(code)].")
238 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:242:19: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
240 | self.readyState = .closing
241 | self.task?.cancel(with: closeCode, reason: reason?.data(using: .utf8))
242 | self.session?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
243 | receiveMessageTask?.cancel()
244 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:247:22: error: cannot infer contextual base in reference to member 'string'
245 |
246 | open func send(data: Data) {
247 | self.task?.send(.string(String(data: data, encoding: .utf8)!)) { (error) in
| `- error: cannot infer contextual base in reference to member 'string'
248 | // TODO: What is the behavior when an error occurs?
249 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:281:52: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'response'
279 | guard let err = error else { return }
280 |
281 | self.abnormalErrorReceived(err, response: task.response)
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'response'
282 | }
283 |
[13/14] Compiling SwiftPhoenixClient PhoenixTransport.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:78:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | - Parameter response: Response from the server indicating that the WebSocket handshake was successful and the connection has been upgraded to webSockets
77 | */
78 | func onOpen(response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 |
80 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:87:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 |
86 | */
87 | func onError(error: Error, response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
88 |
89 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:147:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 |
146 | /// The URLSession configuration
147 | internal let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:150:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
150 | private var session: URLSession? = nil
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |
152 | /// The ongoing task. Assigned during `connect()`
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/SwiftPhoenixClient/PhoenixTransport.swift:153:21: error: cannot find type 'URLSessionWebSocketTask' in scope
151 |
152 | /// The ongoing task. Assigned during `connect()`
153 | private var task: URLSessionWebSocketTask? = nil
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
154 |
155 | /// Holds the current receive task
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:40: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:67: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:255:39: error: cannot find type 'URLSessionWebSocketTask' in scope
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
255 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
256 | didOpenWithProtocol protocol: String?) {
257 | // The Websocket is connected. Set Transport state to open and inform delegate
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:254:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
252 |
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | webSocketTask: URLSessionWebSocketTask,
256 | didOpenWithProtocol protocol: String?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:266:39: error: cannot find type 'URLSessionWebSocketTask' in scope
264 |
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
268 | reason: Data?) {
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:267:48: error: cannot find type 'URLSessionWebSocketTask' in scope
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
268 | reason: Data?) {
269 | // A close frame was received from the server.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:265:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 | }
264 |
265 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
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/SwiftPhoenixClient/PhoenixTransport.swift:274:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | }
273 |
274 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
275 | task: URLSessionTask,
276 | didCompleteWithError error: Error?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:275:30: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
273 |
274 | open func urlSession(_ session: URLSession,
275 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
276 | didCompleteWithError error: Error?) {
277 | // The task has terminated. Inform the delegate that the transport has closed abnormally
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/SwiftPhoenixClient/PhoenixTransport.swift:311:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
309 | }
310 |
311 | private func abnormalErrorReceived(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 | // Set the state of the Transport to closed
313 | self.readyState = .closed
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:140:61: error: cannot find type 'URLSessionWebSocketDelegate' in scope
138 | */
139 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
140 | open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
141 |
142 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:214:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
212 |
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
215 | var request = URLRequest(url: url)
216 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:214:97: error: 'nil' requires a contextual type
212 |
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
215 | var request = URLRequest(url: url)
216 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:215:19: error: cannot find 'URLRequest' in scope
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
215 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
216 |
217 | headers.forEach { (key: String, value: Any) in
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:222:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
220 | }
221 |
222 | self.task = self.session?.webSocketTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
223 |
224 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:236:27: error: cannot find 'URLSessionWebSocketTask' in scope
234 | 3. Provide default .normalClosure function
235 | */
236 | guard let closeCode = URLSessionWebSocketTask.CloseCode.init(rawValue: code) else {
| `- error: cannot find 'URLSessionWebSocketTask' in scope
237 | fatalError("Could not create a CloseCode with invalid code: [\(code)].")
238 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:242:19: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
240 | self.readyState = .closing
241 | self.task?.cancel(with: closeCode, reason: reason?.data(using: .utf8))
242 | self.session?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
243 | receiveMessageTask?.cancel()
244 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:247:22: error: cannot infer contextual base in reference to member 'string'
245 |
246 | open func send(data: Data) {
247 | self.task?.send(.string(String(data: data, encoding: .utf8)!)) { (error) in
| `- error: cannot infer contextual base in reference to member 'string'
248 | // TODO: What is the behavior when an error occurs?
249 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:281:52: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'response'
279 | guard let err = error else { return }
280 |
281 | self.abnormalErrorReceived(err, response: task.response)
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'response'
282 | }
283 |
[14/14] Compiling SwiftPhoenixClient TimeoutTimer.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:55:17: error: cannot find type 'DispatchWorkItem' in scope
53 |
54 | /// The work to be done when the queue fires
55 | var workItem: DispatchWorkItem? = nil
| `- error: cannot find type 'DispatchWorkItem' in scope
56 |
57 | /// The number of times the underlyingTimer hass been set off.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:104:14: warning: static property 'main' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
102 |
103 | // Can be overriden in tests
104 | static var main = TimerQueue()
| |- warning: static property 'main' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'main' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'main' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
105 |
106 | func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:106:51: error: cannot find type 'DispatchWorkItem' in scope
104 | static var main = TimerQueue()
105 |
106 | func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
| `- error: cannot find type 'DispatchWorkItem' in scope
107 | // TimeInterval is always in seconds. Multiply it by 1000 to convert
108 | // to milliseconds and round to the nearest millisecond.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:82:20: error: cannot find 'DispatchWorkItem' in scope
80 | = self.timerCalculation.call(self.tries + 1) else { return }
81 |
82 | let workItem = DispatchWorkItem {
| `- error: cannot find 'DispatchWorkItem' in scope
83 | self.tries += 1
84 | self.callback.call()
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:111:24: error: cannot find 'DispatchTime' in scope
109 | let dispatchInterval = Int(round(timeInterval * 1000))
110 |
111 | let dispatchTime = DispatchTime.now() + .milliseconds(dispatchInterval)
| `- error: cannot find 'DispatchTime' in scope
112 | DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: execute)
113 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:112:5: error: cannot find 'DispatchQueue' in scope
110 |
111 | let dispatchTime = DispatchTime.now() + .milliseconds(dispatchInterval)
112 | DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: execute)
| `- error: cannot find 'DispatchQueue' in scope
113 | }
114 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/12] Compiling SwiftPhoenixClient SynchronizedArray.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:13:29: error: cannot find 'DispatchQueue' in scope
11 | /// A thread-safe array.
12 | public class SynchronizedArray<Element> {
13 | fileprivate let queue = DispatchQueue(label: "spc_sync_array", attributes: .concurrent)
| `- error: cannot find 'DispatchQueue' in scope
14 | fileprivate var array: [Element]
15 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:13:81: error: cannot infer contextual base in reference to member 'concurrent'
11 | /// A thread-safe array.
12 | public class SynchronizedArray<Element> {
13 | fileprivate let queue = DispatchQueue(label: "spc_sync_array", attributes: .concurrent)
| `- error: cannot infer contextual base in reference to member 'concurrent'
14 | fileprivate var array: [Element]
15 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:25:29: error: cannot infer contextual base in reference to member 'barrier'
23 |
24 | func append( _ newElement: Element) {
25 | queue.async(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
26 | self.array.append(newElement)
27 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:39:29: error: cannot infer contextual base in reference to member 'barrier'
37 |
38 | func removeAll() {
39 | queue.async(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
40 | self.array.removeAll()
41 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:45:29: error: cannot infer contextual base in reference to member 'barrier'
43 |
44 | func removeAll(where shouldBeRemoved: @escaping (Element) -> Bool) {
45 | queue.async(flags: .barrier) {
| `- error: cannot infer contextual base in reference to member 'barrier'
46 | self.array.removeAll(where: shouldBeRemoved)
47 | }
[3/12] Compiling SwiftPhoenixClient Push.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Push.swift:47:24: error: cannot find type 'DispatchWorkItem' in scope
45 |
46 | /// WorkItem to be performed when the timeout timer fires
47 | var timeoutWorkItem: DispatchWorkItem?
| `- error: cannot find type 'DispatchWorkItem' in scope
48 |
49 | /// Hooks into a Push. Where .receive("ok", callback(Payload)) are stored
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Push.swift:242:20: error: cannot find 'DispatchWorkItem' in scope
240 |
241 | /// Setup and start the Timeout timer.
242 | let workItem = DispatchWorkItem {
| `- error: cannot find 'DispatchWorkItem' in scope
243 | self.trigger("timeout", payload: [:])
244 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:106:51: error: cannot find type 'DispatchWorkItem' in scope
104 | static var main = TimerQueue()
105 |
106 | func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
| `- error: cannot find type 'DispatchWorkItem' in scope
107 | // TimeInterval is always in seconds. Multiply it by 1000 to convert
108 | // to milliseconds and round to the nearest millisecond.
[4/13] Compiling SwiftPhoenixClient Socket.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:39:67: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | /// Struct that gathers callbacks assigned to the Socket
38 | struct StateChangeCallbacks {
39 | let open: SynchronizedArray<(ref: String, callback: Delegated<URLResponse?, Void>)> = .init()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | let close: SynchronizedArray<(ref: String, callback: Delegated<(Int, String?), Void>)> = .init()
41 | let error: SynchronizedArray<(ref: String, callback: Delegated<(Error, URLResponse?), Void>)> = .init()
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:41:76: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | let open: SynchronizedArray<(ref: String, callback: Delegated<URLResponse?, Void>)> = .init()
40 | let close: SynchronizedArray<(ref: String, callback: Delegated<(Int, String?), Void>)> = .init()
41 | let error: SynchronizedArray<(ref: String, callback: Delegated<(Error, URLResponse?), Void>)> = .init()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | let message: SynchronizedArray<(ref: String, callback: Delegated<Message, Void>)> = .init()
43 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:108:31: error: cannot find type 'DispatchTimeInterval' in scope
106 |
107 | /// The maximum amount of time which the system may delay heartbeats in order to optimize power usage
108 | public var heartbeatLeeway: DispatchTimeInterval = Defaults.heartbeatLeeway
| `- error: cannot find type 'DispatchTimeInterval' in scope
109 |
110 | /// Interval between socket reconnect attempts, in seconds
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:135:39: error: cannot find type 'SSLCipherSuite' in scope
133 | /// allowed cipher suites supported by your server. This must be
134 | /// set before calling `socket.connect()` in order to apply.
135 | public var enabledSSLCipherSuites: [SSLCipherSuite]?
| `- error: cannot find type 'SSLCipherSuite' in scope
136 | #endif
137 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:341:43: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
339 | /// - parameter callback: Called when the Socket is opened
340 | @discardableResult
341 | public func onOpen(callback: @escaping (URLResponse?) -> Void) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
342 | var delegated = Delegated<URLResponse?, Void>()
343 | delegated.manuallyDelegate(with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:378:69: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
376 | @discardableResult
377 | public func delegateOnOpen<T: AnyObject>(to owner: T,
378 | callback: @escaping ((T, URLResponse?) -> Void)) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
379 | var delegated = Delegated<URLResponse?, Void>()
380 | delegated.delegate(to: owner, with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:466:52: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
464 | /// - parameter callback: Called when the Socket errors
465 | @discardableResult
466 | public func onError(callback: @escaping ((Error, URLResponse?)) -> Void) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
467 | var delegated = Delegated<(Error, URLResponse?), Void>()
468 | delegated.manuallyDelegate(with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:486:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
484 | @discardableResult
485 | public func delegateOnError<T: AnyObject>(to owner: T,
486 | callback: @escaping ((T, (Error, URLResponse?)) -> Void)) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
487 | var delegated = Delegated<(Error, URLResponse?), Void>()
488 | delegated.delegate(to: owner, with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:652:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
650 | //----------------------------------------------------------------------
651 | /// Called when the underlying Websocket connects to it's host
652 | internal func onConnectionOpen(response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
653 | self.logItems("transport", "Connected to \(endPoint)")
654 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:689:61: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
687 | }
688 |
689 | internal func onConnectionError(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
690 | self.logItems("transport", error, response ?? "")
691 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:812:4: error: Objective-C interoperability is disabled
810 |
811 | /// Sends a heartbeat payload to the phoenix servers
812 | @objc func sendHeartbeat() {
| `- error: Objective-C interoperability is disabled
813 | // Do not send if the connection is closed
814 | guard isConnected else { return }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:858:32: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
856 | // MARK: - TransportDelegate
857 | //----------------------------------------------------------------------
858 | public func onOpen(response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
859 | self.onConnectionOpen(response: response)
860 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:862:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
860 | }
861 |
862 | public func onError(error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
863 | self.onConnectionError(error, response: response)
864 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:67: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:342:31: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
340 | @discardableResult
341 | public func onOpen(callback: @escaping (URLResponse?) -> Void) -> String {
342 | var delegated = Delegated<URLResponse?, Void>()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
343 | delegated.manuallyDelegate(with: callback)
344 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:379:31: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
377 | public func delegateOnOpen<T: AnyObject>(to owner: T,
378 | callback: @escaping ((T, URLResponse?) -> Void)) -> String {
379 | var delegated = Delegated<URLResponse?, Void>()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
380 | delegated.delegate(to: owner, with: callback)
381 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:467:39: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
465 | @discardableResult
466 | public func onError(callback: @escaping ((Error, URLResponse?)) -> Void) -> String {
467 | var delegated = Delegated<(Error, URLResponse?), Void>()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
468 | delegated.manuallyDelegate(with: callback)
469 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:487:39: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 | public func delegateOnError<T: AnyObject>(to owner: T,
486 | callback: @escaping ((T, (Error, URLResponse?)) -> Void)) -> String {
487 | var delegated = Delegated<(Error, URLResponse?), Void>()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
488 | delegated.delegate(to: owner, with: callback)
489 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:43: error: cannot find type 'DispatchQueue' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchQueue' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:92: error: cannot find type 'DispatchTimeInterval' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchTimeInterval' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:805:83: error: extra argument 'leeway' in call
803 | guard !skipHeartbeat else { return }
804 |
805 | self.heartbeatTimer = HeartbeatTimer(timeInterval: heartbeatInterval, leeway: heartbeatLeeway)
| `- error: extra argument 'leeway' in call
806 | self.heartbeatTimer?.start(eventHandler: { [weak self] in
807 | self?.sendHeartbeat()
[5/13] Compiling SwiftPhoenixClient Delegated.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:41:15: error: cannot find type 'DispatchTimeInterval' in scope
39 |
40 | /// The maximum amount of time which the system may delay the delivery of the timer events
41 | let leeway: DispatchTimeInterval
| `- error: cannot find type 'DispatchTimeInterval' in scope
42 |
43 | // The DispatchQueue to schedule the timers on
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:44:14: error: cannot find type 'DispatchQueue' in scope
42 |
43 | // The DispatchQueue to schedule the timers on
44 | let queue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
45 |
46 | // UUID which specifies the Timer instance. Verifies that timers are different
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:53:31: error: cannot find type 'DispatchSourceTimer' in scope
51 | //----------------------------------------------------------------------
52 | // The underlying, cancelable, resettable, timer.
53 | private var temporaryTimer: DispatchSourceTimer? = nil
| `- error: cannot find type 'DispatchSourceTimer' in scope
54 | // The event handler that is called by the timer when it fires.
55 | private var temporaryEventHandler: (() -> Void)? = nil
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:43: error: cannot find type 'DispatchQueue' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchQueue' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:92: error: cannot find type 'DispatchTimeInterval' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchTimeInterval' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:64:37: error: cannot find type 'DispatchQueue' in scope
62 | }
63 |
64 | public static let heartbeatQueue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
65 | = DispatchQueue(label: "com.phoenix.socket.heartbeat")
66 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:77:59: error: extra argument 'queue' in call
75 | */
76 | convenience init(timeInterval: TimeInterval) {
77 | self.init(timeInterval: timeInterval, queue: Defaults.heartbeatQueue)
| `- error: extra argument 'queue' in call
78 | }
79 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:85:19: error: cannot find 'DispatchSource' in scope
83 |
84 | // Create a new DispatchSourceTimer, passing the event handler
85 | let timer = DispatchSource.makeTimerSource(flags: [], queue: queue)
| `- error: cannot find 'DispatchSource' in scope
86 | timer.setEventHandler(handler: eventHandler)
87 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:90:32: error: cannot find 'DispatchTime' in scope
88 | // Schedule the timer to first fire in `timeInterval` and then
89 | // repeat every `timeInterval`
90 | timer.schedule(deadline: DispatchTime.now() + self.timeInterval,
| `- error: cannot find 'DispatchTime' in scope
91 | repeating: self.timeInterval,
92 | leeway: self.leeway)
[6/13] Compiling SwiftPhoenixClient HeartbeatTimer.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:41:15: error: cannot find type 'DispatchTimeInterval' in scope
39 |
40 | /// The maximum amount of time which the system may delay the delivery of the timer events
41 | let leeway: DispatchTimeInterval
| `- error: cannot find type 'DispatchTimeInterval' in scope
42 |
43 | // The DispatchQueue to schedule the timers on
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:44:14: error: cannot find type 'DispatchQueue' in scope
42 |
43 | // The DispatchQueue to schedule the timers on
44 | let queue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
45 |
46 | // UUID which specifies the Timer instance. Verifies that timers are different
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:53:31: error: cannot find type 'DispatchSourceTimer' in scope
51 | //----------------------------------------------------------------------
52 | // The underlying, cancelable, resettable, timer.
53 | private var temporaryTimer: DispatchSourceTimer? = nil
| `- error: cannot find type 'DispatchSourceTimer' in scope
54 | // The event handler that is called by the timer when it fires.
55 | private var temporaryEventHandler: (() -> Void)? = nil
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:43: error: cannot find type 'DispatchQueue' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchQueue' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:92: error: cannot find type 'DispatchTimeInterval' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchTimeInterval' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:64:37: error: cannot find type 'DispatchQueue' in scope
62 | }
63 |
64 | public static let heartbeatQueue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
65 | = DispatchQueue(label: "com.phoenix.socket.heartbeat")
66 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:77:59: error: extra argument 'queue' in call
75 | */
76 | convenience init(timeInterval: TimeInterval) {
77 | self.init(timeInterval: timeInterval, queue: Defaults.heartbeatQueue)
| `- error: extra argument 'queue' in call
78 | }
79 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:85:19: error: cannot find 'DispatchSource' in scope
83 |
84 | // Create a new DispatchSourceTimer, passing the event handler
85 | let timer = DispatchSource.makeTimerSource(flags: [], queue: queue)
| `- error: cannot find 'DispatchSource' in scope
86 | timer.setEventHandler(handler: eventHandler)
87 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:90:32: error: cannot find 'DispatchTime' in scope
88 | // Schedule the timer to first fire in `timeInterval` and then
89 | // repeat every `timeInterval`
90 | timer.schedule(deadline: DispatchTime.now() + self.timeInterval,
| `- error: cannot find 'DispatchTime' in scope
91 | repeating: self.timeInterval,
92 | leeway: self.leeway)
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/13] Emitting module SwiftPhoenixClient
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:33:38: error: cannot find type 'DispatchTimeInterval' in scope
31 |
32 | /// Default maximum amount of time which the system may delay heartbeat events in order to minimize power usage
33 | public static let heartbeatLeeway: DispatchTimeInterval = .milliseconds(10)
| `- error: cannot find type 'DispatchTimeInterval' in scope
34 |
35 | /// Default reconnect algorithm for the socket
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:64:37: error: cannot find type 'DispatchQueue' in scope
62 | }
63 |
64 | public static let heartbeatQueue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
65 | = DispatchQueue(label: "com.phoenix.socket.heartbeat")
66 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:41:15: error: cannot find type 'DispatchTimeInterval' in scope
39 |
40 | /// The maximum amount of time which the system may delay the delivery of the timer events
41 | let leeway: DispatchTimeInterval
| `- error: cannot find type 'DispatchTimeInterval' in scope
42 |
43 | // The DispatchQueue to schedule the timers on
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:44:14: error: cannot find type 'DispatchQueue' in scope
42 |
43 | // The DispatchQueue to schedule the timers on
44 | let queue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
45 |
46 | // UUID which specifies the Timer instance. Verifies that timers are different
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:53:31: error: cannot find type 'DispatchSourceTimer' in scope
51 | //----------------------------------------------------------------------
52 | // The underlying, cancelable, resettable, timer.
53 | private var temporaryTimer: DispatchSourceTimer? = nil
| `- error: cannot find type 'DispatchSourceTimer' in scope
54 | // The event handler that is called by the timer when it fires.
55 | private var temporaryEventHandler: (() -> Void)? = nil
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:43: error: cannot find type 'DispatchQueue' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchQueue' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/HeartbeatTimer.swift:65:92: error: cannot find type 'DispatchTimeInterval' in scope
63 | - leeway: The maximum amount of time which the system may delay the delivery of the timer events
64 | */
65 | init(timeInterval: TimeInterval, queue: DispatchQueue = Defaults.heartbeatQueue, leeway: DispatchTimeInterval = Defaults.heartbeatLeeway) {
| `- error: cannot find type 'DispatchTimeInterval' in scope
66 | self.timeInterval = timeInterval
67 | self.queue = queue
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:78:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | - Parameter response: Response from the server indicating that the WebSocket handshake was successful and the connection has been upgraded to webSockets
77 | */
78 | func onOpen(response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 |
80 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:87:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 |
86 | */
87 | func onError(error: Error, response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
88 |
89 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:147:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 |
146 | /// The URLSession configuration
147 | internal let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:150:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
150 | private var session: URLSession? = nil
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |
152 | /// The ongoing task. Assigned during `connect()`
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/SwiftPhoenixClient/PhoenixTransport.swift:153:21: error: cannot find type 'URLSessionWebSocketTask' in scope
151 |
152 | /// The ongoing task. Assigned during `connect()`
153 | private var task: URLSessionWebSocketTask? = nil
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
154 |
155 | /// Holds the current receive task
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:40: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:67: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:255:39: error: cannot find type 'URLSessionWebSocketTask' in scope
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
255 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
256 | didOpenWithProtocol protocol: String?) {
257 | // The Websocket is connected. Set Transport state to open and inform delegate
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:254:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
252 |
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | webSocketTask: URLSessionWebSocketTask,
256 | didOpenWithProtocol protocol: String?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:266:39: error: cannot find type 'URLSessionWebSocketTask' in scope
264 |
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
268 | reason: Data?) {
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:267:48: error: cannot find type 'URLSessionWebSocketTask' in scope
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
268 | reason: Data?) {
269 | // A close frame was received from the server.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:265:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 | }
264 |
265 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
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/SwiftPhoenixClient/PhoenixTransport.swift:274:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | }
273 |
274 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
275 | task: URLSessionTask,
276 | didCompleteWithError error: Error?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:275:30: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
273 |
274 | open func urlSession(_ session: URLSession,
275 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
276 | didCompleteWithError error: Error?) {
277 | // The task has terminated. Inform the delegate that the transport has closed abnormally
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/SwiftPhoenixClient/PhoenixTransport.swift:311:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
309 | }
310 |
311 | private func abnormalErrorReceived(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 | // Set the state of the Transport to closed
313 | self.readyState = .closed
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:140:61: error: cannot find type 'URLSessionWebSocketDelegate' in scope
138 | */
139 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
140 | open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
141 |
142 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Push.swift:47:24: error: cannot find type 'DispatchWorkItem' in scope
45 |
46 | /// WorkItem to be performed when the timeout timer fires
47 | var timeoutWorkItem: DispatchWorkItem?
| `- error: cannot find type 'DispatchWorkItem' in scope
48 |
49 | /// Hooks into a Push. Where .receive("ok", callback(Payload)) are stored
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:39:67: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | /// Struct that gathers callbacks assigned to the Socket
38 | struct StateChangeCallbacks {
39 | let open: SynchronizedArray<(ref: String, callback: Delegated<URLResponse?, Void>)> = .init()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | let close: SynchronizedArray<(ref: String, callback: Delegated<(Int, String?), Void>)> = .init()
41 | let error: SynchronizedArray<(ref: String, callback: Delegated<(Error, URLResponse?), Void>)> = .init()
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:41:76: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | let open: SynchronizedArray<(ref: String, callback: Delegated<URLResponse?, Void>)> = .init()
40 | let close: SynchronizedArray<(ref: String, callback: Delegated<(Int, String?), Void>)> = .init()
41 | let error: SynchronizedArray<(ref: String, callback: Delegated<(Error, URLResponse?), Void>)> = .init()
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | let message: SynchronizedArray<(ref: String, callback: Delegated<Message, Void>)> = .init()
43 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:108:31: error: cannot find type 'DispatchTimeInterval' in scope
106 |
107 | /// The maximum amount of time which the system may delay heartbeats in order to optimize power usage
108 | public var heartbeatLeeway: DispatchTimeInterval = Defaults.heartbeatLeeway
| `- error: cannot find type 'DispatchTimeInterval' in scope
109 |
110 | /// Interval between socket reconnect attempts, in seconds
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:135:39: error: cannot find type 'SSLCipherSuite' in scope
133 | /// allowed cipher suites supported by your server. This must be
134 | /// set before calling `socket.connect()` in order to apply.
135 | public var enabledSSLCipherSuites: [SSLCipherSuite]?
| `- error: cannot find type 'SSLCipherSuite' in scope
136 | #endif
137 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:341:43: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
339 | /// - parameter callback: Called when the Socket is opened
340 | @discardableResult
341 | public func onOpen(callback: @escaping (URLResponse?) -> Void) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
342 | var delegated = Delegated<URLResponse?, Void>()
343 | delegated.manuallyDelegate(with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:378:69: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
376 | @discardableResult
377 | public func delegateOnOpen<T: AnyObject>(to owner: T,
378 | callback: @escaping ((T, URLResponse?) -> Void)) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
379 | var delegated = Delegated<URLResponse?, Void>()
380 | delegated.delegate(to: owner, with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:466:52: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
464 | /// - parameter callback: Called when the Socket errors
465 | @discardableResult
466 | public func onError(callback: @escaping ((Error, URLResponse?)) -> Void) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
467 | var delegated = Delegated<(Error, URLResponse?), Void>()
468 | delegated.manuallyDelegate(with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:486:78: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
484 | @discardableResult
485 | public func delegateOnError<T: AnyObject>(to owner: T,
486 | callback: @escaping ((T, (Error, URLResponse?)) -> Void)) -> String {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
487 | var delegated = Delegated<(Error, URLResponse?), Void>()
488 | delegated.delegate(to: owner, with: callback)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:652:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
650 | //----------------------------------------------------------------------
651 | /// Called when the underlying Websocket connects to it's host
652 | internal func onConnectionOpen(response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
653 | self.logItems("transport", "Connected to \(endPoint)")
654 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:689:61: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
687 | }
688 |
689 | internal func onConnectionError(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
690 | self.logItems("transport", error, response ?? "")
691 |
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:812:4: error: Objective-C interoperability is disabled
810 |
811 | /// Sends a heartbeat payload to the phoenix servers
812 | @objc func sendHeartbeat() {
| `- error: Objective-C interoperability is disabled
813 | // Do not send if the connection is closed
814 | guard isConnected else { return }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:858:32: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
856 | // MARK: - TransportDelegate
857 | //----------------------------------------------------------------------
858 | public func onOpen(response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
859 | self.onConnectionOpen(response: response)
860 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Socket.swift:862:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
860 | }
861 |
862 | public func onError(error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
863 | self.onConnectionError(error, response: response)
864 | }
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:13:29: error: cannot find 'DispatchQueue' in scope
11 | /// A thread-safe array.
12 | public class SynchronizedArray<Element> {
13 | fileprivate let queue = DispatchQueue(label: "spc_sync_array", attributes: .concurrent)
| `- error: cannot find 'DispatchQueue' in scope
14 | fileprivate var array: [Element]
15 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/SynchronizedArray.swift:13:81: error: cannot infer contextual base in reference to member 'concurrent'
11 | /// A thread-safe array.
12 | public class SynchronizedArray<Element> {
13 | fileprivate let queue = DispatchQueue(label: "spc_sync_array", attributes: .concurrent)
| `- error: cannot infer contextual base in reference to member 'concurrent'
14 | fileprivate var array: [Element]
15 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:55:17: error: cannot find type 'DispatchWorkItem' in scope
53 |
54 | /// The work to be done when the queue fires
55 | var workItem: DispatchWorkItem? = nil
| `- error: cannot find type 'DispatchWorkItem' in scope
56 |
57 | /// The number of times the underlyingTimer hass been set off.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:106:51: error: cannot find type 'DispatchWorkItem' in scope
104 | static var main = TimerQueue()
105 |
106 | func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
| `- error: cannot find type 'DispatchWorkItem' in scope
107 | // TimeInterval is always in seconds. Multiply it by 1000 to convert
108 | // to milliseconds and round to the nearest millisecond.
[8/13] Compiling SwiftPhoenixClient TimeoutTimer.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:55:17: error: cannot find type 'DispatchWorkItem' in scope
53 |
54 | /// The work to be done when the queue fires
55 | var workItem: DispatchWorkItem? = nil
| `- error: cannot find type 'DispatchWorkItem' in scope
56 |
57 | /// The number of times the underlyingTimer hass been set off.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:106:51: error: cannot find type 'DispatchWorkItem' in scope
104 | static var main = TimerQueue()
105 |
106 | func queue(timeInterval: TimeInterval, execute: DispatchWorkItem) {
| `- error: cannot find type 'DispatchWorkItem' in scope
107 | // TimeInterval is always in seconds. Multiply it by 1000 to convert
108 | // to milliseconds and round to the nearest millisecond.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:82:20: error: cannot find 'DispatchWorkItem' in scope
80 | = self.timerCalculation.call(self.tries + 1) else { return }
81 |
82 | let workItem = DispatchWorkItem {
| `- error: cannot find 'DispatchWorkItem' in scope
83 | self.tries += 1
84 | self.callback.call()
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:111:24: error: cannot find 'DispatchTime' in scope
109 | let dispatchInterval = Int(round(timeInterval * 1000))
110 |
111 | let dispatchTime = DispatchTime.now() + .milliseconds(dispatchInterval)
| `- error: cannot find 'DispatchTime' in scope
112 | DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: execute)
113 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/TimeoutTimer.swift:112:5: error: cannot find 'DispatchQueue' in scope
110 |
111 | let dispatchTime = DispatchTime.now() + .milliseconds(dispatchInterval)
112 | DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: execute)
| `- error: cannot find 'DispatchQueue' in scope
113 | }
114 | }
[9/13] Compiling SwiftPhoenixClient Presence.swift
[10/13] Compiling SwiftPhoenixClient Channel.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:33:38: error: cannot find type 'DispatchTimeInterval' in scope
31 |
32 | /// Default maximum amount of time which the system may delay heartbeat events in order to minimize power usage
33 | public static let heartbeatLeeway: DispatchTimeInterval = .milliseconds(10)
| `- error: cannot find type 'DispatchTimeInterval' in scope
34 |
35 | /// Default reconnect algorithm for the socket
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:64:37: error: cannot find type 'DispatchQueue' in scope
62 | }
63 |
64 | public static let heartbeatQueue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
65 | = DispatchQueue(label: "com.phoenix.socket.heartbeat")
66 | }
[11/13] Compiling SwiftPhoenixClient Defaults.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:33:38: error: cannot find type 'DispatchTimeInterval' in scope
31 |
32 | /// Default maximum amount of time which the system may delay heartbeat events in order to minimize power usage
33 | public static let heartbeatLeeway: DispatchTimeInterval = .milliseconds(10)
| `- error: cannot find type 'DispatchTimeInterval' in scope
34 |
35 | /// Default reconnect algorithm for the socket
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/Defaults.swift:64:37: error: cannot find type 'DispatchQueue' in scope
62 | }
63 |
64 | public static let heartbeatQueue: DispatchQueue
| `- error: cannot find type 'DispatchQueue' in scope
65 | = DispatchQueue(label: "com.phoenix.socket.heartbeat")
66 | }
[12/13] Compiling SwiftPhoenixClient Message.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:78:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | - Parameter response: Response from the server indicating that the WebSocket handshake was successful and the connection has been upgraded to webSockets
77 | */
78 | func onOpen(response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 |
80 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:87:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 |
86 | */
87 | func onError(error: Error, response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
88 |
89 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:147:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 |
146 | /// The URLSession configuration
147 | internal let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:150:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
150 | private var session: URLSession? = nil
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |
152 | /// The ongoing task. Assigned during `connect()`
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/SwiftPhoenixClient/PhoenixTransport.swift:153:21: error: cannot find type 'URLSessionWebSocketTask' in scope
151 |
152 | /// The ongoing task. Assigned during `connect()`
153 | private var task: URLSessionWebSocketTask? = nil
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
154 |
155 | /// Holds the current receive task
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:40: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:67: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:255:39: error: cannot find type 'URLSessionWebSocketTask' in scope
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
255 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
256 | didOpenWithProtocol protocol: String?) {
257 | // The Websocket is connected. Set Transport state to open and inform delegate
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:254:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
252 |
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | webSocketTask: URLSessionWebSocketTask,
256 | didOpenWithProtocol protocol: String?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:266:39: error: cannot find type 'URLSessionWebSocketTask' in scope
264 |
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
268 | reason: Data?) {
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:267:48: error: cannot find type 'URLSessionWebSocketTask' in scope
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
268 | reason: Data?) {
269 | // A close frame was received from the server.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:265:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 | }
264 |
265 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
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/SwiftPhoenixClient/PhoenixTransport.swift:274:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | }
273 |
274 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
275 | task: URLSessionTask,
276 | didCompleteWithError error: Error?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:275:30: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
273 |
274 | open func urlSession(_ session: URLSession,
275 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
276 | didCompleteWithError error: Error?) {
277 | // The task has terminated. Inform the delegate that the transport has closed abnormally
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/SwiftPhoenixClient/PhoenixTransport.swift:311:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
309 | }
310 |
311 | private func abnormalErrorReceived(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 | // Set the state of the Transport to closed
313 | self.readyState = .closed
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:140:61: error: cannot find type 'URLSessionWebSocketDelegate' in scope
138 | */
139 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
140 | open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
141 |
142 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:214:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
212 |
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
215 | var request = URLRequest(url: url)
216 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:214:97: error: 'nil' requires a contextual type
212 |
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
215 | var request = URLRequest(url: url)
216 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:215:19: error: cannot find 'URLRequest' in scope
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
215 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
216 |
217 | headers.forEach { (key: String, value: Any) in
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:222:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
220 | }
221 |
222 | self.task = self.session?.webSocketTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
223 |
224 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:236:27: error: cannot find 'URLSessionWebSocketTask' in scope
234 | 3. Provide default .normalClosure function
235 | */
236 | guard let closeCode = URLSessionWebSocketTask.CloseCode.init(rawValue: code) else {
| `- error: cannot find 'URLSessionWebSocketTask' in scope
237 | fatalError("Could not create a CloseCode with invalid code: [\(code)].")
238 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:242:19: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
240 | self.readyState = .closing
241 | self.task?.cancel(with: closeCode, reason: reason?.data(using: .utf8))
242 | self.session?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
243 | receiveMessageTask?.cancel()
244 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:247:22: error: cannot infer contextual base in reference to member 'string'
245 |
246 | open func send(data: Data) {
247 | self.task?.send(.string(String(data: data, encoding: .utf8)!)) { (error) in
| `- error: cannot infer contextual base in reference to member 'string'
248 | // TODO: What is the behavior when an error occurs?
249 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:281:52: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'response'
279 | guard let err = error else { return }
280 |
281 | self.abnormalErrorReceived(err, response: task.response)
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'response'
282 | }
283 |
[13/13] Compiling SwiftPhoenixClient PhoenixTransport.swift
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:78:25: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | - Parameter response: Response from the server indicating that the WebSocket handshake was successful and the connection has been upgraded to webSockets
77 | */
78 | func onOpen(response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
79 |
80 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:87:40: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
85 |
86 | */
87 | func onError(error: Error, response: URLResponse?)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
88 |
89 | /**
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:147:31: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
145 |
146 | /// The URLSession configuration
147 | internal let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:150:24: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 | /// The underling URLSession. Assigned during `connect()`
150 | private var session: URLSession? = nil
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |
152 | /// The ongoing task. Assigned during `connect()`
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/SwiftPhoenixClient/PhoenixTransport.swift:153:21: error: cannot find type 'URLSessionWebSocketTask' in scope
151 |
152 | /// The ongoing task. Assigned during `connect()`
153 | private var task: URLSessionWebSocketTask? = nil
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
154 |
155 | /// Holds the current receive task
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:40: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:183:67: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
181 | - parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided
182 | */
183 | public init(url: URL, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
184 |
185 | // URLSession requires that the endpoint be "wss" instead of "https".
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:255:39: error: cannot find type 'URLSessionWebSocketTask' in scope
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
255 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
256 | didOpenWithProtocol protocol: String?) {
257 | // The Websocket is connected. Set Transport state to open and inform delegate
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:254:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
252 |
253 | // MARK: - URLSessionWebSocketDelegate
254 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | webSocketTask: URLSessionWebSocketTask,
256 | didOpenWithProtocol protocol: String?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:266:39: error: cannot find type 'URLSessionWebSocketTask' in scope
264 |
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
268 | reason: Data?) {
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:267:48: error: cannot find type 'URLSessionWebSocketTask' in scope
265 | open func urlSession(_ session: URLSession,
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
268 | reason: Data?) {
269 | // A close frame was received from the server.
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:265:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 | }
264 |
265 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 | webSocketTask: URLSessionWebSocketTask,
267 | didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
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/SwiftPhoenixClient/PhoenixTransport.swift:274:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 | }
273 |
274 | open func urlSession(_ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
275 | task: URLSessionTask,
276 | didCompleteWithError error: Error?) {
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/SwiftPhoenixClient/PhoenixTransport.swift:275:30: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
273 |
274 | open func urlSession(_ session: URLSession,
275 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
276 | didCompleteWithError error: Error?) {
277 | // The task has terminated. Inform the delegate that the transport has closed abnormally
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/SwiftPhoenixClient/PhoenixTransport.swift:311:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
309 | }
310 |
311 | private func abnormalErrorReceived(_ error: Error, response: URLResponse?) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
312 | // Set the state of the Transport to closed
313 | self.readyState = .closed
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:140:61: error: cannot find type 'URLSessionWebSocketDelegate' in scope
138 | */
139 | @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
140 | open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketDelegate {
| `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
141 |
142 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:214:20: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
212 |
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
215 | var request = URLRequest(url: url)
216 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:214:97: error: 'nil' requires a contextual type
212 |
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
215 | var request = URLRequest(url: url)
216 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:215:19: error: cannot find 'URLRequest' in scope
213 | // Create the session and websocket task
214 | self.session = URLSession(configuration: self.configuration, delegate: self, delegateQueue: nil)
215 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
216 |
217 | headers.forEach { (key: String, value: Any) in
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:222:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
220 | }
221 |
222 | self.task = self.session?.webSocketTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'webSocketTask'
223 |
224 |
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:236:27: error: cannot find 'URLSessionWebSocketTask' in scope
234 | 3. Provide default .normalClosure function
235 | */
236 | guard let closeCode = URLSessionWebSocketTask.CloseCode.init(rawValue: code) else {
| `- error: cannot find 'URLSessionWebSocketTask' in scope
237 | fatalError("Could not create a CloseCode with invalid code: [\(code)].")
238 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:242:19: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
240 | self.readyState = .closing
241 | self.task?.cancel(with: closeCode, reason: reason?.data(using: .utf8))
242 | self.session?.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
243 | receiveMessageTask?.cancel()
244 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:247:22: error: cannot infer contextual base in reference to member 'string'
245 |
246 | open func send(data: Data) {
247 | self.task?.send(.string(String(data: data, encoding: .utf8)!)) { (error) in
| `- error: cannot infer contextual base in reference to member 'string'
248 | // TODO: What is the behavior when an error occurs?
249 | }
/host/spi-builder-workspace/Sources/SwiftPhoenixClient/PhoenixTransport.swift:281:52: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'response'
279 | guard let err = error else { return }
280 |
281 | self.abnormalErrorReceived(err, response: task.response)
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'response'
282 | }
283 |
BUILD FAILURE 6.1 wasm