The Swift Package Index logo.Swift Package Index

Build Information

Failed to build HAKit, reference main (c24be0), with Swift 6.3 for Android on 8 Nov 2026 01:06:37 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-54344849-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:android-6.3-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1

Build Log

148 |
149 |     func urlSession(
150 |         _ session: URLSession,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |         didReceive challenge: URLAuthenticationChallenge,
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:151:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
149 |     func urlSession(
150 |         _ session: URLSession,
151 |         didReceive challenge: URLAuthenticationChallenge,
    |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
153 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:43:19: error: cannot find type 'URLSessionWebSocketTask' in scope
 41 |
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
    |                   `- error: cannot find type 'URLSessionWebSocketTask' in scope
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
 45 |             state.session = session
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                            `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:71: error: cannot infer contextual base in reference to member 'default'
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                                                       `- error: cannot infer contextual base in reference to member 'default'
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:111: error: 'nil' requires a contextual type
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                                                                                               `- error: 'nil' requires a contextual type
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:56:25: error: cannot find 'URLSessionWebSocketTask' in scope
 54 |
 55 |     func stop(closeCode: UInt16) {
 56 |         let closeCode = URLSessionWebSocketTask.CloseCode(rawValue: Int(closeCode)) ?? .normalClosure
    |                         `- error: cannot find 'URLSessionWebSocketTask' in scope
 57 |         let (task, session) = takeState()
 58 |         task?.cancel(with: closeCode, reason: nil)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:58:47: error: 'nil' requires a contextual type
 56 |         let closeCode = URLSessionWebSocketTask.CloseCode(rawValue: Int(closeCode)) ?? .normalClosure
 57 |         let (task, session) = takeState()
 58 |         task?.cancel(with: closeCode, reason: nil)
    |                                               `- error: 'nil' requires a contextual type
 59 |         // Invalidating releases the `URLSession`'s strong reference to this engine (its delegate),
 60 |         // breaking the retain cycle; sessions are never reused (`start` creates a fresh one).
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:66:29: error: cannot infer contextual base in reference to member 'abnormalClosure'
 64 |     func forceStop() {
 65 |         let (task, session) = takeState()
 66 |         task?.cancel(with: .abnormalClosure, reason: nil)
    |                             `- error: cannot infer contextual base in reference to member 'abnormalClosure'
 67 |         session?.invalidateAndCancel()
 68 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:66:54: error: 'nil' requires a contextual type
 64 |     func forceStop() {
 65 |         let (task, session) = takeState()
 66 |         task?.cancel(with: .abnormalClosure, reason: nil)
    |                                                      `- error: 'nil' requires a contextual type
 67 |         session?.invalidateAndCancel()
 68 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:80:21: error: cannot infer contextual base in reference to member 'string'
 78 |     func write(string: String, completion: (() -> Void)?) {
 79 |         let task = state.read { $0.task }
 80 |         task?.send(.string(string), completionHandler: sendCompletion(completion))
    |                     `- error: cannot infer contextual base in reference to member 'string'
 81 |     }
 82 |
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:87:25: error: cannot infer contextual base in reference to member 'data'
 85 |         case .binaryFrame:
 86 |             let task = state.read { $0.task }
 87 |             task?.send(.data(data), completionHandler: sendCompletion(completion))
    |                         `- error: cannot infer contextual base in reference to member 'data'
 88 |         case .textFrame:
 89 |             write(string: String(decoding: data, as: UTF8.self), completion: completion)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:105:19: error: reference to member 'handleReceiveResult' cannot be resolved without a contextual type
103 |         let task = state.read { $0.task }
104 |         task?.receive { [weak self] result in
105 |             self?.handleReceiveResult(result)
    |                   `- error: reference to member 'handleReceiveResult' cannot be resolved without a contextual type
106 |         }
107 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:104:37: error: cannot infer type of closure parameter 'result' without a type annotation
102 |     private func doRead() {
103 |         let task = state.read { $0.task }
104 |         task?.receive { [weak self] result in
    |                                     `- error: cannot infer type of closure parameter 'result' without a type annotation
105 |             self?.handleReceiveResult(result)
106 |         }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:154:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
153 |     ) {
154 |         switch challenge.protectionSpace.authenticationMethod {
    |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
155 |         case NSURLAuthenticationMethodClientCertificate:
156 |             if let identity = clientIdentity?() {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:155:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
153 |     ) {
154 |         switch challenge.protectionSpace.authenticationMethod {
155 |         case NSURLAuthenticationMethodClientCertificate:
    |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
156 |             if let identity = clientIdentity?() {
157 |                 completionHandler(
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:164:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
162 |                 completionHandler(.performDefaultHandling, nil)
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
    |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:158:22: error: cannot infer contextual base in reference to member 'useCredential'
156 |             if let identity = clientIdentity?() {
157 |                 completionHandler(
158 |                     .useCredential,
    |                      `- error: cannot infer contextual base in reference to member 'useCredential'
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
160 |                 )
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:21: error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                     `- error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:69: error: 'nil' requires a contextual type
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                                                                     `- error: 'nil' requires a contextual type
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:88: error: cannot infer contextual base in reference to member 'forSession'
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                                                                                        `- error: cannot infer contextual base in reference to member 'forSession'
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:162:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
160 |                 )
161 |             } else {
162 |                 completionHandler(.performDefaultHandling, nil)
    |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:162:60: error: 'nil' requires a contextual type
160 |                 )
161 |             } else {
162 |                 completionHandler(.performDefaultHandling, nil)
    |                                                            `- error: 'nil' requires a contextual type
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:165:72: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
    |                                                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
166 |                 completionHandler(.performDefaultHandling, nil)
167 |                 return
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:166:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
    |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
167 |                 return
168 |             }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:166:60: error: 'nil' requires a contextual type
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
    |                                                            `- error: 'nil' requires a contextual type
167 |                 return
168 |             }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:178:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
176 |             }
177 |         default:
178 |             completionHandler(.performDefaultHandling, nil)
    |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
179 |         }
180 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:178:56: error: 'nil' requires a contextual type
176 |             }
177 |         default:
178 |             completionHandler(.performDefaultHandling, nil)
    |                                                        `- error: 'nil' requires a contextual type
179 |         }
180 |     }
[39/79] Compiling HAKit HARequestInvocation.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:9:80: error: cannot find type 'URLSessionDataDelegate' in scope
  7 | /// evaluation and client-identity (mTLS) challenges, so it serves every connection whether or not a
  8 | /// client identity is provided.
  9 | internal final class HAURLSessionWebSocketEngine: NSObject, HAWebSocketEngine, URLSessionDataDelegate,
    |                                                                                `- error: cannot find type 'URLSessionDataDelegate' in scope
 10 |     URLSessionWebSocketDelegate {
 11 |     /// Home Assistant can deliver large frames (e.g. full state dumps). Raise the receive limit well
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:10:5: error: cannot find type 'URLSessionWebSocketDelegate' in scope
  8 | /// client identity is provided.
  9 | internal final class HAURLSessionWebSocketEngine: NSObject, HAWebSocketEngine, URLSessionDataDelegate,
 10 |     URLSessionWebSocketDelegate {
    |     `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
 11 |     /// Home Assistant can deliver large frames (e.g. full state dumps). Raise the receive limit well
 12 |     /// above `URLSessionWebSocketTask`'s 1 MiB default so those frames aren't rejected.
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:17:19: error: cannot find type 'URLSessionWebSocketTask' in scope
 15 |     private struct State {
 16 |         var session: URLSession?
 17 |         var task: URLSessionWebSocketTask?
    |                   `- error: cannot find type 'URLSessionWebSocketTask' in scope
 18 |     }
 19 |
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:16:22: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 14 |
 15 |     private struct State {
 16 |         var session: URLSession?
    |                      `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 17 |         var task: URLSessionWebSocketTask?
 18 |     }
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/Source/Internal/HAURLSessionWebSocketEngine.swift:42:25: error: cannot find type 'URLRequest' in scope
 40 |     }
 41 |
 42 |     func start(request: URLRequest) {
    |                         `- error: cannot find type 'URLRequest' in scope
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:71:34: error: cannot find type 'URLSessionWebSocketTask' in scope
 69 |
 70 |     /// Atomically clear and return the current task and session.
 71 |     private func takeState() -> (URLSessionWebSocketTask?, URLSession?) {
    |                                  `- error: cannot find type 'URLSessionWebSocketTask' in scope
 72 |         state.mutate { state in
 73 |             defer { state = .init() }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:109:47: error: cannot find type 'URLSessionWebSocketTask' in scope
107 |     }
108 |
109 |     func handleReceiveResult(_ result: Result<URLSessionWebSocketTask.Message, Error>) {
    |                                               `- error: cannot find type 'URLSessionWebSocketTask' in scope
110 |         switch result {
111 |         case let .success(message):
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:129:24: error: cannot find type 'URLSessionWebSocketTask' in scope
127 |     func urlSession(
128 |         _ session: URLSession,
129 |         webSocketTask: URLSessionWebSocketTask,
    |                        `- error: cannot find type 'URLSessionWebSocketTask' in scope
130 |         didOpenWithProtocol protocol: String?
131 |     ) {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:128:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 |
127 |     func urlSession(
128 |         _ session: URLSession,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 |         webSocketTask: URLSessionWebSocketTask,
130 |         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/Source/Internal/HAURLSessionWebSocketEngine.swift:137:24: error: cannot find type 'URLSessionWebSocketTask' in scope
135 |     func urlSession(
136 |         _ session: URLSession,
137 |         webSocketTask: URLSessionWebSocketTask,
    |                        `- error: cannot find type 'URLSessionWebSocketTask' in scope
138 |         didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
139 |         reason: Data?
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:138:33: error: cannot find type 'URLSessionWebSocketTask' in scope
136 |         _ session: URLSession,
137 |         webSocketTask: URLSessionWebSocketTask,
138 |         didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
    |                                 `- error: cannot find type 'URLSessionWebSocketTask' in scope
139 |         reason: Data?
140 |     ) {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:136:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 |
135 |     func urlSession(
136 |         _ session: URLSession,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
137 |         webSocketTask: URLSessionWebSocketTask,
138 |         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/Source/Internal/HAURLSessionWebSocketEngine.swift:145:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
143 |     }
144 |
145 |     func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |         broadcast(event: .error(error))
147 |     }
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/Source/Internal/HAURLSessionWebSocketEngine.swift:145:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
143 |     }
144 |
145 |     func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                                  `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |         broadcast(event: .error(error))
147 |     }
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/Source/Internal/HAURLSessionWebSocketEngine.swift:152:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
150 |         _ session: URLSession,
151 |         didReceive challenge: URLAuthenticationChallenge,
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
    |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
153 |     ) {
154 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:150:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 |     func urlSession(
150 |         _ session: URLSession,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |         didReceive challenge: URLAuthenticationChallenge,
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:151:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
149 |     func urlSession(
150 |         _ session: URLSession,
151 |         didReceive challenge: URLAuthenticationChallenge,
    |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
153 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:43:19: error: cannot find type 'URLSessionWebSocketTask' in scope
 41 |
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
    |                   `- error: cannot find type 'URLSessionWebSocketTask' in scope
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
 45 |             state.session = session
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                            `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:71: error: cannot infer contextual base in reference to member 'default'
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                                                       `- error: cannot infer contextual base in reference to member 'default'
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:111: error: 'nil' requires a contextual type
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                                                                                               `- error: 'nil' requires a contextual type
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:56:25: error: cannot find 'URLSessionWebSocketTask' in scope
 54 |
 55 |     func stop(closeCode: UInt16) {
 56 |         let closeCode = URLSessionWebSocketTask.CloseCode(rawValue: Int(closeCode)) ?? .normalClosure
    |                         `- error: cannot find 'URLSessionWebSocketTask' in scope
 57 |         let (task, session) = takeState()
 58 |         task?.cancel(with: closeCode, reason: nil)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:58:47: error: 'nil' requires a contextual type
 56 |         let closeCode = URLSessionWebSocketTask.CloseCode(rawValue: Int(closeCode)) ?? .normalClosure
 57 |         let (task, session) = takeState()
 58 |         task?.cancel(with: closeCode, reason: nil)
    |                                               `- error: 'nil' requires a contextual type
 59 |         // Invalidating releases the `URLSession`'s strong reference to this engine (its delegate),
 60 |         // breaking the retain cycle; sessions are never reused (`start` creates a fresh one).
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:66:29: error: cannot infer contextual base in reference to member 'abnormalClosure'
 64 |     func forceStop() {
 65 |         let (task, session) = takeState()
 66 |         task?.cancel(with: .abnormalClosure, reason: nil)
    |                             `- error: cannot infer contextual base in reference to member 'abnormalClosure'
 67 |         session?.invalidateAndCancel()
 68 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:66:54: error: 'nil' requires a contextual type
 64 |     func forceStop() {
 65 |         let (task, session) = takeState()
 66 |         task?.cancel(with: .abnormalClosure, reason: nil)
    |                                                      `- error: 'nil' requires a contextual type
 67 |         session?.invalidateAndCancel()
 68 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:80:21: error: cannot infer contextual base in reference to member 'string'
 78 |     func write(string: String, completion: (() -> Void)?) {
 79 |         let task = state.read { $0.task }
 80 |         task?.send(.string(string), completionHandler: sendCompletion(completion))
    |                     `- error: cannot infer contextual base in reference to member 'string'
 81 |     }
 82 |
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:87:25: error: cannot infer contextual base in reference to member 'data'
 85 |         case .binaryFrame:
 86 |             let task = state.read { $0.task }
 87 |             task?.send(.data(data), completionHandler: sendCompletion(completion))
    |                         `- error: cannot infer contextual base in reference to member 'data'
 88 |         case .textFrame:
 89 |             write(string: String(decoding: data, as: UTF8.self), completion: completion)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:105:19: error: reference to member 'handleReceiveResult' cannot be resolved without a contextual type
103 |         let task = state.read { $0.task }
104 |         task?.receive { [weak self] result in
105 |             self?.handleReceiveResult(result)
    |                   `- error: reference to member 'handleReceiveResult' cannot be resolved without a contextual type
106 |         }
107 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:104:37: error: cannot infer type of closure parameter 'result' without a type annotation
102 |     private func doRead() {
103 |         let task = state.read { $0.task }
104 |         task?.receive { [weak self] result in
    |                                     `- error: cannot infer type of closure parameter 'result' without a type annotation
105 |             self?.handleReceiveResult(result)
106 |         }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:154:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
153 |     ) {
154 |         switch challenge.protectionSpace.authenticationMethod {
    |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
155 |         case NSURLAuthenticationMethodClientCertificate:
156 |             if let identity = clientIdentity?() {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:155:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
153 |     ) {
154 |         switch challenge.protectionSpace.authenticationMethod {
155 |         case NSURLAuthenticationMethodClientCertificate:
    |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
156 |             if let identity = clientIdentity?() {
157 |                 completionHandler(
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:164:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
162 |                 completionHandler(.performDefaultHandling, nil)
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
    |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:158:22: error: cannot infer contextual base in reference to member 'useCredential'
156 |             if let identity = clientIdentity?() {
157 |                 completionHandler(
158 |                     .useCredential,
    |                      `- error: cannot infer contextual base in reference to member 'useCredential'
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
160 |                 )
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:21: error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                     `- error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:69: error: 'nil' requires a contextual type
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                                                                     `- error: 'nil' requires a contextual type
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:88: error: cannot infer contextual base in reference to member 'forSession'
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                                                                                        `- error: cannot infer contextual base in reference to member 'forSession'
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:162:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
160 |                 )
161 |             } else {
162 |                 completionHandler(.performDefaultHandling, nil)
    |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:162:60: error: 'nil' requires a contextual type
160 |                 )
161 |             } else {
162 |                 completionHandler(.performDefaultHandling, nil)
    |                                                            `- error: 'nil' requires a contextual type
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:165:72: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
    |                                                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
166 |                 completionHandler(.performDefaultHandling, nil)
167 |                 return
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:166:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
    |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
167 |                 return
168 |             }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:166:60: error: 'nil' requires a contextual type
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
    |                                                            `- error: 'nil' requires a contextual type
167 |                 return
168 |             }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:178:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
176 |             }
177 |         default:
178 |             completionHandler(.performDefaultHandling, nil)
    |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
179 |         }
180 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:178:56: error: 'nil' requires a contextual type
176 |             }
177 |         default:
178 |             completionHandler(.performDefaultHandling, nil)
    |                                                        `- error: 'nil' requires a contextual type
179 |         }
180 |     }
[40/79] Compiling HAKit HARequestInvocationSingle.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:9:80: error: cannot find type 'URLSessionDataDelegate' in scope
  7 | /// evaluation and client-identity (mTLS) challenges, so it serves every connection whether or not a
  8 | /// client identity is provided.
  9 | internal final class HAURLSessionWebSocketEngine: NSObject, HAWebSocketEngine, URLSessionDataDelegate,
    |                                                                                `- error: cannot find type 'URLSessionDataDelegate' in scope
 10 |     URLSessionWebSocketDelegate {
 11 |     /// Home Assistant can deliver large frames (e.g. full state dumps). Raise the receive limit well
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:10:5: error: cannot find type 'URLSessionWebSocketDelegate' in scope
  8 | /// client identity is provided.
  9 | internal final class HAURLSessionWebSocketEngine: NSObject, HAWebSocketEngine, URLSessionDataDelegate,
 10 |     URLSessionWebSocketDelegate {
    |     `- error: cannot find type 'URLSessionWebSocketDelegate' in scope
 11 |     /// Home Assistant can deliver large frames (e.g. full state dumps). Raise the receive limit well
 12 |     /// above `URLSessionWebSocketTask`'s 1 MiB default so those frames aren't rejected.
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:17:19: error: cannot find type 'URLSessionWebSocketTask' in scope
 15 |     private struct State {
 16 |         var session: URLSession?
 17 |         var task: URLSessionWebSocketTask?
    |                   `- error: cannot find type 'URLSessionWebSocketTask' in scope
 18 |     }
 19 |
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:16:22: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 14 |
 15 |     private struct State {
 16 |         var session: URLSession?
    |                      `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 17 |         var task: URLSessionWebSocketTask?
 18 |     }
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/Source/Internal/HAURLSessionWebSocketEngine.swift:42:25: error: cannot find type 'URLRequest' in scope
 40 |     }
 41 |
 42 |     func start(request: URLRequest) {
    |                         `- error: cannot find type 'URLRequest' in scope
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:71:34: error: cannot find type 'URLSessionWebSocketTask' in scope
 69 |
 70 |     /// Atomically clear and return the current task and session.
 71 |     private func takeState() -> (URLSessionWebSocketTask?, URLSession?) {
    |                                  `- error: cannot find type 'URLSessionWebSocketTask' in scope
 72 |         state.mutate { state in
 73 |             defer { state = .init() }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:109:47: error: cannot find type 'URLSessionWebSocketTask' in scope
107 |     }
108 |
109 |     func handleReceiveResult(_ result: Result<URLSessionWebSocketTask.Message, Error>) {
    |                                               `- error: cannot find type 'URLSessionWebSocketTask' in scope
110 |         switch result {
111 |         case let .success(message):
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:129:24: error: cannot find type 'URLSessionWebSocketTask' in scope
127 |     func urlSession(
128 |         _ session: URLSession,
129 |         webSocketTask: URLSessionWebSocketTask,
    |                        `- error: cannot find type 'URLSessionWebSocketTask' in scope
130 |         didOpenWithProtocol protocol: String?
131 |     ) {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:128:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 |
127 |     func urlSession(
128 |         _ session: URLSession,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 |         webSocketTask: URLSessionWebSocketTask,
130 |         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/Source/Internal/HAURLSessionWebSocketEngine.swift:137:24: error: cannot find type 'URLSessionWebSocketTask' in scope
135 |     func urlSession(
136 |         _ session: URLSession,
137 |         webSocketTask: URLSessionWebSocketTask,
    |                        `- error: cannot find type 'URLSessionWebSocketTask' in scope
138 |         didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
139 |         reason: Data?
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:138:33: error: cannot find type 'URLSessionWebSocketTask' in scope
136 |         _ session: URLSession,
137 |         webSocketTask: URLSessionWebSocketTask,
138 |         didCloseWith closeCode: URLSessionWebSocketTask.CloseCode,
    |                                 `- error: cannot find type 'URLSessionWebSocketTask' in scope
139 |         reason: Data?
140 |     ) {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:136:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 |
135 |     func urlSession(
136 |         _ session: URLSession,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
137 |         webSocketTask: URLSessionWebSocketTask,
138 |         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/Source/Internal/HAURLSessionWebSocketEngine.swift:145:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
143 |     }
144 |
145 |     func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |         broadcast(event: .error(error))
147 |     }
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/Source/Internal/HAURLSessionWebSocketEngine.swift:145:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
143 |     }
144 |
145 |     func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                                  `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |         broadcast(event: .error(error))
147 |     }
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/Source/Internal/HAURLSessionWebSocketEngine.swift:152:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
150 |         _ session: URLSession,
151 |         didReceive challenge: URLAuthenticationChallenge,
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
    |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
153 |     ) {
154 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:150:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
148 |
149 |     func urlSession(
150 |         _ session: URLSession,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |         didReceive challenge: URLAuthenticationChallenge,
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:151:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
149 |     func urlSession(
150 |         _ session: URLSession,
151 |         didReceive challenge: URLAuthenticationChallenge,
    |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
153 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:43:19: error: cannot find type 'URLSessionWebSocketTask' in scope
 41 |
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
    |                   `- error: cannot find type 'URLSessionWebSocketTask' in scope
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
 45 |             state.session = session
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                            `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:71: error: cannot infer contextual base in reference to member 'default'
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                                                       `- error: cannot infer contextual base in reference to member 'default'
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:44:111: error: 'nil' requires a contextual type
 42 |     func start(request: URLRequest) {
 43 |         let task: URLSessionWebSocketTask = state.mutate { state in
 44 |             let session = state.session ?? URLSession(configuration: .default, delegate: self, delegateQueue: nil)
    |                                                                                                               `- error: 'nil' requires a contextual type
 45 |             state.session = session
 46 |             let task = session.webSocketTask(with: request)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:56:25: error: cannot find 'URLSessionWebSocketTask' in scope
 54 |
 55 |     func stop(closeCode: UInt16) {
 56 |         let closeCode = URLSessionWebSocketTask.CloseCode(rawValue: Int(closeCode)) ?? .normalClosure
    |                         `- error: cannot find 'URLSessionWebSocketTask' in scope
 57 |         let (task, session) = takeState()
 58 |         task?.cancel(with: closeCode, reason: nil)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:58:47: error: 'nil' requires a contextual type
 56 |         let closeCode = URLSessionWebSocketTask.CloseCode(rawValue: Int(closeCode)) ?? .normalClosure
 57 |         let (task, session) = takeState()
 58 |         task?.cancel(with: closeCode, reason: nil)
    |                                               `- error: 'nil' requires a contextual type
 59 |         // Invalidating releases the `URLSession`'s strong reference to this engine (its delegate),
 60 |         // breaking the retain cycle; sessions are never reused (`start` creates a fresh one).
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:66:29: error: cannot infer contextual base in reference to member 'abnormalClosure'
 64 |     func forceStop() {
 65 |         let (task, session) = takeState()
 66 |         task?.cancel(with: .abnormalClosure, reason: nil)
    |                             `- error: cannot infer contextual base in reference to member 'abnormalClosure'
 67 |         session?.invalidateAndCancel()
 68 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:66:54: error: 'nil' requires a contextual type
 64 |     func forceStop() {
 65 |         let (task, session) = takeState()
 66 |         task?.cancel(with: .abnormalClosure, reason: nil)
    |                                                      `- error: 'nil' requires a contextual type
 67 |         session?.invalidateAndCancel()
 68 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:80:21: error: cannot infer contextual base in reference to member 'string'
 78 |     func write(string: String, completion: (() -> Void)?) {
 79 |         let task = state.read { $0.task }
 80 |         task?.send(.string(string), completionHandler: sendCompletion(completion))
    |                     `- error: cannot infer contextual base in reference to member 'string'
 81 |     }
 82 |
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:87:25: error: cannot infer contextual base in reference to member 'data'
 85 |         case .binaryFrame:
 86 |             let task = state.read { $0.task }
 87 |             task?.send(.data(data), completionHandler: sendCompletion(completion))
    |                         `- error: cannot infer contextual base in reference to member 'data'
 88 |         case .textFrame:
 89 |             write(string: String(decoding: data, as: UTF8.self), completion: completion)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:105:19: error: reference to member 'handleReceiveResult' cannot be resolved without a contextual type
103 |         let task = state.read { $0.task }
104 |         task?.receive { [weak self] result in
105 |             self?.handleReceiveResult(result)
    |                   `- error: reference to member 'handleReceiveResult' cannot be resolved without a contextual type
106 |         }
107 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:104:37: error: cannot infer type of closure parameter 'result' without a type annotation
102 |     private func doRead() {
103 |         let task = state.read { $0.task }
104 |         task?.receive { [weak self] result in
    |                                     `- error: cannot infer type of closure parameter 'result' without a type annotation
105 |             self?.handleReceiveResult(result)
106 |         }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:154:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
152 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
153 |     ) {
154 |         switch challenge.protectionSpace.authenticationMethod {
    |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
155 |         case NSURLAuthenticationMethodClientCertificate:
156 |             if let identity = clientIdentity?() {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:155:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
153 |     ) {
154 |         switch challenge.protectionSpace.authenticationMethod {
155 |         case NSURLAuthenticationMethodClientCertificate:
    |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
156 |             if let identity = clientIdentity?() {
157 |                 completionHandler(
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:164:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
162 |                 completionHandler(.performDefaultHandling, nil)
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
    |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:158:22: error: cannot infer contextual base in reference to member 'useCredential'
156 |             if let identity = clientIdentity?() {
157 |                 completionHandler(
158 |                     .useCredential,
    |                      `- error: cannot infer contextual base in reference to member 'useCredential'
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
160 |                 )
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:21: error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                     `- error: 'URLCredential' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:69: error: 'nil' requires a contextual type
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                                                                     `- error: 'nil' requires a contextual type
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:159:88: error: cannot infer contextual base in reference to member 'forSession'
157 |                 completionHandler(
158 |                     .useCredential,
159 |                     URLCredential(identity: identity, certificates: nil, persistence: .forSession)
    |                                                                                        `- error: cannot infer contextual base in reference to member 'forSession'
160 |                 )
161 |             } else {
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:162:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
160 |                 )
161 |             } else {
162 |                 completionHandler(.performDefaultHandling, nil)
    |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:162:60: error: 'nil' requires a contextual type
160 |                 )
161 |             } else {
162 |                 completionHandler(.performDefaultHandling, nil)
    |                                                            `- error: 'nil' requires a contextual type
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:165:72: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
163 |             }
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
    |                                                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
166 |                 completionHandler(.performDefaultHandling, nil)
167 |                 return
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:166:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
    |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
167 |                 return
168 |             }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:166:60: error: 'nil' requires a contextual type
164 |         case NSURLAuthenticationMethodServerTrust:
165 |             guard let evaluateCertificate, let serverTrust = challenge.protectionSpace.serverTrust else {
166 |                 completionHandler(.performDefaultHandling, nil)
    |                                                            `- error: 'nil' requires a contextual type
167 |                 return
168 |             }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:178:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
176 |             }
177 |         default:
178 |             completionHandler(.performDefaultHandling, nil)
    |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
179 |         }
180 |     }
/host/spi-builder-workspace/Source/Internal/HAURLSessionWebSocketEngine.swift:178:56: error: 'nil' requires a contextual type
176 |             }
177 |         default:
178 |             completionHandler(.performDefaultHandling, nil)
    |                                                        `- error: 'nil' requires a contextual type
179 |         }
180 |     }
[41/79] Compiling HAKit HACachesContainer.swift
/host/spi-builder-workspace/Source/Internal/HAProtected.swift:8:23: error: cannot find type 'os_unfair_lock_t' in scope
 6 | public class HAProtected<ValueType> {
 7 |     private var value: ValueType
 8 |     private let lock: os_unfair_lock_t = {
   |                       `- error: cannot find type 'os_unfair_lock_t' in scope
 9 |         let value = os_unfair_lock_t.allocate(capacity: 1)
10 |         value.initialize(to: os_unfair_lock())
[42/79] Compiling HAKit CurrentUser.swift
/host/spi-builder-workspace/Source/Internal/HAProtected.swift:8:23: error: cannot find type 'os_unfair_lock_t' in scope
 6 | public class HAProtected<ValueType> {
 7 |     private var value: ValueType
 8 |     private let lock: os_unfair_lock_t = {
   |                       `- error: cannot find type 'os_unfair_lock_t' in scope
 9 |         let value = os_unfair_lock_t.allocate(capacity: 1)
10 |         value.initialize(to: os_unfair_lock())
[43/79] Compiling HAKit Event.swift
/host/spi-builder-workspace/Source/Internal/HAProtected.swift:8:23: error: cannot find type 'os_unfair_lock_t' in scope
 6 | public class HAProtected<ValueType> {
 7 |     private var value: ValueType
 8 |     private let lock: os_unfair_lock_t = {
   |                       `- error: cannot find type 'os_unfair_lock_t' in scope
 9 |         let value = os_unfair_lock_t.allocate(capacity: 1)
10 |         value.initialize(to: os_unfair_lock())
[44/79] Compiling HAKit RenderTemplate.swift
/host/spi-builder-workspace/Source/Internal/HAProtected.swift:8:23: error: cannot find type 'os_unfair_lock_t' in scope
 6 | public class HAProtected<ValueType> {
 7 |     private var value: ValueType
 8 |     private let lock: os_unfair_lock_t = {
   |                       `- error: cannot find type 'os_unfair_lock_t' in scope
 9 |         let value = os_unfair_lock_t.allocate(capacity: 1)
10 |         value.initialize(to: os_unfair_lock())
[45/79] Compiling HAKit Services.swift
/host/spi-builder-workspace/Source/Internal/HAProtected.swift:8:23: error: cannot find type 'os_unfair_lock_t' in scope
 6 | public class HAProtected<ValueType> {
 7 |     private var value: ValueType
 8 |     private let lock: os_unfair_lock_t = {
   |                       `- error: cannot find type 'os_unfair_lock_t' in scope
 9 |         let value = os_unfair_lock_t.allocate(capacity: 1)
10 |         value.initialize(to: os_unfair_lock())
[46/79] Compiling HAKit States.swift
/host/spi-builder-workspace/Source/Internal/HAProtected.swift:8:23: error: cannot find type 'os_unfair_lock_t' in scope
 6 | public class HAProtected<ValueType> {
 7 |     private var value: ValueType
 8 |     private let lock: os_unfair_lock_t = {
   |                       `- error: cannot find type 'os_unfair_lock_t' in scope
 9 |         let value = os_unfair_lock_t.allocate(capacity: 1)
10 |         value.initialize(to: os_unfair_lock())
[47/79] Compiling HAKit HACompressedEntity.swift
/host/spi-builder-workspace/Source/Internal/HAProtected.swift:8:23: error: cannot find type 'os_unfair_lock_t' in scope
 6 | public class HAProtected<ValueType> {
 7 |     private var value: ValueType
 8 |     private let lock: os_unfair_lock_t = {
   |                       `- error: cannot find type 'os_unfair_lock_t' in scope
 9 |         let value = os_unfair_lock_t.allocate(capacity: 1)
10 |         value.initialize(to: os_unfair_lock())
/host/spi-builder-workspace/Source/Caches/HACache.swift:440:6: error: Objective-C interoperability is disabled
438 |
439 |     /// Start the prepare -> subscribe lifecycle, if there are subscribers
440 |     @objc private func checkStateAndStart() {
    |      `- error: Objective-C interoperability is disabled
441 |         guard let connection = connection else {
442 |             HAGlobal.log(.error, "not subscribing to connection as the connection no longer exists")
/host/spi-builder-workspace/Source/Caches/HACache.swift:68:23: error: '#selector' can only be used with the Objective-C runtime
 66 |         NotificationCenter.default.addObserver(
 67 |             self,
 68 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 69 |             name: HAConnectionState.didTransitionToStateNotification,
 70 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:95:23: error: '#selector' can only be used with the Objective-C runtime
 93 |         NotificationCenter.default.addObserver(
 94 |             self,
 95 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 96 |             name: HAConnectionState.didTransitionToStateNotification,
 97 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:440:6: error: Objective-C interoperability is disabled
438 |
439 |     /// Start the prepare -> subscribe lifecycle, if there are subscribers
440 |     @objc private func checkStateAndStart() {
    |      `- error: Objective-C interoperability is disabled
441 |         guard let connection = connection else {
442 |             HAGlobal.log(.error, "not subscribing to connection as the connection no longer exists")
/host/spi-builder-workspace/Source/Caches/HACache.swift:68:23: error: '#selector' can only be used with the Objective-C runtime
 66 |         NotificationCenter.default.addObserver(
 67 |             self,
 68 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 69 |             name: HAConnectionState.didTransitionToStateNotification,
 70 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:95:23: error: '#selector' can only be used with the Objective-C runtime
 93 |         NotificationCenter.default.addObserver(
 94 |             self,
 95 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 96 |             name: HAConnectionState.didTransitionToStateNotification,
 97 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:440:6: error: Objective-C interoperability is disabled
438 |
439 |     /// Start the prepare -> subscribe lifecycle, if there are subscribers
440 |     @objc private func checkStateAndStart() {
    |      `- error: Objective-C interoperability is disabled
441 |         guard let connection = connection else {
442 |             HAGlobal.log(.error, "not subscribing to connection as the connection no longer exists")
/host/spi-builder-workspace/Source/Caches/HACache.swift:68:23: error: '#selector' can only be used with the Objective-C runtime
 66 |         NotificationCenter.default.addObserver(
 67 |             self,
 68 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 69 |             name: HAConnectionState.didTransitionToStateNotification,
 70 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:95:23: error: '#selector' can only be used with the Objective-C runtime
 93 |         NotificationCenter.default.addObserver(
 94 |             self,
 95 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 96 |             name: HAConnectionState.didTransitionToStateNotification,
 97 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:440:6: error: Objective-C interoperability is disabled
438 |
439 |     /// Start the prepare -> subscribe lifecycle, if there are subscribers
440 |     @objc private func checkStateAndStart() {
    |      `- error: Objective-C interoperability is disabled
441 |         guard let connection = connection else {
442 |             HAGlobal.log(.error, "not subscribing to connection as the connection no longer exists")
/host/spi-builder-workspace/Source/Caches/HACache.swift:68:23: error: '#selector' can only be used with the Objective-C runtime
 66 |         NotificationCenter.default.addObserver(
 67 |             self,
 68 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 69 |             name: HAConnectionState.didTransitionToStateNotification,
 70 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:95:23: error: '#selector' can only be used with the Objective-C runtime
 93 |         NotificationCenter.default.addObserver(
 94 |             self,
 95 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 96 |             name: HAConnectionState.didTransitionToStateNotification,
 97 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:440:6: error: Objective-C interoperability is disabled
438 |
439 |     /// Start the prepare -> subscribe lifecycle, if there are subscribers
440 |     @objc private func checkStateAndStart() {
    |      `- error: Objective-C interoperability is disabled
441 |         guard let connection = connection else {
442 |             HAGlobal.log(.error, "not subscribing to connection as the connection no longer exists")
/host/spi-builder-workspace/Source/Caches/HACache.swift:68:23: error: '#selector' can only be used with the Objective-C runtime
 66 |         NotificationCenter.default.addObserver(
 67 |             self,
 68 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 69 |             name: HAConnectionState.didTransitionToStateNotification,
 70 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:95:23: error: '#selector' can only be used with the Objective-C runtime
 93 |         NotificationCenter.default.addObserver(
 94 |             self,
 95 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 96 |             name: HAConnectionState.didTransitionToStateNotification,
 97 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:440:6: error: Objective-C interoperability is disabled
438 |
439 |     /// Start the prepare -> subscribe lifecycle, if there are subscribers
440 |     @objc private func checkStateAndStart() {
    |      `- error: Objective-C interoperability is disabled
441 |         guard let connection = connection else {
442 |             HAGlobal.log(.error, "not subscribing to connection as the connection no longer exists")
/host/spi-builder-workspace/Source/Caches/HACache.swift:68:23: error: '#selector' can only be used with the Objective-C runtime
 66 |         NotificationCenter.default.addObserver(
 67 |             self,
 68 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 69 |             name: HAConnectionState.didTransitionToStateNotification,
 70 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:95:23: error: '#selector' can only be used with the Objective-C runtime
 93 |         NotificationCenter.default.addObserver(
 94 |             self,
 95 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 96 |             name: HAConnectionState.didTransitionToStateNotification,
 97 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:440:6: error: Objective-C interoperability is disabled
438 |
439 |     /// Start the prepare -> subscribe lifecycle, if there are subscribers
440 |     @objc private func checkStateAndStart() {
    |      `- error: Objective-C interoperability is disabled
441 |         guard let connection = connection else {
442 |             HAGlobal.log(.error, "not subscribing to connection as the connection no longer exists")
/host/spi-builder-workspace/Source/Caches/HACache.swift:68:23: error: '#selector' can only be used with the Objective-C runtime
 66 |         NotificationCenter.default.addObserver(
 67 |             self,
 68 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 69 |             name: HAConnectionState.didTransitionToStateNotification,
 70 |             object: connection
/host/spi-builder-workspace/Source/Caches/HACache.swift:95:23: error: '#selector' can only be used with the Objective-C runtime
 93 |         NotificationCenter.default.addObserver(
 94 |             self,
 95 |             selector: #selector(checkStateAndStart),
    |                       `- error: '#selector' can only be used with the Objective-C runtime
 96 |             name: HAConnectionState.didTransitionToStateNotification,
 97 |             object: connection
[55/79] Compiling HAKit HAConnectionConfiguration.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:82:40: error: cannot find type 'URLRequest' in scope
 80 |     }
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
    |                                        `- error: cannot find type 'URLRequest' in scope
 83 |         var request = URLRequest(url: url)
 84 |
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:103:10: error: cannot find type 'URLRequest' in scope
101 |         path: String,
102 |         queryItems: [URLQueryItem]
103 |     ) -> URLRequest {
    |          `- error: cannot find type 'URLRequest' in scope
104 |         var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)!
105 |         urlComponents.path += "/" + path
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:31:21: error: 'nil' requires a contextual type
 29 |             evaluateCertificate: evaluateCertificate,
 30 |             clientIdentity: clientIdentity,
 31 |             engine: nil
    |                     `- error: 'nil' requires a contextual type
 32 |         )
 33 |     }
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:15:18: error: cannot find type 'URLRequest' in scope
13 | internal final class HAWebSocket {
14 |     /// The request used to open the connection.
15 |     let request: URLRequest
   |                  `- error: cannot find type 'URLRequest' in scope
16 |
17 |     /// The object notified of connection events.
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:83:23: error: cannot find 'URLRequest' in scope
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
 83 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 84 |
 85 |         if let userAgent = userAgent {
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:23:19: error: cannot find type 'URLRequest' in scope
21 |     private var isStopped = false
22 |
23 |     init(request: URLRequest, engine: HAWebSocketEngine) {
   |                   `- error: cannot find type 'URLRequest' in scope
24 |         self.request = request
25 |         self.engine = engine
/host/spi-builder-workspace/Source/HAKit.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |         configuration: HAConnectionConfiguration,
17 |         connectAutomatically: Bool = true,
18 |         urlSession: URLSession? = nil
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 |     ) -> HAConnection {
20 |         HAConnectionImpl(
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/Source/HAKit.swift:22:36: error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                    `- error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
23 |             connectAutomatically: connectAutomatically
24 |         )
/host/spi-builder-workspace/Source/HAKit.swift:22:40: error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                        `- error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional:2:11: note: missing same-type requirement on 'Self'
1 | @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
2 | extension Optional : DecodableWithConfiguration where Wrapped : DecodableWithConfiguration {
  |           `- note: missing same-type requirement on 'Self'
3 |     public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws
4 |     public typealias DecodingConfiguration = Wrapped.DecodingConfiguration
/host/spi-builder-workspace/Source/HAKit.swift:22:45: error: missing argument for parameter 'from' in call
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                             `- error: missing argument for parameter 'from' in call
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional.init:2:8: note: 'init(from:configuration:)' declared here
1 | generic enum Optional {
2 | public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws}
  |        `- note: 'init(from:configuration:)' declared here
3 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:11:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
12 |     )
13 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:10:24: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 |     ///   - completionHandler: Handler to call with the authentication result
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
   |                        `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
12 |     )
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:20:24: error: cannot find type 'SecTrust' in scope
18 |     ///   - completionHandler: Handler to call with the validation result
19 |     func evaluateServerTrust(
20 |         _ serverTrust: SecTrust,
   |                        `- error: cannot find type 'SecTrust' in scope
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:22:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
20 |         _ serverTrust: SecTrust,
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
23 |     )
24 | }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:48:46: error: cannot find type 'URLSessionDelegate' in scope
46 | /// let connection = HAKit.connection(configuration: config, urlSession: session)
47 | /// ```
48 | public class HAURLSessionDelegate: NSObject, URLSessionDelegate {
   |                                              `- error: cannot find type 'URLSessionDelegate' in scope
49 |     private let certificateProvider: HACertificateProvider
50 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:61:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:59:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 |
58 |     public func urlSession(
59 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:60:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |     public func urlSession(
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
   |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:63:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
   |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
64 |         case NSURLAuthenticationMethodClientCertificate:
65 |             certificateProvider.provideClientCertificate(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:64:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
64 |         case NSURLAuthenticationMethodClientCertificate:
   |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
65 |             certificateProvider.provideClientCertificate(
66 |                 for: challenge,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:70:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
68 |             )
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
   |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
72 |                 certificateProvider.evaluateServerTrust(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:71:44: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
   |                                            `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:74:40: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
74 |                     forHost: challenge.protectionSpace.host,
   |                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
75 |                     completionHandler: completionHandler
76 |                 )
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:60: error: 'nil' requires a contextual type
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                                            `- error: 'nil' requires a contextual type
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
83 |         }
84 |     }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:56: error: 'nil' requires a contextual type
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                                        `- error: 'nil' requires a contextual type
83 |         }
84 |     }
[56/79] Compiling HAKit HAConnectionInfo.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:82:40: error: cannot find type 'URLRequest' in scope
 80 |     }
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
    |                                        `- error: cannot find type 'URLRequest' in scope
 83 |         var request = URLRequest(url: url)
 84 |
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:103:10: error: cannot find type 'URLRequest' in scope
101 |         path: String,
102 |         queryItems: [URLQueryItem]
103 |     ) -> URLRequest {
    |          `- error: cannot find type 'URLRequest' in scope
104 |         var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)!
105 |         urlComponents.path += "/" + path
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:31:21: error: 'nil' requires a contextual type
 29 |             evaluateCertificate: evaluateCertificate,
 30 |             clientIdentity: clientIdentity,
 31 |             engine: nil
    |                     `- error: 'nil' requires a contextual type
 32 |         )
 33 |     }
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:15:18: error: cannot find type 'URLRequest' in scope
13 | internal final class HAWebSocket {
14 |     /// The request used to open the connection.
15 |     let request: URLRequest
   |                  `- error: cannot find type 'URLRequest' in scope
16 |
17 |     /// The object notified of connection events.
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:83:23: error: cannot find 'URLRequest' in scope
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
 83 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 84 |
 85 |         if let userAgent = userAgent {
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:23:19: error: cannot find type 'URLRequest' in scope
21 |     private var isStopped = false
22 |
23 |     init(request: URLRequest, engine: HAWebSocketEngine) {
   |                   `- error: cannot find type 'URLRequest' in scope
24 |         self.request = request
25 |         self.engine = engine
/host/spi-builder-workspace/Source/HAKit.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |         configuration: HAConnectionConfiguration,
17 |         connectAutomatically: Bool = true,
18 |         urlSession: URLSession? = nil
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 |     ) -> HAConnection {
20 |         HAConnectionImpl(
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/Source/HAKit.swift:22:36: error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                    `- error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
23 |             connectAutomatically: connectAutomatically
24 |         )
/host/spi-builder-workspace/Source/HAKit.swift:22:40: error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                        `- error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional:2:11: note: missing same-type requirement on 'Self'
1 | @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
2 | extension Optional : DecodableWithConfiguration where Wrapped : DecodableWithConfiguration {
  |           `- note: missing same-type requirement on 'Self'
3 |     public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws
4 |     public typealias DecodingConfiguration = Wrapped.DecodingConfiguration
/host/spi-builder-workspace/Source/HAKit.swift:22:45: error: missing argument for parameter 'from' in call
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                             `- error: missing argument for parameter 'from' in call
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional.init:2:8: note: 'init(from:configuration:)' declared here
1 | generic enum Optional {
2 | public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws}
  |        `- note: 'init(from:configuration:)' declared here
3 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:11:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
12 |     )
13 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:10:24: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 |     ///   - completionHandler: Handler to call with the authentication result
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
   |                        `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
12 |     )
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:20:24: error: cannot find type 'SecTrust' in scope
18 |     ///   - completionHandler: Handler to call with the validation result
19 |     func evaluateServerTrust(
20 |         _ serverTrust: SecTrust,
   |                        `- error: cannot find type 'SecTrust' in scope
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:22:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
20 |         _ serverTrust: SecTrust,
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
23 |     )
24 | }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:48:46: error: cannot find type 'URLSessionDelegate' in scope
46 | /// let connection = HAKit.connection(configuration: config, urlSession: session)
47 | /// ```
48 | public class HAURLSessionDelegate: NSObject, URLSessionDelegate {
   |                                              `- error: cannot find type 'URLSessionDelegate' in scope
49 |     private let certificateProvider: HACertificateProvider
50 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:61:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:59:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 |
58 |     public func urlSession(
59 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:60:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |     public func urlSession(
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
   |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:63:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
   |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
64 |         case NSURLAuthenticationMethodClientCertificate:
65 |             certificateProvider.provideClientCertificate(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:64:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
64 |         case NSURLAuthenticationMethodClientCertificate:
   |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
65 |             certificateProvider.provideClientCertificate(
66 |                 for: challenge,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:70:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
68 |             )
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
   |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
72 |                 certificateProvider.evaluateServerTrust(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:71:44: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
   |                                            `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:74:40: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
74 |                     forHost: challenge.protectionSpace.host,
   |                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
75 |                     completionHandler: completionHandler
76 |                 )
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:60: error: 'nil' requires a contextual type
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                                            `- error: 'nil' requires a contextual type
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
83 |         }
84 |     }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:56: error: 'nil' requires a contextual type
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                                        `- error: 'nil' requires a contextual type
83 |         }
84 |     }
[57/79] Compiling PromiseKit when.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:82:40: error: cannot find type 'URLRequest' in scope
 80 |     }
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
    |                                        `- error: cannot find type 'URLRequest' in scope
 83 |         var request = URLRequest(url: url)
 84 |
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:103:10: error: cannot find type 'URLRequest' in scope
101 |         path: String,
102 |         queryItems: [URLQueryItem]
103 |     ) -> URLRequest {
    |          `- error: cannot find type 'URLRequest' in scope
104 |         var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)!
105 |         urlComponents.path += "/" + path
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:31:21: error: 'nil' requires a contextual type
 29 |             evaluateCertificate: evaluateCertificate,
 30 |             clientIdentity: clientIdentity,
 31 |             engine: nil
    |                     `- error: 'nil' requires a contextual type
 32 |         )
 33 |     }
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:15:18: error: cannot find type 'URLRequest' in scope
13 | internal final class HAWebSocket {
14 |     /// The request used to open the connection.
15 |     let request: URLRequest
   |                  `- error: cannot find type 'URLRequest' in scope
16 |
17 |     /// The object notified of connection events.
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:83:23: error: cannot find 'URLRequest' in scope
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
 83 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 84 |
 85 |         if let userAgent = userAgent {
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:23:19: error: cannot find type 'URLRequest' in scope
21 |     private var isStopped = false
22 |
23 |     init(request: URLRequest, engine: HAWebSocketEngine) {
   |                   `- error: cannot find type 'URLRequest' in scope
24 |         self.request = request
25 |         self.engine = engine
/host/spi-builder-workspace/Source/HAKit.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |         configuration: HAConnectionConfiguration,
17 |         connectAutomatically: Bool = true,
18 |         urlSession: URLSession? = nil
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 |     ) -> HAConnection {
20 |         HAConnectionImpl(
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/Source/HAKit.swift:22:36: error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                    `- error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
23 |             connectAutomatically: connectAutomatically
24 |         )
/host/spi-builder-workspace/Source/HAKit.swift:22:40: error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                        `- error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional:2:11: note: missing same-type requirement on 'Self'
1 | @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
2 | extension Optional : DecodableWithConfiguration where Wrapped : DecodableWithConfiguration {
  |           `- note: missing same-type requirement on 'Self'
3 |     public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws
4 |     public typealias DecodingConfiguration = Wrapped.DecodingConfiguration
/host/spi-builder-workspace/Source/HAKit.swift:22:45: error: missing argument for parameter 'from' in call
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                             `- error: missing argument for parameter 'from' in call
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional.init:2:8: note: 'init(from:configuration:)' declared here
1 | generic enum Optional {
2 | public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws}
  |        `- note: 'init(from:configuration:)' declared here
3 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:11:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
12 |     )
13 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:10:24: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 |     ///   - completionHandler: Handler to call with the authentication result
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
   |                        `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
12 |     )
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:20:24: error: cannot find type 'SecTrust' in scope
18 |     ///   - completionHandler: Handler to call with the validation result
19 |     func evaluateServerTrust(
20 |         _ serverTrust: SecTrust,
   |                        `- error: cannot find type 'SecTrust' in scope
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:22:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
20 |         _ serverTrust: SecTrust,
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
23 |     )
24 | }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:48:46: error: cannot find type 'URLSessionDelegate' in scope
46 | /// let connection = HAKit.connection(configuration: config, urlSession: session)
47 | /// ```
48 | public class HAURLSessionDelegate: NSObject, URLSessionDelegate {
   |                                              `- error: cannot find type 'URLSessionDelegate' in scope
49 |     private let certificateProvider: HACertificateProvider
50 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:61:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:59:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 |
58 |     public func urlSession(
59 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:60:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |     public func urlSession(
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
   |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:63:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
   |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
64 |         case NSURLAuthenticationMethodClientCertificate:
65 |             certificateProvider.provideClientCertificate(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:64:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
64 |         case NSURLAuthenticationMethodClientCertificate:
   |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
65 |             certificateProvider.provideClientCertificate(
66 |                 for: challenge,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:70:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
68 |             )
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
   |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
72 |                 certificateProvider.evaluateServerTrust(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:71:44: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
   |                                            `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:74:40: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
74 |                     forHost: challenge.protectionSpace.host,
   |                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
75 |                     completionHandler: completionHandler
76 |                 )
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:60: error: 'nil' requires a contextual type
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                                            `- error: 'nil' requires a contextual type
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
83 |         }
84 |     }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:56: error: 'nil' requires a contextual type
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                                        `- error: 'nil' requires a contextual type
83 |         }
84 |     }
[58/79] Compiling PromiseKit resource_bundle_accessor.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:82:40: error: cannot find type 'URLRequest' in scope
 80 |     }
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
    |                                        `- error: cannot find type 'URLRequest' in scope
 83 |         var request = URLRequest(url: url)
 84 |
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:103:10: error: cannot find type 'URLRequest' in scope
101 |         path: String,
102 |         queryItems: [URLQueryItem]
103 |     ) -> URLRequest {
    |          `- error: cannot find type 'URLRequest' in scope
104 |         var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)!
105 |         urlComponents.path += "/" + path
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:31:21: error: 'nil' requires a contextual type
 29 |             evaluateCertificate: evaluateCertificate,
 30 |             clientIdentity: clientIdentity,
 31 |             engine: nil
    |                     `- error: 'nil' requires a contextual type
 32 |         )
 33 |     }
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:15:18: error: cannot find type 'URLRequest' in scope
13 | internal final class HAWebSocket {
14 |     /// The request used to open the connection.
15 |     let request: URLRequest
   |                  `- error: cannot find type 'URLRequest' in scope
16 |
17 |     /// The object notified of connection events.
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:83:23: error: cannot find 'URLRequest' in scope
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
 83 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 84 |
 85 |         if let userAgent = userAgent {
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:23:19: error: cannot find type 'URLRequest' in scope
21 |     private var isStopped = false
22 |
23 |     init(request: URLRequest, engine: HAWebSocketEngine) {
   |                   `- error: cannot find type 'URLRequest' in scope
24 |         self.request = request
25 |         self.engine = engine
/host/spi-builder-workspace/Source/HAKit.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |         configuration: HAConnectionConfiguration,
17 |         connectAutomatically: Bool = true,
18 |         urlSession: URLSession? = nil
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 |     ) -> HAConnection {
20 |         HAConnectionImpl(
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/Source/HAKit.swift:22:36: error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                    `- error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
23 |             connectAutomatically: connectAutomatically
24 |         )
/host/spi-builder-workspace/Source/HAKit.swift:22:40: error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                        `- error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional:2:11: note: missing same-type requirement on 'Self'
1 | @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
2 | extension Optional : DecodableWithConfiguration where Wrapped : DecodableWithConfiguration {
  |           `- note: missing same-type requirement on 'Self'
3 |     public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws
4 |     public typealias DecodingConfiguration = Wrapped.DecodingConfiguration
/host/spi-builder-workspace/Source/HAKit.swift:22:45: error: missing argument for parameter 'from' in call
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                             `- error: missing argument for parameter 'from' in call
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional.init:2:8: note: 'init(from:configuration:)' declared here
1 | generic enum Optional {
2 | public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws}
  |        `- note: 'init(from:configuration:)' declared here
3 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:11:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
12 |     )
13 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:10:24: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 |     ///   - completionHandler: Handler to call with the authentication result
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
   |                        `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
12 |     )
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:20:24: error: cannot find type 'SecTrust' in scope
18 |     ///   - completionHandler: Handler to call with the validation result
19 |     func evaluateServerTrust(
20 |         _ serverTrust: SecTrust,
   |                        `- error: cannot find type 'SecTrust' in scope
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:22:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
20 |         _ serverTrust: SecTrust,
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
23 |     )
24 | }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:48:46: error: cannot find type 'URLSessionDelegate' in scope
46 | /// let connection = HAKit.connection(configuration: config, urlSession: session)
47 | /// ```
48 | public class HAURLSessionDelegate: NSObject, URLSessionDelegate {
   |                                              `- error: cannot find type 'URLSessionDelegate' in scope
49 |     private let certificateProvider: HACertificateProvider
50 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:61:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:59:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 |
58 |     public func urlSession(
59 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:60:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |     public func urlSession(
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
   |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:63:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
   |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
64 |         case NSURLAuthenticationMethodClientCertificate:
65 |             certificateProvider.provideClientCertificate(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:64:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
64 |         case NSURLAuthenticationMethodClientCertificate:
   |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
65 |             certificateProvider.provideClientCertificate(
66 |                 for: challenge,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:70:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
68 |             )
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
   |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
72 |                 certificateProvider.evaluateServerTrust(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:71:44: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
   |                                            `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:74:40: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
74 |                     forHost: challenge.protectionSpace.host,
   |                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
75 |                     completionHandler: completionHandler
76 |                 )
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:60: error: 'nil' requires a contextual type
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                                            `- error: 'nil' requires a contextual type
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
83 |         }
84 |     }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:56: error: 'nil' requires a contextual type
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                                        `- error: 'nil' requires a contextual type
83 |         }
84 |     }
[59/79] Compiling HAKit HAKit.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:82:40: error: cannot find type 'URLRequest' in scope
 80 |     }
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
    |                                        `- error: cannot find type 'URLRequest' in scope
 83 |         var request = URLRequest(url: url)
 84 |
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:103:10: error: cannot find type 'URLRequest' in scope
101 |         path: String,
102 |         queryItems: [URLQueryItem]
103 |     ) -> URLRequest {
    |          `- error: cannot find type 'URLRequest' in scope
104 |         var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)!
105 |         urlComponents.path += "/" + path
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:31:21: error: 'nil' requires a contextual type
 29 |             evaluateCertificate: evaluateCertificate,
 30 |             clientIdentity: clientIdentity,
 31 |             engine: nil
    |                     `- error: 'nil' requires a contextual type
 32 |         )
 33 |     }
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:15:18: error: cannot find type 'URLRequest' in scope
13 | internal final class HAWebSocket {
14 |     /// The request used to open the connection.
15 |     let request: URLRequest
   |                  `- error: cannot find type 'URLRequest' in scope
16 |
17 |     /// The object notified of connection events.
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:83:23: error: cannot find 'URLRequest' in scope
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
 83 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 84 |
 85 |         if let userAgent = userAgent {
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:23:19: error: cannot find type 'URLRequest' in scope
21 |     private var isStopped = false
22 |
23 |     init(request: URLRequest, engine: HAWebSocketEngine) {
   |                   `- error: cannot find type 'URLRequest' in scope
24 |         self.request = request
25 |         self.engine = engine
/host/spi-builder-workspace/Source/HAKit.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |         configuration: HAConnectionConfiguration,
17 |         connectAutomatically: Bool = true,
18 |         urlSession: URLSession? = nil
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 |     ) -> HAConnection {
20 |         HAConnectionImpl(
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/Source/HAKit.swift:22:36: error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                    `- error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
23 |             connectAutomatically: connectAutomatically
24 |         )
/host/spi-builder-workspace/Source/HAKit.swift:22:40: error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                        `- error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional:2:11: note: missing same-type requirement on 'Self'
1 | @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
2 | extension Optional : DecodableWithConfiguration where Wrapped : DecodableWithConfiguration {
  |           `- note: missing same-type requirement on 'Self'
3 |     public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws
4 |     public typealias DecodingConfiguration = Wrapped.DecodingConfiguration
/host/spi-builder-workspace/Source/HAKit.swift:22:45: error: missing argument for parameter 'from' in call
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                             `- error: missing argument for parameter 'from' in call
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional.init:2:8: note: 'init(from:configuration:)' declared here
1 | generic enum Optional {
2 | public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws}
  |        `- note: 'init(from:configuration:)' declared here
3 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:11:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
12 |     )
13 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:10:24: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 |     ///   - completionHandler: Handler to call with the authentication result
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
   |                        `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
12 |     )
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:20:24: error: cannot find type 'SecTrust' in scope
18 |     ///   - completionHandler: Handler to call with the validation result
19 |     func evaluateServerTrust(
20 |         _ serverTrust: SecTrust,
   |                        `- error: cannot find type 'SecTrust' in scope
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:22:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
20 |         _ serverTrust: SecTrust,
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
23 |     )
24 | }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:48:46: error: cannot find type 'URLSessionDelegate' in scope
46 | /// let connection = HAKit.connection(configuration: config, urlSession: session)
47 | /// ```
48 | public class HAURLSessionDelegate: NSObject, URLSessionDelegate {
   |                                              `- error: cannot find type 'URLSessionDelegate' in scope
49 |     private let certificateProvider: HACertificateProvider
50 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:61:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:59:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 |
58 |     public func urlSession(
59 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:60:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |     public func urlSession(
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
   |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:63:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
   |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
64 |         case NSURLAuthenticationMethodClientCertificate:
65 |             certificateProvider.provideClientCertificate(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:64:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
64 |         case NSURLAuthenticationMethodClientCertificate:
   |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
65 |             certificateProvider.provideClientCertificate(
66 |                 for: challenge,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:70:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
68 |             )
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
   |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
72 |                 certificateProvider.evaluateServerTrust(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:71:44: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
   |                                            `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:74:40: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
74 |                     forHost: challenge.protectionSpace.host,
   |                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
75 |                     completionHandler: completionHandler
76 |                 )
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:60: error: 'nil' requires a contextual type
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                                            `- error: 'nil' requires a contextual type
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
83 |         }
84 |     }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:56: error: 'nil' requires a contextual type
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                                        `- error: 'nil' requires a contextual type
83 |         }
84 |     }
[60/79] Compiling HAKit HARequestToken.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:82:40: error: cannot find type 'URLRequest' in scope
 80 |     }
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
    |                                        `- error: cannot find type 'URLRequest' in scope
 83 |         var request = URLRequest(url: url)
 84 |
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:103:10: error: cannot find type 'URLRequest' in scope
101 |         path: String,
102 |         queryItems: [URLQueryItem]
103 |     ) -> URLRequest {
    |          `- error: cannot find type 'URLRequest' in scope
104 |         var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)!
105 |         urlComponents.path += "/" + path
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:31:21: error: 'nil' requires a contextual type
 29 |             evaluateCertificate: evaluateCertificate,
 30 |             clientIdentity: clientIdentity,
 31 |             engine: nil
    |                     `- error: 'nil' requires a contextual type
 32 |         )
 33 |     }
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:15:18: error: cannot find type 'URLRequest' in scope
13 | internal final class HAWebSocket {
14 |     /// The request used to open the connection.
15 |     let request: URLRequest
   |                  `- error: cannot find type 'URLRequest' in scope
16 |
17 |     /// The object notified of connection events.
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:83:23: error: cannot find 'URLRequest' in scope
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
 83 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 84 |
 85 |         if let userAgent = userAgent {
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:23:19: error: cannot find type 'URLRequest' in scope
21 |     private var isStopped = false
22 |
23 |     init(request: URLRequest, engine: HAWebSocketEngine) {
   |                   `- error: cannot find type 'URLRequest' in scope
24 |         self.request = request
25 |         self.engine = engine
/host/spi-builder-workspace/Source/HAKit.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |         configuration: HAConnectionConfiguration,
17 |         connectAutomatically: Bool = true,
18 |         urlSession: URLSession? = nil
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 |     ) -> HAConnection {
20 |         HAConnectionImpl(
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/Source/HAKit.swift:22:36: error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                    `- error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
23 |             connectAutomatically: connectAutomatically
24 |         )
/host/spi-builder-workspace/Source/HAKit.swift:22:40: error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                        `- error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional:2:11: note: missing same-type requirement on 'Self'
1 | @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
2 | extension Optional : DecodableWithConfiguration where Wrapped : DecodableWithConfiguration {
  |           `- note: missing same-type requirement on 'Self'
3 |     public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws
4 |     public typealias DecodingConfiguration = Wrapped.DecodingConfiguration
/host/spi-builder-workspace/Source/HAKit.swift:22:45: error: missing argument for parameter 'from' in call
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                             `- error: missing argument for parameter 'from' in call
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional.init:2:8: note: 'init(from:configuration:)' declared here
1 | generic enum Optional {
2 | public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws}
  |        `- note: 'init(from:configuration:)' declared here
3 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:11:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
12 |     )
13 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:10:24: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 |     ///   - completionHandler: Handler to call with the authentication result
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
   |                        `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
12 |     )
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:20:24: error: cannot find type 'SecTrust' in scope
18 |     ///   - completionHandler: Handler to call with the validation result
19 |     func evaluateServerTrust(
20 |         _ serverTrust: SecTrust,
   |                        `- error: cannot find type 'SecTrust' in scope
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:22:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
20 |         _ serverTrust: SecTrust,
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
23 |     )
24 | }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:48:46: error: cannot find type 'URLSessionDelegate' in scope
46 | /// let connection = HAKit.connection(configuration: config, urlSession: session)
47 | /// ```
48 | public class HAURLSessionDelegate: NSObject, URLSessionDelegate {
   |                                              `- error: cannot find type 'URLSessionDelegate' in scope
49 |     private let certificateProvider: HACertificateProvider
50 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:61:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:59:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 |
58 |     public func urlSession(
59 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:60:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |     public func urlSession(
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
   |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:63:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
   |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
64 |         case NSURLAuthenticationMethodClientCertificate:
65 |             certificateProvider.provideClientCertificate(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:64:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
64 |         case NSURLAuthenticationMethodClientCertificate:
   |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
65 |             certificateProvider.provideClientCertificate(
66 |                 for: challenge,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:70:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
68 |             )
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
   |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
72 |                 certificateProvider.evaluateServerTrust(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:71:44: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
   |                                            `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:74:40: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
74 |                     forHost: challenge.protectionSpace.host,
   |                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
75 |                     completionHandler: completionHandler
76 |                 )
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:60: error: 'nil' requires a contextual type
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                                            `- error: 'nil' requires a contextual type
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
83 |         }
84 |     }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:56: error: 'nil' requires a contextual type
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                                        `- error: 'nil' requires a contextual type
83 |         }
84 |     }
[61/79] Compiling HAKit HAURLSessionDelegate.swift
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:14:45: error: cannot find type 'SecTrust' in scope
 12 |
 13 |     /// Certificate validation handler
 14 |     public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
    |                                             `- error: cannot find type 'SecTrust' in scope
 15 |
 16 |     /// Client identity provider for mTLS
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:17:53: error: cannot find type 'SecIdentity' in scope
 15 |
 16 |     /// Client identity provider for mTLS
 17 |     public typealias ClientIdentityProvider = () -> SecIdentity?
    |                                                     `- error: cannot find type 'SecIdentity' in scope
 18 |
 19 |     /// Create a connection info
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocketEngine.swift:11:25: error: cannot find type 'URLRequest' in scope
 9 |     func register(delegate: HAWebSocketEngineDelegate)
10 |     /// Open the connection for the given request.
11 |     func start(request: URLRequest)
   |                         `- error: cannot find type 'URLRequest' in scope
12 |     /// Close the connection with the given RFC 6455 close code.
13 |     func stop(closeCode: UInt16)
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:82:40: error: cannot find type 'URLRequest' in scope
 80 |     }
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
    |                                        `- error: cannot find type 'URLRequest' in scope
 83 |         var request = URLRequest(url: url)
 84 |
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:103:10: error: cannot find type 'URLRequest' in scope
101 |         path: String,
102 |         queryItems: [URLQueryItem]
103 |     ) -> URLRequest {
    |          `- error: cannot find type 'URLRequest' in scope
104 |         var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)!
105 |         urlComponents.path += "/" + path
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:31:21: error: 'nil' requires a contextual type
 29 |             evaluateCertificate: evaluateCertificate,
 30 |             clientIdentity: clientIdentity,
 31 |             engine: nil
    |                     `- error: 'nil' requires a contextual type
 32 |         )
 33 |     }
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:15:18: error: cannot find type 'URLRequest' in scope
13 | internal final class HAWebSocket {
14 |     /// The request used to open the connection.
15 |     let request: URLRequest
   |                  `- error: cannot find type 'URLRequest' in scope
16 |
17 |     /// The object notified of connection events.
/host/spi-builder-workspace/Source/HAConnectionInfo.swift:83:23: error: cannot find 'URLRequest' in scope
 81 |
 82 |     internal func request(url: URL) -> URLRequest {
 83 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 84 |
 85 |         if let userAgent = userAgent {
/host/spi-builder-workspace/Source/Internal/WebSocket/HAWebSocket.swift:23:19: error: cannot find type 'URLRequest' in scope
21 |     private var isStopped = false
22 |
23 |     init(request: URLRequest, engine: HAWebSocketEngine) {
   |                   `- error: cannot find type 'URLRequest' in scope
24 |         self.request = request
25 |         self.engine = engine
/host/spi-builder-workspace/Source/HAKit.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |         configuration: HAConnectionConfiguration,
17 |         connectAutomatically: Bool = true,
18 |         urlSession: URLSession? = nil
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 |     ) -> HAConnection {
20 |         HAConnectionImpl(
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/Source/HAKit.swift:22:36: error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                    `- error: argument type 'URLSession?' (aka 'Optional<AnyObject>') expected to be an instance of a class or class-constrained type
23 |             connectAutomatically: connectAutomatically
24 |         )
/host/spi-builder-workspace/Source/HAKit.swift:22:40: error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                        `- error: contextual member reference to initializer 'init(from:configuration:)' requires 'Self' constraint in the protocol extension
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional:2:11: note: missing same-type requirement on 'Self'
1 | @available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
2 | extension Optional : DecodableWithConfiguration where Wrapped : DecodableWithConfiguration {
  |           `- note: missing same-type requirement on 'Self'
3 |     public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws
4 |     public typealias DecodingConfiguration = Wrapped.DecodingConfiguration
/host/spi-builder-workspace/Source/HAKit.swift:22:45: error: missing argument for parameter 'from' in call
20 |         HAConnectionImpl(
21 |             configuration: configuration,
22 |             urlSession: urlSession ?? .init(configuration: .ephemeral),
   |                                             `- error: missing argument for parameter 'from' in call
23 |             connectAutomatically: connectAutomatically
24 |         )
FoundationEssentials.Optional.init:2:8: note: 'init(from:configuration:)' declared here
1 | generic enum Optional {
2 | public init(from decoder: any Decoder, configuration: Wrapped.DecodingConfiguration) throws}
  |        `- note: 'init(from:configuration:)' declared here
3 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:11:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
12 |     )
13 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:10:24: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 |     ///   - completionHandler: Handler to call with the authentication result
 9 |     func provideClientCertificate(
10 |         for challenge: URLAuthenticationChallenge,
   |                        `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
12 |     )
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:20:24: error: cannot find type 'SecTrust' in scope
18 |     ///   - completionHandler: Handler to call with the validation result
19 |     func evaluateServerTrust(
20 |         _ serverTrust: SecTrust,
   |                        `- error: cannot find type 'SecTrust' in scope
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:22:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
20 |         _ serverTrust: SecTrust,
21 |         forHost host: String,
22 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
23 |     )
24 | }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:48:46: error: cannot find type 'URLSessionDelegate' in scope
46 | /// let connection = HAKit.connection(configuration: config, urlSession: session)
47 | /// ```
48 | public class HAURLSessionDelegate: NSObject, URLSessionDelegate {
   |                                              `- error: cannot find type 'URLSessionDelegate' in scope
49 |     private let certificateProvider: HACertificateProvider
50 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:61:50: error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
   |                                                  `- error: 'AuthChallengeDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:59:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
57 |
58 |     public func urlSession(
59 |         _ session: URLSession,
   |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |         didReceive challenge: URLAuthenticationChallenge,
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:60:31: error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |     public func urlSession(
59 |         _ session: URLSession,
60 |         didReceive challenge: URLAuthenticationChallenge,
   |                               `- error: 'URLAuthenticationChallenge' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
Foundation.URLAuthenticationChallenge:2:18: note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLAuthenticationChallenge = AnyObject
  |                  `- note: 'URLAuthenticationChallenge' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:63:26: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
61 |         completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
   |                          `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
64 |         case NSURLAuthenticationMethodClientCertificate:
65 |             certificateProvider.provideClientCertificate(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:64:14: error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
62 |     ) {
63 |         switch challenge.protectionSpace.authenticationMethod {
64 |         case NSURLAuthenticationMethodClientCertificate:
   |              `- error: cannot find 'NSURLAuthenticationMethodClientCertificate' in scope
65 |             certificateProvider.provideClientCertificate(
66 |                 for: challenge,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:70:14: error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
68 |             )
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
   |              `- error: cannot find 'NSURLAuthenticationMethodServerTrust' in scope
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
72 |                 certificateProvider.evaluateServerTrust(
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:71:44: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
69 |
70 |         case NSURLAuthenticationMethodServerTrust:
71 |             if let serverTrust = challenge.protectionSpace.serverTrust {
   |                                            `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:74:40: error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
72 |                 certificateProvider.evaluateServerTrust(
73 |                     serverTrust,
74 |                     forHost: challenge.protectionSpace.host,
   |                                        `- error: value of type 'URLAuthenticationChallenge' (aka 'AnyObject') has no member 'protectionSpace'
75 |                     completionHandler: completionHandler
76 |                 )
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:36: error: cannot infer contextual base in reference to member 'performDefaultHandling'
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                    `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:78:60: error: 'nil' requires a contextual type
76 |                 )
77 |             } else {
78 |                 completionHandler(.performDefaultHandling, nil)
   |                                                            `- error: 'nil' requires a contextual type
79 |             }
80 |
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:32: error: cannot infer contextual base in reference to member 'performDefaultHandling'
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                `- error: cannot infer contextual base in reference to member 'performDefaultHandling'
83 |         }
84 |     }
/host/spi-builder-workspace/Source/HAURLSessionDelegate.swift:82:56: error: 'nil' requires a contextual type
80 |
81 |         default:
82 |             completionHandler(.performDefaultHandling, nil)
   |                                                        `- error: 'nil' requires a contextual type
83 |         }
84 |     }
[64/79] Compiling HAKit HAData.swift
[65/79] Compiling HAKit HADataDecodable.swift
[66/79] Compiling HAKit HADecodeTransformable.swift
[67/79] Compiling HAKit HAEntity+CompressedEntity.swift
[68/79] Compiling HAKit HAEntity.swift
[69/79] Compiling HAKit HAService.swift
[70/79] Compiling HAKit HAConnection.swift
BUILD FAILURE 6.3 android