The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build ATProtoKit, reference 0.30.0 (721692), with Swift 6.1 for Wasm on 27 Jun 2025 18:20:00 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:54: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                      `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:81: error: cannot infer contextual base in reference to member 'default'
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                                                 `- error: cannot infer contextual base in reference to member 'default'
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:120:133: error: cannot find type 'URLRequest' in scope
118 |     public func createRequest(forRequest requestURL: URL, andMethod httpMethod: HTTPMethod, acceptValue: String? = "application/json",
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
    |                                                                                                                                     `- error: cannot find type 'URLRequest' in scope
121 |         var request = URLRequest(url: requestURL)
122 |         request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:189:54: error: cannot find type 'URLRequest' in scope
187 |     ///   - decodeTo: The type to decode the response into.
188 |     /// - Returns: An instance of the specified `Decodable` type.
189 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
190 |         let data = try await self.performRequest(request, withEncodingBody: body)
191 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:209:40: error: cannot find type 'URLRequest' in scope
207 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
208 |     /// - Returns: A `Data` object that contains the blob.
209 |     public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                        `- error: cannot find type 'URLRequest' in scope
210 |         let data = try await self.performRequest(request, withEncodingBody: body)
211 |         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:221:54: error: cannot find type 'URLRequest' in scope
219 |     ///   - decodeTo: The type to decode the response into.
220 |     /// - Returns: An instance of the specified `Decodable` type.
221 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
222 |         let urlRequest = request
223 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:247:44: error: cannot find type 'URLRequest' in scope
245 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
246 |     /// - Returns: A tuple containing the data and the HTTPURLResponse.
247 |     private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                            `- error: cannot find type 'URLRequest' in scope
248 |         // Wait for ATRecordTypeRegistry to be ready before proceeding
249 |         await ATRecordTypeRegistry.shared.waitUntilRegistryIsRead()
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:29: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                             `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:97:64: error: reference to member 'default' cannot be resolved without a contextual type
 95 |     ///   - ``APIClientConfiguration``
 96 |     public init(with configuration: APIClientConfiguration) {
 97 |         let config = configuration.urlSessionConfiguration ?? .default
    |                                                                `- error: reference to member 'default' cannot be resolved without a contextual type
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:99:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 97 |         let config = configuration.urlSessionConfiguration ?? .default
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 |         self.executor = configuration.responseProvider
101 |         self.logger = configuration.logger
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:121:23: error: cannot find 'URLRequest' in scope
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
121 |         var request = URLRequest(url: requestURL)
    |                       `- error: cannot find 'URLRequest' in scope
122 |         request.httpMethod = httpMethod.rawValue
123 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:225:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
223 |
224 |         // let (data, response) = try await
225 |         let (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
    |                                                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
226 |
227 |         guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:268:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |
267 |         do {
268 |             let (data, response): (Data, URLResponse)
    |                                          `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |             if let executor = self.executor {
270 |                 (data, response) = try await executor.execute(urlRequest)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:272:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
270 |                 (data, response) = try await executor.execute(urlRequest)
271 |             } else {
272 |                 (data, response) = try await urlSession.data(for: urlRequest)
    |                                                         `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
273 |             }
274 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                            `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                                `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:280:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
280 |                 switch httpResponse.statusCode {
    |                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
281 |                     case 200:
282 |                         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
289 |                         throw ATAPIError.badRequest(error: errorResponse)
290 |                     case 401:
291 |                         let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
292 |                         let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
293 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:327:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
325 |                         throw ATAPIError.payloadTooLarge(error: errorResponse)
326 |                     case 429:
327 |                         let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
    |                                                                                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
328 |                             TimeInterval(retryAfterHeader)
329 |                         } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:375:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 |                     default:
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:376:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
    |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
378 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:113:33: error: cannot find 'DispatchQueue' in scope
111 |
112 |     /// A private dispatch queue for the registry.
113 |     private let registryQueue = DispatchQueue(label: "com.cjrriley.ATProtoKit.ATRecordTypeRegistryQueue")
    |                                 `- error: cannot find 'DispatchQueue' in scope
114 |
115 |     /// A private property of ``recordRegistry``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | }
37 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:42:39: error: cannot find type 'URLRequest' in scope
40 |     ///   - request: The `URLRequest` about to be sent.
41 |     ///   - body: The encoded HTTP body data for the request. Optional.
42 |     public func logRequest(_ request: URLRequest, body: Data?) {
   |                                       `- error: cannot find type 'URLRequest' in scope
43 |         print("\n--- API REQUEST ---")
44 |         print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:62:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |     ///   - data: The raw response data, if any. Optional.
61 |     ///   - error: An `Error` if the request failed. Optional.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
   |                                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                        `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:65:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
   |                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
66 |             print("Headers: \(httpResponse.allHeaderFields)")
67 |         }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:66:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
   |                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
67 |         }
68 |         if let data = data, let jsonStr = String(data: data, encoding: .utf8) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:55:34: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 |     ///   - data: The raw response data, if any. Optional.
54 |     ///   - error: An `Error` if the request failed. Optional.
55 |     func logResponse(_ response: URLResponse?, data: Data?, error: Error?)
   |                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | }
57 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[665/790] Compiling ATProtoKit ExtensionHelpers.swift
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:28:24: error: cannot find type 'URLSessionDelegate' in scope
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
27 |     /// Optional. Defaults to `nil`.
28 |     var delegate: (any URLSessionDelegate)? = nil
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
29 |
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:32:24: error: cannot find type 'OperationQueue' in scope
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
31 |     /// Defaults to `nil`.
32 |     var delegateQueue: OperationQueue? = nil
   |                        `- error: cannot find type 'OperationQueue' in scope
33 |
34 |     /// A provider used for the response of the `URLRequest`. Optional. Defaults to `nil`.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:29: error: cannot find type 'URLRequest' in scope
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                             `- error: cannot find type 'URLRequest' in scope
36 | }
37 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:44:32: error: cannot find type 'URLRequest' in scope
42 |     ///   - request: The `URLRequest` about to be sent.
43 |     ///   - body: The encoded HTTP body data for the request. Optional.
44 |     func logRequest(_ request: URLRequest, body: Data?)
   |                                `- error: cannot find type 'URLRequest' in scope
45 |
46 |     /// Creates a log immediately after a response is received (or a request fails).
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:54:24: error: cannot find type 'URLSessionDelegate' in scope
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
55 |         delegateQueue: OperationQueue? = nil,
56 |         responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:55:24: error: cannot find type 'OperationQueue' in scope
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
   |                        `- error: cannot find type 'OperationQueue' in scope
56 |         responseProvider: ATRequestExecutor? = nil,
57 |         logger: SessionDebuggable? = nil
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:53:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 |     ///   Defaults to `nil`.
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:9: warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |         `- warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:54: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                      `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:81: error: cannot infer contextual base in reference to member 'default'
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                                                 `- error: cannot infer contextual base in reference to member 'default'
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:120:133: error: cannot find type 'URLRequest' in scope
118 |     public func createRequest(forRequest requestURL: URL, andMethod httpMethod: HTTPMethod, acceptValue: String? = "application/json",
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
    |                                                                                                                                     `- error: cannot find type 'URLRequest' in scope
121 |         var request = URLRequest(url: requestURL)
122 |         request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:189:54: error: cannot find type 'URLRequest' in scope
187 |     ///   - decodeTo: The type to decode the response into.
188 |     /// - Returns: An instance of the specified `Decodable` type.
189 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
190 |         let data = try await self.performRequest(request, withEncodingBody: body)
191 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:209:40: error: cannot find type 'URLRequest' in scope
207 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
208 |     /// - Returns: A `Data` object that contains the blob.
209 |     public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                        `- error: cannot find type 'URLRequest' in scope
210 |         let data = try await self.performRequest(request, withEncodingBody: body)
211 |         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:221:54: error: cannot find type 'URLRequest' in scope
219 |     ///   - decodeTo: The type to decode the response into.
220 |     /// - Returns: An instance of the specified `Decodable` type.
221 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
222 |         let urlRequest = request
223 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:247:44: error: cannot find type 'URLRequest' in scope
245 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
246 |     /// - Returns: A tuple containing the data and the HTTPURLResponse.
247 |     private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                            `- error: cannot find type 'URLRequest' in scope
248 |         // Wait for ATRecordTypeRegistry to be ready before proceeding
249 |         await ATRecordTypeRegistry.shared.waitUntilRegistryIsRead()
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:29: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                             `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:97:64: error: reference to member 'default' cannot be resolved without a contextual type
 95 |     ///   - ``APIClientConfiguration``
 96 |     public init(with configuration: APIClientConfiguration) {
 97 |         let config = configuration.urlSessionConfiguration ?? .default
    |                                                                `- error: reference to member 'default' cannot be resolved without a contextual type
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:99:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 97 |         let config = configuration.urlSessionConfiguration ?? .default
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 |         self.executor = configuration.responseProvider
101 |         self.logger = configuration.logger
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:121:23: error: cannot find 'URLRequest' in scope
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
121 |         var request = URLRequest(url: requestURL)
    |                       `- error: cannot find 'URLRequest' in scope
122 |         request.httpMethod = httpMethod.rawValue
123 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:225:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
223 |
224 |         // let (data, response) = try await
225 |         let (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
    |                                                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
226 |
227 |         guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:268:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |
267 |         do {
268 |             let (data, response): (Data, URLResponse)
    |                                          `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |             if let executor = self.executor {
270 |                 (data, response) = try await executor.execute(urlRequest)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:272:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
270 |                 (data, response) = try await executor.execute(urlRequest)
271 |             } else {
272 |                 (data, response) = try await urlSession.data(for: urlRequest)
    |                                                         `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
273 |             }
274 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                            `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                                `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:280:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
280 |                 switch httpResponse.statusCode {
    |                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
281 |                     case 200:
282 |                         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
289 |                         throw ATAPIError.badRequest(error: errorResponse)
290 |                     case 401:
291 |                         let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
292 |                         let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
293 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:327:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
325 |                         throw ATAPIError.payloadTooLarge(error: errorResponse)
326 |                     case 429:
327 |                         let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
    |                                                                                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
328 |                             TimeInterval(retryAfterHeader)
329 |                         } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:375:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 |                     default:
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:376:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
    |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
378 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:113:33: error: cannot find 'DispatchQueue' in scope
111 |
112 |     /// A private dispatch queue for the registry.
113 |     private let registryQueue = DispatchQueue(label: "com.cjrriley.ATProtoKit.ATRecordTypeRegistryQueue")
    |                                 `- error: cannot find 'DispatchQueue' in scope
114 |
115 |     /// A private property of ``recordRegistry``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | }
37 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:42:39: error: cannot find type 'URLRequest' in scope
40 |     ///   - request: The `URLRequest` about to be sent.
41 |     ///   - body: The encoded HTTP body data for the request. Optional.
42 |     public func logRequest(_ request: URLRequest, body: Data?) {
   |                                       `- error: cannot find type 'URLRequest' in scope
43 |         print("\n--- API REQUEST ---")
44 |         print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:62:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |     ///   - data: The raw response data, if any. Optional.
61 |     ///   - error: An `Error` if the request failed. Optional.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
   |                                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                        `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:65:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
   |                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
66 |             print("Headers: \(httpResponse.allHeaderFields)")
67 |         }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:66:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
   |                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
67 |         }
68 |         if let data = data, let jsonStr = String(data: data, encoding: .utf8) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:55:34: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 |     ///   - data: The raw response data, if any. Optional.
54 |     ///   - error: An `Error` if the request failed. Optional.
55 |     func logResponse(_ response: URLResponse?, data: Data?, error: Error?)
   |                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | }
57 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[666/790] Compiling ATProtoKit TruncatedEncoding.swift
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:28:24: error: cannot find type 'URLSessionDelegate' in scope
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
27 |     /// Optional. Defaults to `nil`.
28 |     var delegate: (any URLSessionDelegate)? = nil
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
29 |
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:32:24: error: cannot find type 'OperationQueue' in scope
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
31 |     /// Defaults to `nil`.
32 |     var delegateQueue: OperationQueue? = nil
   |                        `- error: cannot find type 'OperationQueue' in scope
33 |
34 |     /// A provider used for the response of the `URLRequest`. Optional. Defaults to `nil`.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:29: error: cannot find type 'URLRequest' in scope
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                             `- error: cannot find type 'URLRequest' in scope
36 | }
37 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:44:32: error: cannot find type 'URLRequest' in scope
42 |     ///   - request: The `URLRequest` about to be sent.
43 |     ///   - body: The encoded HTTP body data for the request. Optional.
44 |     func logRequest(_ request: URLRequest, body: Data?)
   |                                `- error: cannot find type 'URLRequest' in scope
45 |
46 |     /// Creates a log immediately after a response is received (or a request fails).
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:54:24: error: cannot find type 'URLSessionDelegate' in scope
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
55 |         delegateQueue: OperationQueue? = nil,
56 |         responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:55:24: error: cannot find type 'OperationQueue' in scope
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
   |                        `- error: cannot find type 'OperationQueue' in scope
56 |         responseProvider: ATRequestExecutor? = nil,
57 |         logger: SessionDebuggable? = nil
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:53:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 |     ///   Defaults to `nil`.
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:9: warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |         `- warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:54: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                      `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:81: error: cannot infer contextual base in reference to member 'default'
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                                                 `- error: cannot infer contextual base in reference to member 'default'
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:120:133: error: cannot find type 'URLRequest' in scope
118 |     public func createRequest(forRequest requestURL: URL, andMethod httpMethod: HTTPMethod, acceptValue: String? = "application/json",
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
    |                                                                                                                                     `- error: cannot find type 'URLRequest' in scope
121 |         var request = URLRequest(url: requestURL)
122 |         request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:189:54: error: cannot find type 'URLRequest' in scope
187 |     ///   - decodeTo: The type to decode the response into.
188 |     /// - Returns: An instance of the specified `Decodable` type.
189 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
190 |         let data = try await self.performRequest(request, withEncodingBody: body)
191 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:209:40: error: cannot find type 'URLRequest' in scope
207 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
208 |     /// - Returns: A `Data` object that contains the blob.
209 |     public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                        `- error: cannot find type 'URLRequest' in scope
210 |         let data = try await self.performRequest(request, withEncodingBody: body)
211 |         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:221:54: error: cannot find type 'URLRequest' in scope
219 |     ///   - decodeTo: The type to decode the response into.
220 |     /// - Returns: An instance of the specified `Decodable` type.
221 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
222 |         let urlRequest = request
223 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:247:44: error: cannot find type 'URLRequest' in scope
245 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
246 |     /// - Returns: A tuple containing the data and the HTTPURLResponse.
247 |     private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                            `- error: cannot find type 'URLRequest' in scope
248 |         // Wait for ATRecordTypeRegistry to be ready before proceeding
249 |         await ATRecordTypeRegistry.shared.waitUntilRegistryIsRead()
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:29: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                             `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:97:64: error: reference to member 'default' cannot be resolved without a contextual type
 95 |     ///   - ``APIClientConfiguration``
 96 |     public init(with configuration: APIClientConfiguration) {
 97 |         let config = configuration.urlSessionConfiguration ?? .default
    |                                                                `- error: reference to member 'default' cannot be resolved without a contextual type
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:99:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 97 |         let config = configuration.urlSessionConfiguration ?? .default
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 |         self.executor = configuration.responseProvider
101 |         self.logger = configuration.logger
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:121:23: error: cannot find 'URLRequest' in scope
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
121 |         var request = URLRequest(url: requestURL)
    |                       `- error: cannot find 'URLRequest' in scope
122 |         request.httpMethod = httpMethod.rawValue
123 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:225:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
223 |
224 |         // let (data, response) = try await
225 |         let (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
    |                                                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
226 |
227 |         guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:268:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |
267 |         do {
268 |             let (data, response): (Data, URLResponse)
    |                                          `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |             if let executor = self.executor {
270 |                 (data, response) = try await executor.execute(urlRequest)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:272:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
270 |                 (data, response) = try await executor.execute(urlRequest)
271 |             } else {
272 |                 (data, response) = try await urlSession.data(for: urlRequest)
    |                                                         `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
273 |             }
274 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                            `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                                `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:280:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
280 |                 switch httpResponse.statusCode {
    |                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
281 |                     case 200:
282 |                         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
289 |                         throw ATAPIError.badRequest(error: errorResponse)
290 |                     case 401:
291 |                         let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
292 |                         let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
293 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:327:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
325 |                         throw ATAPIError.payloadTooLarge(error: errorResponse)
326 |                     case 429:
327 |                         let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
    |                                                                                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
328 |                             TimeInterval(retryAfterHeader)
329 |                         } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:375:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 |                     default:
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:376:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
    |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
378 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:113:33: error: cannot find 'DispatchQueue' in scope
111 |
112 |     /// A private dispatch queue for the registry.
113 |     private let registryQueue = DispatchQueue(label: "com.cjrriley.ATProtoKit.ATRecordTypeRegistryQueue")
    |                                 `- error: cannot find 'DispatchQueue' in scope
114 |
115 |     /// A private property of ``recordRegistry``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | }
37 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:42:39: error: cannot find type 'URLRequest' in scope
40 |     ///   - request: The `URLRequest` about to be sent.
41 |     ///   - body: The encoded HTTP body data for the request. Optional.
42 |     public func logRequest(_ request: URLRequest, body: Data?) {
   |                                       `- error: cannot find type 'URLRequest' in scope
43 |         print("\n--- API REQUEST ---")
44 |         print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:62:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |     ///   - data: The raw response data, if any. Optional.
61 |     ///   - error: An `Error` if the request failed. Optional.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
   |                                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                        `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:65:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
   |                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
66 |             print("Headers: \(httpResponse.allHeaderFields)")
67 |         }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:66:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
   |                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
67 |         }
68 |         if let data = data, let jsonStr = String(data: data, encoding: .utf8) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:55:34: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 |     ///   - data: The raw response data, if any. Optional.
54 |     ///   - error: An `Error` if the request failed. Optional.
55 |     func logResponse(_ response: URLResponse?, data: Data?, error: Error?)
   |                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | }
57 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[667/790] Compiling ATProtoKit ConsoleDebugger.swift
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:28:24: error: cannot find type 'URLSessionDelegate' in scope
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
27 |     /// Optional. Defaults to `nil`.
28 |     var delegate: (any URLSessionDelegate)? = nil
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
29 |
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:32:24: error: cannot find type 'OperationQueue' in scope
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
31 |     /// Defaults to `nil`.
32 |     var delegateQueue: OperationQueue? = nil
   |                        `- error: cannot find type 'OperationQueue' in scope
33 |
34 |     /// A provider used for the response of the `URLRequest`. Optional. Defaults to `nil`.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:29: error: cannot find type 'URLRequest' in scope
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                             `- error: cannot find type 'URLRequest' in scope
36 | }
37 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:44:32: error: cannot find type 'URLRequest' in scope
42 |     ///   - request: The `URLRequest` about to be sent.
43 |     ///   - body: The encoded HTTP body data for the request. Optional.
44 |     func logRequest(_ request: URLRequest, body: Data?)
   |                                `- error: cannot find type 'URLRequest' in scope
45 |
46 |     /// Creates a log immediately after a response is received (or a request fails).
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:54:24: error: cannot find type 'URLSessionDelegate' in scope
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
55 |         delegateQueue: OperationQueue? = nil,
56 |         responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:55:24: error: cannot find type 'OperationQueue' in scope
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
   |                        `- error: cannot find type 'OperationQueue' in scope
56 |         responseProvider: ATRequestExecutor? = nil,
57 |         logger: SessionDebuggable? = nil
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:53:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 |     ///   Defaults to `nil`.
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:9: warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |         `- warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:54: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                      `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:81: error: cannot infer contextual base in reference to member 'default'
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                                                 `- error: cannot infer contextual base in reference to member 'default'
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:120:133: error: cannot find type 'URLRequest' in scope
118 |     public func createRequest(forRequest requestURL: URL, andMethod httpMethod: HTTPMethod, acceptValue: String? = "application/json",
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
    |                                                                                                                                     `- error: cannot find type 'URLRequest' in scope
121 |         var request = URLRequest(url: requestURL)
122 |         request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:189:54: error: cannot find type 'URLRequest' in scope
187 |     ///   - decodeTo: The type to decode the response into.
188 |     /// - Returns: An instance of the specified `Decodable` type.
189 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
190 |         let data = try await self.performRequest(request, withEncodingBody: body)
191 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:209:40: error: cannot find type 'URLRequest' in scope
207 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
208 |     /// - Returns: A `Data` object that contains the blob.
209 |     public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                        `- error: cannot find type 'URLRequest' in scope
210 |         let data = try await self.performRequest(request, withEncodingBody: body)
211 |         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:221:54: error: cannot find type 'URLRequest' in scope
219 |     ///   - decodeTo: The type to decode the response into.
220 |     /// - Returns: An instance of the specified `Decodable` type.
221 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
222 |         let urlRequest = request
223 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:247:44: error: cannot find type 'URLRequest' in scope
245 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
246 |     /// - Returns: A tuple containing the data and the HTTPURLResponse.
247 |     private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                            `- error: cannot find type 'URLRequest' in scope
248 |         // Wait for ATRecordTypeRegistry to be ready before proceeding
249 |         await ATRecordTypeRegistry.shared.waitUntilRegistryIsRead()
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:29: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                             `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:97:64: error: reference to member 'default' cannot be resolved without a contextual type
 95 |     ///   - ``APIClientConfiguration``
 96 |     public init(with configuration: APIClientConfiguration) {
 97 |         let config = configuration.urlSessionConfiguration ?? .default
    |                                                                `- error: reference to member 'default' cannot be resolved without a contextual type
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:99:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 97 |         let config = configuration.urlSessionConfiguration ?? .default
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 |         self.executor = configuration.responseProvider
101 |         self.logger = configuration.logger
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:121:23: error: cannot find 'URLRequest' in scope
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
121 |         var request = URLRequest(url: requestURL)
    |                       `- error: cannot find 'URLRequest' in scope
122 |         request.httpMethod = httpMethod.rawValue
123 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:225:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
223 |
224 |         // let (data, response) = try await
225 |         let (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
    |                                                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
226 |
227 |         guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:268:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |
267 |         do {
268 |             let (data, response): (Data, URLResponse)
    |                                          `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |             if let executor = self.executor {
270 |                 (data, response) = try await executor.execute(urlRequest)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:272:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
270 |                 (data, response) = try await executor.execute(urlRequest)
271 |             } else {
272 |                 (data, response) = try await urlSession.data(for: urlRequest)
    |                                                         `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
273 |             }
274 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                            `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                                `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:280:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
280 |                 switch httpResponse.statusCode {
    |                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
281 |                     case 200:
282 |                         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
289 |                         throw ATAPIError.badRequest(error: errorResponse)
290 |                     case 401:
291 |                         let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
292 |                         let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
293 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:327:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
325 |                         throw ATAPIError.payloadTooLarge(error: errorResponse)
326 |                     case 429:
327 |                         let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
    |                                                                                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
328 |                             TimeInterval(retryAfterHeader)
329 |                         } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:375:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 |                     default:
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:376:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
    |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
378 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:113:33: error: cannot find 'DispatchQueue' in scope
111 |
112 |     /// A private dispatch queue for the registry.
113 |     private let registryQueue = DispatchQueue(label: "com.cjrriley.ATProtoKit.ATRecordTypeRegistryQueue")
    |                                 `- error: cannot find 'DispatchQueue' in scope
114 |
115 |     /// A private property of ``recordRegistry``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | }
37 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:42:39: error: cannot find type 'URLRequest' in scope
40 |     ///   - request: The `URLRequest` about to be sent.
41 |     ///   - body: The encoded HTTP body data for the request. Optional.
42 |     public func logRequest(_ request: URLRequest, body: Data?) {
   |                                       `- error: cannot find type 'URLRequest' in scope
43 |         print("\n--- API REQUEST ---")
44 |         print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:62:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |     ///   - data: The raw response data, if any. Optional.
61 |     ///   - error: An `Error` if the request failed. Optional.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
   |                                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                        `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:65:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
   |                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
66 |             print("Headers: \(httpResponse.allHeaderFields)")
67 |         }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:66:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
   |                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
67 |         }
68 |         if let data = data, let jsonStr = String(data: data, encoding: .utf8) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:55:34: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 |     ///   - data: The raw response data, if any. Optional.
54 |     ///   - error: An `Error` if the request failed. Optional.
55 |     func logResponse(_ response: URLResponse?, data: Data?, error: Error?)
   |                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | }
57 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[668/790] Compiling ATProtoKit Logging.swift
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:28:24: error: cannot find type 'URLSessionDelegate' in scope
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
27 |     /// Optional. Defaults to `nil`.
28 |     var delegate: (any URLSessionDelegate)? = nil
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
29 |
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:32:24: error: cannot find type 'OperationQueue' in scope
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
31 |     /// Defaults to `nil`.
32 |     var delegateQueue: OperationQueue? = nil
   |                        `- error: cannot find type 'OperationQueue' in scope
33 |
34 |     /// A provider used for the response of the `URLRequest`. Optional. Defaults to `nil`.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:29: error: cannot find type 'URLRequest' in scope
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                             `- error: cannot find type 'URLRequest' in scope
36 | }
37 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:44:32: error: cannot find type 'URLRequest' in scope
42 |     ///   - request: The `URLRequest` about to be sent.
43 |     ///   - body: The encoded HTTP body data for the request. Optional.
44 |     func logRequest(_ request: URLRequest, body: Data?)
   |                                `- error: cannot find type 'URLRequest' in scope
45 |
46 |     /// Creates a log immediately after a response is received (or a request fails).
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:54:24: error: cannot find type 'URLSessionDelegate' in scope
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
55 |         delegateQueue: OperationQueue? = nil,
56 |         responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:55:24: error: cannot find type 'OperationQueue' in scope
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
   |                        `- error: cannot find type 'OperationQueue' in scope
56 |         responseProvider: ATRequestExecutor? = nil,
57 |         logger: SessionDebuggable? = nil
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:53:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 |     ///   Defaults to `nil`.
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:9: warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |         `- warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:54: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                      `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:81: error: cannot infer contextual base in reference to member 'default'
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                                                 `- error: cannot infer contextual base in reference to member 'default'
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:120:133: error: cannot find type 'URLRequest' in scope
118 |     public func createRequest(forRequest requestURL: URL, andMethod httpMethod: HTTPMethod, acceptValue: String? = "application/json",
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
    |                                                                                                                                     `- error: cannot find type 'URLRequest' in scope
121 |         var request = URLRequest(url: requestURL)
122 |         request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:189:54: error: cannot find type 'URLRequest' in scope
187 |     ///   - decodeTo: The type to decode the response into.
188 |     /// - Returns: An instance of the specified `Decodable` type.
189 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
190 |         let data = try await self.performRequest(request, withEncodingBody: body)
191 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:209:40: error: cannot find type 'URLRequest' in scope
207 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
208 |     /// - Returns: A `Data` object that contains the blob.
209 |     public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                        `- error: cannot find type 'URLRequest' in scope
210 |         let data = try await self.performRequest(request, withEncodingBody: body)
211 |         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:221:54: error: cannot find type 'URLRequest' in scope
219 |     ///   - decodeTo: The type to decode the response into.
220 |     /// - Returns: An instance of the specified `Decodable` type.
221 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
222 |         let urlRequest = request
223 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:247:44: error: cannot find type 'URLRequest' in scope
245 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
246 |     /// - Returns: A tuple containing the data and the HTTPURLResponse.
247 |     private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                            `- error: cannot find type 'URLRequest' in scope
248 |         // Wait for ATRecordTypeRegistry to be ready before proceeding
249 |         await ATRecordTypeRegistry.shared.waitUntilRegistryIsRead()
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:29: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                             `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:97:64: error: reference to member 'default' cannot be resolved without a contextual type
 95 |     ///   - ``APIClientConfiguration``
 96 |     public init(with configuration: APIClientConfiguration) {
 97 |         let config = configuration.urlSessionConfiguration ?? .default
    |                                                                `- error: reference to member 'default' cannot be resolved without a contextual type
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:99:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 97 |         let config = configuration.urlSessionConfiguration ?? .default
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 |         self.executor = configuration.responseProvider
101 |         self.logger = configuration.logger
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:121:23: error: cannot find 'URLRequest' in scope
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
121 |         var request = URLRequest(url: requestURL)
    |                       `- error: cannot find 'URLRequest' in scope
122 |         request.httpMethod = httpMethod.rawValue
123 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:225:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
223 |
224 |         // let (data, response) = try await
225 |         let (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
    |                                                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
226 |
227 |         guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:268:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |
267 |         do {
268 |             let (data, response): (Data, URLResponse)
    |                                          `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |             if let executor = self.executor {
270 |                 (data, response) = try await executor.execute(urlRequest)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:272:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
270 |                 (data, response) = try await executor.execute(urlRequest)
271 |             } else {
272 |                 (data, response) = try await urlSession.data(for: urlRequest)
    |                                                         `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
273 |             }
274 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                            `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                                `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:280:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
280 |                 switch httpResponse.statusCode {
    |                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
281 |                     case 200:
282 |                         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
289 |                         throw ATAPIError.badRequest(error: errorResponse)
290 |                     case 401:
291 |                         let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
292 |                         let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
293 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:327:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
325 |                         throw ATAPIError.payloadTooLarge(error: errorResponse)
326 |                     case 429:
327 |                         let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
    |                                                                                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
328 |                             TimeInterval(retryAfterHeader)
329 |                         } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:375:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 |                     default:
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:376:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
    |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
378 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:113:33: error: cannot find 'DispatchQueue' in scope
111 |
112 |     /// A private dispatch queue for the registry.
113 |     private let registryQueue = DispatchQueue(label: "com.cjrriley.ATProtoKit.ATRecordTypeRegistryQueue")
    |                                 `- error: cannot find 'DispatchQueue' in scope
114 |
115 |     /// A private property of ``recordRegistry``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | }
37 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:42:39: error: cannot find type 'URLRequest' in scope
40 |     ///   - request: The `URLRequest` about to be sent.
41 |     ///   - body: The encoded HTTP body data for the request. Optional.
42 |     public func logRequest(_ request: URLRequest, body: Data?) {
   |                                       `- error: cannot find type 'URLRequest' in scope
43 |         print("\n--- API REQUEST ---")
44 |         print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:62:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |     ///   - data: The raw response data, if any. Optional.
61 |     ///   - error: An `Error` if the request failed. Optional.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
   |                                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                        `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:65:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
   |                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
66 |             print("Headers: \(httpResponse.allHeaderFields)")
67 |         }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:66:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
   |                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
67 |         }
68 |         if let data = data, let jsonStr = String(data: data, encoding: .utf8) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:55:34: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 |     ///   - data: The raw response data, if any. Optional.
54 |     ///   - error: An `Error` if the request failed. Optional.
55 |     func logResponse(_ response: URLResponse?, data: Data?, error: Error?)
   |                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | }
57 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[669/790] Compiling ATProtoKit LoggingBootStrapping.swift
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:28:24: error: cannot find type 'URLSessionDelegate' in scope
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
27 |     /// Optional. Defaults to `nil`.
28 |     var delegate: (any URLSessionDelegate)? = nil
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
29 |
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:32:24: error: cannot find type 'OperationQueue' in scope
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
31 |     /// Defaults to `nil`.
32 |     var delegateQueue: OperationQueue? = nil
   |                        `- error: cannot find type 'OperationQueue' in scope
33 |
34 |     /// A provider used for the response of the `URLRequest`. Optional. Defaults to `nil`.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:29: error: cannot find type 'URLRequest' in scope
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                             `- error: cannot find type 'URLRequest' in scope
36 | }
37 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:44:32: error: cannot find type 'URLRequest' in scope
42 |     ///   - request: The `URLRequest` about to be sent.
43 |     ///   - body: The encoded HTTP body data for the request. Optional.
44 |     func logRequest(_ request: URLRequest, body: Data?)
   |                                `- error: cannot find type 'URLRequest' in scope
45 |
46 |     /// Creates a log immediately after a response is received (or a request fails).
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:54:24: error: cannot find type 'URLSessionDelegate' in scope
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
55 |         delegateQueue: OperationQueue? = nil,
56 |         responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:55:24: error: cannot find type 'OperationQueue' in scope
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
   |                        `- error: cannot find type 'OperationQueue' in scope
56 |         responseProvider: ATRequestExecutor? = nil,
57 |         logger: SessionDebuggable? = nil
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:53:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 |     ///   Defaults to `nil`.
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:9: warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |         `- warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:54: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                      `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:81: error: cannot infer contextual base in reference to member 'default'
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                                                 `- error: cannot infer contextual base in reference to member 'default'
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:120:133: error: cannot find type 'URLRequest' in scope
118 |     public func createRequest(forRequest requestURL: URL, andMethod httpMethod: HTTPMethod, acceptValue: String? = "application/json",
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
    |                                                                                                                                     `- error: cannot find type 'URLRequest' in scope
121 |         var request = URLRequest(url: requestURL)
122 |         request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:189:54: error: cannot find type 'URLRequest' in scope
187 |     ///   - decodeTo: The type to decode the response into.
188 |     /// - Returns: An instance of the specified `Decodable` type.
189 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
190 |         let data = try await self.performRequest(request, withEncodingBody: body)
191 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:209:40: error: cannot find type 'URLRequest' in scope
207 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
208 |     /// - Returns: A `Data` object that contains the blob.
209 |     public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                        `- error: cannot find type 'URLRequest' in scope
210 |         let data = try await self.performRequest(request, withEncodingBody: body)
211 |         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:221:54: error: cannot find type 'URLRequest' in scope
219 |     ///   - decodeTo: The type to decode the response into.
220 |     /// - Returns: An instance of the specified `Decodable` type.
221 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
222 |         let urlRequest = request
223 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:247:44: error: cannot find type 'URLRequest' in scope
245 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
246 |     /// - Returns: A tuple containing the data and the HTTPURLResponse.
247 |     private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                            `- error: cannot find type 'URLRequest' in scope
248 |         // Wait for ATRecordTypeRegistry to be ready before proceeding
249 |         await ATRecordTypeRegistry.shared.waitUntilRegistryIsRead()
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:29: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                             `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:97:64: error: reference to member 'default' cannot be resolved without a contextual type
 95 |     ///   - ``APIClientConfiguration``
 96 |     public init(with configuration: APIClientConfiguration) {
 97 |         let config = configuration.urlSessionConfiguration ?? .default
    |                                                                `- error: reference to member 'default' cannot be resolved without a contextual type
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:99:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 97 |         let config = configuration.urlSessionConfiguration ?? .default
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 |         self.executor = configuration.responseProvider
101 |         self.logger = configuration.logger
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:121:23: error: cannot find 'URLRequest' in scope
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
121 |         var request = URLRequest(url: requestURL)
    |                       `- error: cannot find 'URLRequest' in scope
122 |         request.httpMethod = httpMethod.rawValue
123 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:225:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
223 |
224 |         // let (data, response) = try await
225 |         let (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
    |                                                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
226 |
227 |         guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:268:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |
267 |         do {
268 |             let (data, response): (Data, URLResponse)
    |                                          `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |             if let executor = self.executor {
270 |                 (data, response) = try await executor.execute(urlRequest)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:272:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
270 |                 (data, response) = try await executor.execute(urlRequest)
271 |             } else {
272 |                 (data, response) = try await urlSession.data(for: urlRequest)
    |                                                         `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
273 |             }
274 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                            `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                                `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:280:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
280 |                 switch httpResponse.statusCode {
    |                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
281 |                     case 200:
282 |                         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
289 |                         throw ATAPIError.badRequest(error: errorResponse)
290 |                     case 401:
291 |                         let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
292 |                         let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
293 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:327:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
325 |                         throw ATAPIError.payloadTooLarge(error: errorResponse)
326 |                     case 429:
327 |                         let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
    |                                                                                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
328 |                             TimeInterval(retryAfterHeader)
329 |                         } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:375:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 |                     default:
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:376:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
    |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
378 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:113:33: error: cannot find 'DispatchQueue' in scope
111 |
112 |     /// A private dispatch queue for the registry.
113 |     private let registryQueue = DispatchQueue(label: "com.cjrriley.ATProtoKit.ATRecordTypeRegistryQueue")
    |                                 `- error: cannot find 'DispatchQueue' in scope
114 |
115 |     /// A private property of ``recordRegistry``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | }
37 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:42:39: error: cannot find type 'URLRequest' in scope
40 |     ///   - request: The `URLRequest` about to be sent.
41 |     ///   - body: The encoded HTTP body data for the request. Optional.
42 |     public func logRequest(_ request: URLRequest, body: Data?) {
   |                                       `- error: cannot find type 'URLRequest' in scope
43 |         print("\n--- API REQUEST ---")
44 |         print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:62:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |     ///   - data: The raw response data, if any. Optional.
61 |     ///   - error: An `Error` if the request failed. Optional.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
   |                                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                        `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:65:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
   |                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
66 |             print("Headers: \(httpResponse.allHeaderFields)")
67 |         }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:66:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
   |                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
67 |         }
68 |         if let data = data, let jsonStr = String(data: data, encoding: .utf8) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:55:34: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 |     ///   - data: The raw response data, if any. Optional.
54 |     ///   - error: An `Error` if the request failed. Optional.
55 |     func logResponse(_ response: URLResponse?, data: Data?, error: Error?)
   |                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | }
57 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[670/790] Compiling ATProtoKit SessionDebuggable.swift
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:28:24: error: cannot find type 'URLSessionDelegate' in scope
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
27 |     /// Optional. Defaults to `nil`.
28 |     var delegate: (any URLSessionDelegate)? = nil
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
29 |
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:32:24: error: cannot find type 'OperationQueue' in scope
30 |     /// An operation queue for scheduling the delegate calls and completion handlers. Optional.
31 |     /// Defaults to `nil`.
32 |     var delegateQueue: OperationQueue? = nil
   |                        `- error: cannot find type 'OperationQueue' in scope
33 |
34 |     /// A provider used for the response of the `URLRequest`. Optional. Defaults to `nil`.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:29: error: cannot find type 'URLRequest' in scope
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                             `- error: cannot find type 'URLRequest' in scope
36 | }
37 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:44:32: error: cannot find type 'URLRequest' in scope
42 |     ///   - request: The `URLRequest` about to be sent.
43 |     ///   - body: The encoded HTTP body data for the request. Optional.
44 |     func logRequest(_ request: URLRequest, body: Data?)
   |                                `- error: cannot find type 'URLRequest' in scope
45 |
46 |     /// Creates a log immediately after a response is received (or a request fails).
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:54:24: error: cannot find type 'URLSessionDelegate' in scope
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
   |                        `- error: cannot find type 'URLSessionDelegate' in scope
55 |         delegateQueue: OperationQueue? = nil,
56 |         responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:55:24: error: cannot find type 'OperationQueue' in scope
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
   |                        `- error: cannot find type 'OperationQueue' in scope
56 |         responseProvider: ATRequestExecutor? = nil,
57 |         logger: SessionDebuggable? = nil
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:53:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 |     ///   Defaults to `nil`.
52 |     public init(
53 |         urlSessionConfiguration: URLSessionConfiguration? = nil,
   |                                  `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
54 |         delegate: (any URLSessionDelegate)? = nil,
55 |         delegateQueue: OperationQueue? = nil,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:24:9: warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
22 |
23 |     /// An instance of `URLSessionConfiguration`. Optional. Defaults to `.default`.
24 |     var urlSessionConfiguration: URLSessionConfiguration?
   |         `- warning: stored property 'urlSessionConfiguration' of 'Sendable'-conforming struct 'APIClientConfiguration' has non-sendable type 'URLSessionConfiguration?' (aka 'Optional<AnyObject>'); this is an error in the Swift 6 language mode
25 |
26 |     /// A session delegate object that handles requests for authentication and other session-related events.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:41: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:54: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                      `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:81: error: cannot infer contextual base in reference to member 'default'
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                                                                                 `- error: cannot infer contextual base in reference to member 'default'
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:120:133: error: cannot find type 'URLRequest' in scope
118 |     public func createRequest(forRequest requestURL: URL, andMethod httpMethod: HTTPMethod, acceptValue: String? = "application/json",
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
    |                                                                                                                                     `- error: cannot find type 'URLRequest' in scope
121 |         var request = URLRequest(url: requestURL)
122 |         request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:189:54: error: cannot find type 'URLRequest' in scope
187 |     ///   - decodeTo: The type to decode the response into.
188 |     /// - Returns: An instance of the specified `Decodable` type.
189 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
190 |         let data = try await self.performRequest(request, withEncodingBody: body)
191 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:209:40: error: cannot find type 'URLRequest' in scope
207 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
208 |     /// - Returns: A `Data` object that contains the blob.
209 |     public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                        `- error: cannot find type 'URLRequest' in scope
210 |         let data = try await self.performRequest(request, withEncodingBody: body)
211 |         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:221:54: error: cannot find type 'URLRequest' in scope
219 |     ///   - decodeTo: The type to decode the response into.
220 |     /// - Returns: An instance of the specified `Decodable` type.
221 |     public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
    |                                                      `- error: cannot find type 'URLRequest' in scope
222 |         let urlRequest = request
223 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:247:44: error: cannot find type 'URLRequest' in scope
245 |     ///   - body: An optional `Encodable` body to be encoded and attached to the request.
246 |     /// - Returns: A tuple containing the data and the HTTPURLResponse.
247 |     private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
    |                                            `- error: cannot find type 'URLRequest' in scope
248 |         // Wait for ATRecordTypeRegistry to be ready before proceeding
249 |         await ATRecordTypeRegistry.shared.waitUntilRegistryIsRead()
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:20:29: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 18 |
 19 |     /// The `URLSession` instance to be used for network requests.
 20 |     public private(set) var urlSession: URLSession = URLSession(configuration: .default)
    |                             `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClientService' has non-sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
 21 |
 22 |     /// An instance of ``ATRequestExecutor``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:97:64: error: reference to member 'default' cannot be resolved without a contextual type
 95 |     ///   - ``APIClientConfiguration``
 96 |     public init(with configuration: APIClientConfiguration) {
 97 |         let config = configuration.urlSessionConfiguration ?? .default
    |                                                                `- error: reference to member 'default' cannot be resolved without a contextual type
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:99:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 97 |         let config = configuration.urlSessionConfiguration ?? .default
 98 |         config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
 99 |         self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 |         self.executor = configuration.responseProvider
101 |         self.logger = configuration.logger
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:121:23: error: cannot find 'URLRequest' in scope
119 |                                      contentTypeValue: String? = "application/json", authorizationValue: String? = nil,
120 |                                      labelersValue: String? = nil, proxyValue: String? = nil, isRelatedToBskyChat: Bool = false) -> URLRequest {
121 |         var request = URLRequest(url: requestURL)
    |                       `- error: cannot find 'URLRequest' in scope
122 |         request.httpMethod = httpMethod.rawValue
123 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:225:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
223 |
224 |         // let (data, response) = try await
225 |         let (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
    |                                                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
226 |
227 |         guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:268:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
266 |
267 |         do {
268 |             let (data, response): (Data, URLResponse)
    |                                          `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
269 |             if let executor = self.executor {
270 |                 (data, response) = try await executor.execute(urlRequest)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:272:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
270 |                 (data, response) = try await executor.execute(urlRequest)
271 |             } else {
272 |                 (data, response) = try await urlSession.data(for: urlRequest)
    |                                                         `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
273 |             }
274 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                            `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:279:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
277 |             #endif
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
    |                                                `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |                 switch httpResponse.statusCode {
281 |                     case 200:
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:280:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
278 |
279 |             if let httpResponse = response as? HTTPURLResponse {
280 |                 switch httpResponse.statusCode {
    |                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
281 |                     case 200:
282 |                         return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
289 |                         throw ATAPIError.badRequest(error: errorResponse)
290 |                     case 401:
291 |                         let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
292 |                         let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
293 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:327:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
325 |                         throw ATAPIError.payloadTooLarge(error: errorResponse)
326 |                     case 429:
327 |                         let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
    |                                                                                                     `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
328 |                             TimeInterval(retryAfterHeader)
329 |                         } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:375:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
373 |                     default:
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:376:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
374 |                         let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
375 |                         let errorCode = httpResponse.statusCode
376 |                         let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
    |                                                        `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
377 |                         let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
378 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:113:33: error: cannot find 'DispatchQueue' in scope
111 |
112 |     /// A private dispatch queue for the registry.
113 |     private let registryQueue = DispatchQueue(label: "com.cjrriley.ATProtoKit.ATRecordTypeRegistryQueue")
    |                                 `- error: cannot find 'DispatchQueue' in scope
114 |
115 |     /// A private property of ``recordRegistry``.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:35:64: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 |     ///
34 |     /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
35 |     func execute(_ request: URLRequest) async throws -> (Data, URLResponse)
   |                                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | }
37 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:42:39: error: cannot find type 'URLRequest' in scope
40 |     ///   - request: The `URLRequest` about to be sent.
41 |     ///   - body: The encoded HTTP body data for the request. Optional.
42 |     public func logRequest(_ request: URLRequest, body: Data?) {
   |                                       `- error: cannot find type 'URLRequest' in scope
43 |         print("\n--- API REQUEST ---")
44 |         print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:62:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
60 |     ///   - data: The raw response data, if any. Optional.
61 |     ///   - error: An `Error` if the request failed. Optional.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
   |                                         `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                        `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:64:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 |     public func logResponse(_ response: URLResponse?, data: Data?, error: Error?) {
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
   |                                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:65:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
63 |         print("\n--- API RESPONSE ---")
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
   |                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
66 |             print("Headers: \(httpResponse.allHeaderFields)")
67 |         }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:66:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
64 |         if let httpResponse = response as? HTTPURLResponse {
65 |             print("Status: \(httpResponse.statusCode)")
66 |             print("Headers: \(httpResponse.allHeaderFields)")
   |                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
67 |         }
68 |         if let data = data, let jsonStr = String(data: data, encoding: .utf8) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/SessionDebuggable.swift:55:34: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 |     ///   - data: The raw response data, if any. Optional.
54 |     ///   - error: An `Error` if the request failed. Optional.
55 |     func logResponse(_ response: URLResponse?, data: Data?, error: Error?)
   |                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | }
57 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[671/790] Compiling ATProtoKit ComAtprotoIdentityResolveHandle.swift
[672/790] Compiling ATProtoKit ComAtprotoIdentitySignPLCOperation.swift
[673/790] Compiling ATProtoKit ComAtprotoIdentitySubmitPLCOperation.swift
[674/790] Compiling ATProtoKit ComAtprotoIdentityUpdateHandle.swift
[675/790] Compiling ATProtoKit ComAtprotoLabelDefs.swift
[676/790] Compiling ATProtoKit ComAtprotoLabelQueryLabels.swift
[677/790] Compiling ATProtoKit ComAtprotoLexiconSchema.swift
[678/790] Compiling ATProtoKit ComAtprotoModerationCreateReport.swift
[679/790] Compiling ATProtoKit ComAtprotoModerationDefs.swift
[680/790] Compiling ATProtoKit ComAtProtoRepoStrongRef.swift
[681/790] Compiling ATProtoKit ComAtprotoRepoApplyWrites.swift
[682/790] Compiling ATProtoKit ComAtprotoRepoCreateRecord.swift
[683/790] Compiling ATProtoKit ComAtprotoRepoDefs.swift
[684/790] Compiling ATProtoKit ComAtprotoRepoDeleteRecord.swift
[685/790] Compiling ATProtoKit ComAtprotoRepoDescribeRepo.swift
[686/790] Compiling ATProtoKit ComAtprotoRepoGetRecord.swift
[687/790] Compiling ATProtoKit ComAtprotoRepoImportRepo.swift
[688/790] Compiling ATProtoKit ComAtprotoRepoListMissingBlobs.swift
[689/790] Compiling ATProtoKit ComAtprotoRepoListRecords.swift
[690/790] Compiling ATProtoKit ComAtprotoRepoPutRecord.swift
[691/790] Compiling ATProtoKit ComAtprotoRepoUploadBlob.swift
[692/790] Compiling ATProtoKit ComAtprotoServerActivateAccount.swift
[693/790] Compiling ATProtoKit ComAtprotoServerCheckAccountStatus.swift
[694/790] Compiling ATProtoKit ComAtprotoServerConfirmEmail.swift
[695/790] Compiling ATProtoKit ToolsOzoneModerationSearchRepos.swift
[696/790] Compiling ATProtoKit ToolsOzoneServerGetConfig.swift
[697/790] Compiling ATProtoKit ToolsOzoneModerationSetAddValues.swift
[698/790] Compiling ATProtoKit ToolsOzoneSetDefs.swift
[699/790] Compiling ATProtoKit ToolsOzoneSetDeleteSet.swift
[700/790] Compiling ATProtoKit ToolsOzoneSetDeleteValues.swift
[701/790] Compiling ATProtoKit ToolsOzoneSetGetValues.swift
[702/790] Compiling ATProtoKit ToolsOzoneSetQuerySets.swift
[703/790] Compiling ATProtoKit ToolsOzoneSettingDefs.swift
[704/790] Compiling ATProtoKit ToolsOzoneSettingListOptions.swift
[705/790] Compiling ATProtoKit ToolsOzoneSettingRemoveOptions.swift
[706/790] Compiling ATProtoKit ToolsOzoneSettingUpsertOption.swift
[707/790] Compiling ATProtoKit ToolsOzoneSignatureDefs.swift
[708/790] Compiling ATProtoKit ToolsOzoneSignatureFindCorrelation.swift
[709/790] Compiling ATProtoKit ToolsOzoneSignatureFindRelatedAccounts.swift
[710/790] Compiling ATProtoKit ToolsOzoneSignatureSearchAccounts.swift
[711/790] Compiling ATProtoKit ToolsOzoneTeamAddMember.swift
[712/790] Compiling ATProtoKit ToolsOzoneTeamDefs.swift
[713/790] Compiling ATProtoKit ToolsOzoneTeamDeleteMember.swift
[714/790] Compiling ATProtoKit ToolsOzoneTeamListMembers.swift
[715/790] Compiling ATProtoKit ToolsOzoneTeamUpdateMember.swift
[716/790] Compiling ATProtoKit ToolsOzoneLexicon.swift
[717/790] Compiling ATProtoKit ToolsOzoneVerificationDefs.swift
[718/790] Compiling ATProtoKit ToolsOzoneVerificationGrantVerifications.swift
[719/790] Compiling ATProtoKit ComAtprotoSyncListBlobs.swift
[720/790] Compiling ATProtoKit ComAtprotoSyncListHosts.swift
[721/790] Compiling ATProtoKit ComAtprotoSyncListRepos.swift
[722/790] Compiling ATProtoKit ComAtprotoSyncListReposByCollection.swift
[723/790] Compiling ATProtoKit ComAtprotoSyncNotifyOfUpdate.swift
[724/790] Compiling ATProtoKit ComAtprotoSyncRequestCrawl.swift
[725/790] Compiling ATProtoKit ComAtprotoSyncSubscribeRepos.swift
[726/790] Compiling ATProtoKit ComAtprotoTempAddReservedHandle.swift
[727/790] Compiling ATProtoKit ComAtprotoTempCheckSignupQueue.swift
[728/790] Compiling ATProtoKit ComAtprotoTempRequestPhoneVerification.swift
[729/790] Compiling ATProtoKit ToolsOzoneCommunicationCreateTemplate.swift
[730/790] Compiling ATProtoKit ToolsOzoneCommunicationDefs.swift
[731/790] Compiling ATProtoKit ToolsOzoneCommunicationDeleteTemplate.swift
[732/790] Compiling ATProtoKit ToolsOzoneCommunicationListTemplates.swift
[733/790] Compiling ATProtoKit ToolsOzoneCommunicationUpdateTemplate.swift
[734/790] Compiling ATProtoKit ToolsOzoneHostingGetAccountHistory.swift
[735/790] Compiling ATProtoKit ToolsOzoneModerationDefs.swift
[736/790] Compiling ATProtoKit ToolsOzoneModerationEmitEvent.swift
[737/790] Compiling ATProtoKit ToolsOzoneModerationGetRecords.swift
[738/790] Compiling ATProtoKit ToolsOzoneModerationGetReporterStats.swift
[739/790] Compiling ATProtoKit ToolsOzoneModerationGetRepos.swift
[740/790] Compiling ATProtoKit ToolsOzoneModerationGetSubjects.swift
[741/790] Compiling ATProtoKit ToolsOzoneModerationQueryEvents.swift
[742/790] Compiling ATProtoKit ToolsOzoneModerationQueryStatuses.swift
[743/790] Compiling ATProtoKit AppBskyVideoUploadVideo.swift
[744/790] Compiling ATProtoKit ChatBskyActorDeclaration.swift
[745/790] Compiling ATProtoKit ChatBskyActorDefs.swift
[746/790] Compiling ATProtoKit ChatBskyActorDeleteAccount.swift
[747/790] Compiling ATProtoKit ChatBskyLexicon.swift
[748/790] Compiling ATProtoKit ChatBskyConvoAcceptConvo.swift
[749/790] Compiling ATProtoKit ChatBskyConvoAddReaction.swift
[750/790] Compiling ATProtoKit ChatBskyConvoDefs.swift
[751/790] Compiling ATProtoKit ChatBskyConvoDeleteMessageForSelf.swift
[752/790] Compiling ATProtoKit ChatBskyConvoGetConvo.swift
[753/790] Compiling ATProtoKit ChatBskyConvoGetConvoAvailability.swift
[754/790] Compiling ATProtoKit ChatBskyConvoGetConvoForMembers.swift
[755/790] Compiling ATProtoKit ChatBskyConvoGetLog.swift
[756/790] Compiling ATProtoKit ChatBskyConvoGetMessages.swift
[757/790] Compiling ATProtoKit ChatBskyConvoLeaveConvo.swift
[758/790] Compiling ATProtoKit ChatBskyConvoListConvos.swift
[759/790] Compiling ATProtoKit ChatBskyConvoMuteConvo.swift
[760/790] Compiling ATProtoKit ChatBskyConvoRemoveReaction.swift
[761/790] Compiling ATProtoKit ChatBskyConvoSendMessage.swift
[762/790] Compiling ATProtoKit ChatBskyConvoSendMessageBatch.swift
[763/790] Compiling ATProtoKit ChatBskyConvoUnmuteConvo.swift
[764/790] Compiling ATProtoKit ChatBskyConvoUpdateAllRead.swift
[765/790] Compiling ATProtoKit ChatBskyConvoUpdateRead.swift
[766/790] Compiling ATProtoKit ChatBskyModerationGetActorMetadata.swift
[767/790] Compiling ATProtoKit AppBskyLexicon.swift
[768/790] Compiling ATProtoKit AppBskyEmbedDefs.swift
[769/790] Compiling ATProtoKit AppBskyEmbedExternal.swift
[770/790] Compiling ATProtoKit AppBskyEmbedImages.swift
[771/790] Compiling ATProtoKit AppBskyEmbedRecord.swift
[772/790] Compiling ATProtoKit AppBskyEmbedRecordWithMedia.swift
[773/790] Compiling ATProtoKit AppBskyEmbedVideo.swift
[774/790] Compiling ATProtoKit AppBskyFeedDefs.swift
[775/790] Compiling ATProtoKit AppBskyFeedDescribeFeedGenerator.swift
[776/790] Compiling ATProtoKit AppBskyFeedGenerator.swift
[777/790] Compiling ATProtoKit AppBskyFeedGetActorFeeds.swift
[778/790] Compiling ATProtoKit AppBskyFeedGetActorLikes.swift
[779/790] Compiling ATProtoKit AppBskyFeedGetAuthorFeed.swift
[780/790] Compiling ATProtoKit AppBskyFeedGetFeed.swift
[781/790] Compiling ATProtoKit AppBskyFeedGetFeedGenerator.swift
[782/790] Compiling ATProtoKit AppBskyFeedGetFeedGenerators.swift
[783/790] Compiling ATProtoKit AppBskyFeedGetFeedSkeleton.swift
[784/790] Compiling ATProtoKit AppBskyFeedGetLikes.swift
[785/790] Compiling ATProtoKit AppBskyFeedGetListFeed.swift
[786/790] Compiling ATProtoKit AppBskyFeedGetPostThread.swift
[787/790] Compiling ATProtoKit AppBskyFeedGetPosts.swift
[788/790] Compiling ATProtoKit AppBskyFeedGetQuotes.swift
[789/790] Compiling ATProtoKit AppBskyFeedGetRepostedBy.swift
[790/790] Compiling ATProtoKit AppBskyFeedGetSuggestedFeeds.swift
BUILD FAILURE 6.1 wasm