The Swift Package Index logo.Swift Package Index

Build Information

Failed to build ATProtoKit, reference main (c55f54), with Swift 6.3 for Wasm on 23 Apr 2026 03:42:27 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1

Build Log

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 jsonString = 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
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[405/583] 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' contains non-Sendable type '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' contains non-Sendable type '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 '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 '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/ATRecordProtocol.swift:116:29: warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
114 |
115 |     /// A private property of ``recordRegistry``.
116 |     private(set) static var _recordRegistry: [String: any ATRecordProtocol.Type] = [:]
    |                             |- warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                             |- note: convert '_recordRegistry' to a 'let' constant to make 'Sendable' shared state immutable
    |                             |- note: add '@MainActor' to make static property '_recordRegistry' part of global actor 'MainActor'
    |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
117 |
118 |     /// The registry itself.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:139:36: warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
137 |     ///
138 |     /// - Warning: Don't touch this property; this should only be used for ``ATProtoKit``.
139 |     public private(set) static var areBlueskyRecordsRegistered = false
    |                                    |- warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                                    |- note: convert 'areBlueskyRecordsRegistered' to a 'let' constant to make 'Sendable' shared state immutable
    |                                    |- note: add '@MainActor' to make static property 'areBlueskyRecordsRegistered' part of global actor 'MainActor'
    |                                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
140 |
141 |     /// Tracks whether the registry is currently being modified.
/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 jsonString = 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
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[406/583] 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' contains non-Sendable type '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' contains non-Sendable type '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 '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 '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/ATRecordProtocol.swift:116:29: warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
114 |
115 |     /// A private property of ``recordRegistry``.
116 |     private(set) static var _recordRegistry: [String: any ATRecordProtocol.Type] = [:]
    |                             |- warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                             |- note: convert '_recordRegistry' to a 'let' constant to make 'Sendable' shared state immutable
    |                             |- note: add '@MainActor' to make static property '_recordRegistry' part of global actor 'MainActor'
    |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
117 |
118 |     /// The registry itself.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:139:36: warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
137 |     ///
138 |     /// - Warning: Don't touch this property; this should only be used for ``ATProtoKit``.
139 |     public private(set) static var areBlueskyRecordsRegistered = false
    |                                    |- warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                                    |- note: convert 'areBlueskyRecordsRegistered' to a 'let' constant to make 'Sendable' shared state immutable
    |                                    |- note: add '@MainActor' to make static property 'areBlueskyRecordsRegistered' part of global actor 'MainActor'
    |                                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
140 |
141 |     /// Tracks whether the registry is currently being modified.
/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 jsonString = 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
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[407/583] 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' contains non-Sendable type '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' contains non-Sendable type '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 '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 '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/ATRecordProtocol.swift:116:29: warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
114 |
115 |     /// A private property of ``recordRegistry``.
116 |     private(set) static var _recordRegistry: [String: any ATRecordProtocol.Type] = [:]
    |                             |- warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                             |- note: convert '_recordRegistry' to a 'let' constant to make 'Sendable' shared state immutable
    |                             |- note: add '@MainActor' to make static property '_recordRegistry' part of global actor 'MainActor'
    |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
117 |
118 |     /// The registry itself.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:139:36: warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
137 |     ///
138 |     /// - Warning: Don't touch this property; this should only be used for ``ATProtoKit``.
139 |     public private(set) static var areBlueskyRecordsRegistered = false
    |                                    |- warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                                    |- note: convert 'areBlueskyRecordsRegistered' to a 'let' constant to make 'Sendable' shared state immutable
    |                                    |- note: add '@MainActor' to make static property 'areBlueskyRecordsRegistered' part of global actor 'MainActor'
    |                                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
140 |
141 |     /// Tracks whether the registry is currently being modified.
/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 jsonString = 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
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[408/583] 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' contains non-Sendable type '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' contains non-Sendable type '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 '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 '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/ATRecordProtocol.swift:116:29: warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
114 |
115 |     /// A private property of ``recordRegistry``.
116 |     private(set) static var _recordRegistry: [String: any ATRecordProtocol.Type] = [:]
    |                             |- warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                             |- note: convert '_recordRegistry' to a 'let' constant to make 'Sendable' shared state immutable
    |                             |- note: add '@MainActor' to make static property '_recordRegistry' part of global actor 'MainActor'
    |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
117 |
118 |     /// The registry itself.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:139:36: warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
137 |     ///
138 |     /// - Warning: Don't touch this property; this should only be used for ``ATProtoKit``.
139 |     public private(set) static var areBlueskyRecordsRegistered = false
    |                                    |- warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                                    |- note: convert 'areBlueskyRecordsRegistered' to a 'let' constant to make 'Sendable' shared state immutable
    |                                    |- note: add '@MainActor' to make static property 'areBlueskyRecordsRegistered' part of global actor 'MainActor'
    |                                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
140 |
141 |     /// Tracks whether the registry is currently being modified.
/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 jsonString = 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
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[409/583] 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' contains non-Sendable type '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' contains non-Sendable type '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 '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 '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/ATRecordProtocol.swift:116:29: warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
114 |
115 |     /// A private property of ``recordRegistry``.
116 |     private(set) static var _recordRegistry: [String: any ATRecordProtocol.Type] = [:]
    |                             |- warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                             |- note: convert '_recordRegistry' to a 'let' constant to make 'Sendable' shared state immutable
    |                             |- note: add '@MainActor' to make static property '_recordRegistry' part of global actor 'MainActor'
    |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
117 |
118 |     /// The registry itself.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:139:36: warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
137 |     ///
138 |     /// - Warning: Don't touch this property; this should only be used for ``ATProtoKit``.
139 |     public private(set) static var areBlueskyRecordsRegistered = false
    |                                    |- warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                                    |- note: convert 'areBlueskyRecordsRegistered' to a 'let' constant to make 'Sendable' shared state immutable
    |                                    |- note: add '@MainActor' to make static property 'areBlueskyRecordsRegistered' part of global actor 'MainActor'
    |                                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
140 |
141 |     /// Tracks whether the registry is currently being modified.
/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 jsonString = 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
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[410/583] 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' contains non-Sendable type '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' contains non-Sendable type '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 '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 '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/ATRecordProtocol.swift:116:29: warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
114 |
115 |     /// A private property of ``recordRegistry``.
116 |     private(set) static var _recordRegistry: [String: any ATRecordProtocol.Type] = [:]
    |                             |- warning: static property '_recordRegistry' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                             |- note: convert '_recordRegistry' to a 'let' constant to make 'Sendable' shared state immutable
    |                             |- note: add '@MainActor' to make static property '_recordRegistry' part of global actor 'MainActor'
    |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
117 |
118 |     /// The registry itself.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRecordProtocol.swift:139:36: warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
137 |     ///
138 |     /// - Warning: Don't touch this property; this should only be used for ``ATProtoKit``.
139 |     public private(set) static var areBlueskyRecordsRegistered = false
    |                                    |- warning: static property 'areBlueskyRecordsRegistered' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode [#MutableGlobalVariable]
    |                                    |- note: convert 'areBlueskyRecordsRegistered' to a 'let' constant to make 'Sendable' shared state immutable
    |                                    |- note: add '@MainActor' to make static property 'areBlueskyRecordsRegistered' part of global actor 'MainActor'
    |                                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
140 |
141 |     /// Tracks whether the registry is currently being modified.
/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 jsonString = 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
[#MutableGlobalVariable]: <https://docs.swift.org/compiler/documentation/diagnostics/mutable-global-variable>
[411/583] Compiling ATProtoKit ToolsOzoneServerGetConfig.swift
[412/583] Compiling ATProtoKit ToolsOzoneModerationSetAddValues.swift
[413/583] Compiling ATProtoKit ToolsOzoneSetDefs.swift
[414/583] Compiling ATProtoKit ToolsOzoneSetDeleteSet.swift
[415/583] Compiling ATProtoKit ToolsOzoneSetDeleteValues.swift
[416/583] Compiling ATProtoKit ToolsOzoneSetGetValues.swift
[417/583] Compiling ATProtoKit ToolsOzoneSetQuerySets.swift
[418/583] Compiling ATProtoKit ToolsOzoneSettingDefs.swift
[419/583] Compiling ATProtoKit ToolsOzoneSettingListOptions.swift
[420/583] Compiling ATProtoKit ToolsOzoneSettingRemoveOptions.swift
[421/583] Compiling ATProtoKit ToolsOzoneSettingUpsertOption.swift
[422/583] Compiling ATProtoKit ToolsOzoneSignatureDefs.swift
[423/583] Compiling ATProtoKit ToolsOzoneSignatureFindCorrelation.swift
[424/583] Compiling ATProtoKit ToolsOzoneSignatureFindRelatedAccounts.swift
[425/583] Compiling ATProtoKit ToolsOzoneSignatureSearchAccounts.swift
[426/583] Compiling ATProtoKit ToolsOzoneTeamAddMember.swift
[427/583] Compiling ATProtoKit ToolsOzoneTeamDefs.swift
[428/583] Compiling ATProtoKit ToolsOzoneTeamDeleteMember.swift
[429/583] Compiling ATProtoKit ToolsOzoneTeamListMembers.swift
[430/583] Compiling ATProtoKit ToolsOzoneTeamUpdateMember.swift
[431/583] Compiling ATProtoKit ToolsOzoneLexicon.swift
[432/583] Compiling ATProtoKit ToolsOzoneVerificationDefs.swift
[433/583] Compiling ATProtoKit ToolsOzoneVerificationGrantVerifications.swift
[434/583] Compiling ATProtoKit ToolsOzoneVerificationListVerifications.swift
[435/583] Compiling ATProtoKit ChatBskyConvoGetLog.swift
[436/583] Compiling ATProtoKit ChatBskyConvoGetMessages.swift
[437/583] Compiling ATProtoKit ChatBskyConvoLeaveConvo.swift
[438/583] Compiling ATProtoKit ChatBskyConvoListConvos.swift
[439/583] Compiling ATProtoKit ChatBskyConvoMuteConvo.swift
[440/583] Compiling ATProtoKit ChatBskyConvoRemoveReaction.swift
[441/583] Compiling ATProtoKit ChatBskyConvoSendMessage.swift
[442/583] Compiling ATProtoKit ChatBskyConvoSendMessageBatch.swift
[443/583] Compiling ATProtoKit ChatBskyConvoUnmuteConvo.swift
[444/583] Compiling ATProtoKit ChatBskyConvoUpdateAllRead.swift
[445/583] Compiling ATProtoKit ChatBskyConvoUpdateRead.swift
[446/583] Compiling ATProtoKit ChatBskyModerationGetActorMetadata.swift
[447/583] Compiling ATProtoKit ChatBskyModerationGetMessageContext.swift
[448/583] Compiling ATProtoKit ChatBskyModerationUpdateActorAccess.swift
[449/583] Compiling ATProtoKit ComAtprotoAdminDefs.swift
[450/583] Compiling ATProtoKit ComAtprotoAdminDeleteAccount.swift
[451/583] Compiling ATProtoKit ComAtprotoAdminDisableAccountInvites.swift
[452/583] Compiling ATProtoKit ComAtprotoAdminDisableInviteCodes.swift
[453/583] Compiling ATProtoKit ComAtprotoAdminEnableAccountInvites.swift
[454/583] Compiling ATProtoKit ComAtprotoAdminGetAccountInfos.swift
[455/583] Compiling ATProtoKit ComAtprotoAdminGetInviteCodes.swift
[456/583] Compiling ATProtoKit ComAtprotoAdminGetSubjectStatus.swift
[457/583] Compiling ATProtoKit ComAtprotoAdminSearchAccounts.swift
[458/583] Compiling ATProtoKit ComAtprotoAdminSearchRepos.swift
[459/583] Compiling ATProtoKit ComAtprotoAdminSendEmail.swift
[460/583] Compiling ATProtoKit ComAtprotoAdminUpdateAccountEmail.swift
[461/583] Compiling ATProtoKit ComAtprotoAdminUpdateAccountHandle.swift
[462/583] Compiling ATProtoKit ComAtprotoAdminUpdateAccountPassword.swift
[463/583] Compiling ATProtoKit ComAtprotoAdminUpdateAccountSigningKey.swift
[464/583] Compiling ATProtoKit ComAtprotoAdminUpdateSubjectStatus.swift
[465/583] Compiling ATProtoKit ComAtprotoLexicon.swift
[466/583] Compiling ATProtoKit ComAtprotoIdentityDefs.swift
[467/583] Compiling ATProtoKit ComAtprotoIdentityGetRecommendedDidCredentials.swift
[468/583] Compiling ATProtoKit ComAtprotoIdentityRefreshIdentity.swift
[469/583] Compiling ATProtoKit ComAtprotoIdentityRequestPlcOperationSignature.swift
[470/583] Compiling ATProtoKit ComAtprotoIdentityResolveDid.swift
[471/583] Compiling ATProtoKit ComAtprotoIdentityResolveHandle.swift
[472/583] Compiling ATProtoKit ComAtprotoIdentitySignPLCOperation.swift
[473/583] Compiling ATProtoKit ComAtprotoIdentitySubmitPLCOperation.swift
[474/583] Compiling ATProtoKit ComAtprotoIdentityUpdateHandle.swift
[475/583] Compiling ATProtoKit ComAtprotoLabelDefs.swift
[476/583] Compiling ATProtoKit ComAtprotoLabelQueryLabels.swift
[477/583] Compiling ATProtoKit ComAtprotoLexiconResolveLexicon.swift
[478/583] Compiling ATProtoKit ComAtprotoLexiconSchema.swift
[479/583] Compiling ATProtoKit ComAtprotoModerationCreateReport.swift
[480/583] Compiling ATProtoKit ComAtprotoModerationDefs.swift
[481/583] Compiling ATProtoKit ComAtProtoRepoStrongRef.swift
[482/583] Compiling ATProtoKit ComAtprotoRepoApplyWrites.swift
[483/583] Compiling ATProtoKit ComAtprotoRepoCreateRecord.swift
[484/583] Compiling ATProtoKit ComAtprotoRepoDefs.swift
[485/583] Compiling ATProtoKit AppBskyUnspeccedGetSuggestedUsersSkeleton.swift
[486/583] Compiling ATProtoKit AppBskyUnspeccedGetSuggestionsSkeleton.swift
[487/583] Compiling ATProtoKit AppBskyUnspeccedGetTaggedSuggestions.swift
[488/583] Compiling ATProtoKit AppBskyUnspeccedGetTrendingTopics.swift
[489/583] Compiling ATProtoKit AppBskyUnspeccedGetTrends.swift
[490/583] Compiling ATProtoKit AppBskyUnspeccedGetTrendsSkeleton.swift
[491/583] Compiling ATProtoKit AppBskyUnspeccedInitAgeAssurance.swift
[492/583] Compiling ATProtoKit AppBskyUnspeccedSearchActorsSkeleton.swift
[493/583] Compiling ATProtoKit AppBskyUnspeccedSearchPostsSkeleton.swift
[494/583] Compiling ATProtoKit AppBskyUnspeccedStarterPacksSkeleton.swift
[495/583] Compiling ATProtoKit AppBskyVideoDefs.swift
[496/583] Compiling ATProtoKit AppBskyVideoGetJobStatus.swift
[497/583] Compiling ATProtoKit AppBskyVideoGetUploadLimits.swift
[498/583] Compiling ATProtoKit AppBskyVideoUploadVideo.swift
[499/583] Compiling ATProtoKit ChatBskyActorDeclaration.swift
[500/583] Compiling ATProtoKit ChatBskyActorDefs.swift
[501/583] Compiling ATProtoKit ChatBskyActorDeleteAccount.swift
[502/583] Compiling ATProtoKit ChatBskyLexicon.swift
[503/583] Compiling ATProtoKit ChatBskyConvoAcceptConvo.swift
[504/583] Compiling ATProtoKit ChatBskyConvoAddReaction.swift
[505/583] Compiling ATProtoKit ChatBskyConvoDefs.swift
[506/583] Compiling ATProtoKit ChatBskyConvoDeleteMessageForSelf.swift
[507/583] Compiling ATProtoKit ChatBskyConvoGetConvo.swift
[508/583] Compiling ATProtoKit ChatBskyConvoGetConvoAvailability.swift
[509/583] Compiling ATProtoKit ChatBskyConvoGetConvoForMembers.swift
[510/583] Compiling ATProtoKit AppBskyLabelerGetServices.swift
[511/583] Compiling ATProtoKit AppBskyLabelerService.swift
[512/583] Compiling ATProtoKit AppBskyNotificationDeclaration.swift
[513/583] Compiling ATProtoKit AppBskyNotificationDefs.swift
[514/583] Compiling ATProtoKit AppBskyNotificationGetPreferences.swift
[515/583] Compiling ATProtoKit AppBskyNotificationGetUnreadCount.swift
[516/583] Compiling ATProtoKit AppBskyNotificationListActivitySubscriptions.swift
[517/583] Compiling ATProtoKit AppBskyNotificationListNotifications.swift
[518/583] Compiling ATProtoKit AppBskyNotificationPutActivitySubscription.swift
[519/583] Compiling ATProtoKit AppBskyNotificationPutPreferences.swift
[520/583] Compiling ATProtoKit AppBskyNotificationPutPreferencesV2.swift
[521/583] Compiling ATProtoKit AppBskyNotificationRegisterPush.swift
[522/583] Compiling ATProtoKit AppBskyNotificationUnregisterPush.swift
[523/583] Compiling ATProtoKit AppBskyNotificationUpdateSeen.swift
[524/583] Compiling ATProtoKit AppBskyRichTextFacet.swift
[525/583] Compiling ATProtoKit AppBskyUnspeccedDefs.swift
[526/583] Compiling ATProtoKit AppBskyUnspeccedGetConfig.swift
[527/583] Compiling ATProtoKit AppBskyUnspeccedGetOnboardingSuggestedStarterPacks.swift
[528/583] Compiling ATProtoKit AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton.swift
[529/583] Compiling ATProtoKit AppBskyUnspeccedGetPopularFeedGenerators.swift
[530/583] Compiling ATProtoKit AppBskyUnspeccedGetSuggestedFeeds.swift
[531/583] Compiling ATProtoKit AppBskyUnspeccedGetSuggestedFeedsSkeleton.swift
[532/583] Compiling ATProtoKit AppBskyUnspeccedGetSuggestedStarterPacks.swift
[533/583] Compiling ATProtoKit AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.swift
[534/583] Compiling ATProtoKit AppBskyUnspeccedGetSuggestedUsers.swift
[535/583] Compiling ATProtoKit ToolsOzoneCommunicationCreateTemplate.swift
[536/583] Compiling ATProtoKit ToolsOzoneCommunicationDefs.swift
[537/583] Compiling ATProtoKit ToolsOzoneCommunicationDeleteTemplate.swift
[538/583] Compiling ATProtoKit ToolsOzoneCommunicationListTemplates.swift
[539/583] Compiling ATProtoKit ToolsOzoneCommunicationUpdateTemplate.swift
[540/583] Compiling ATProtoKit ToolsOzoneHostingGetAccountHistory.swift
[541/583] Compiling ATProtoKit ToolsOzoneModerationCancelScheduledActions.swift
[542/583] Compiling ATProtoKit ToolsOzoneModerationDefs.swift
[543/583] Compiling ATProtoKit ToolsOzoneModerationEmitEvent.swift
[544/583] Compiling ATProtoKit ToolsOzoneModerationGetAccountTimeline.swift
[545/583] Compiling ATProtoKit ToolsOzoneModerationGetRecords.swift
[546/583] Compiling ATProtoKit ToolsOzoneModerationGetReporterStats.swift
[547/583] Compiling ATProtoKit ToolsOzoneModerationGetRepos.swift
[548/583] Compiling ATProtoKit ToolsOzoneModerationGetSubjects.swift
[549/583] Compiling ATProtoKit ToolsOzoneModerationListScheduledActions.swift
[550/583] Compiling ATProtoKit ToolsOzoneModerationQueryEvents.swift
[551/583] Compiling ATProtoKit ToolsOzoneModerationQueryStatuses.swift
[552/583] Compiling ATProtoKit ToolsOzoneModerationSearchRepos.swift
[553/583] Compiling ATProtoKit ToolsOzoneSafelinkAddRule.swift
[554/583] Compiling ATProtoKit ToolsOzoneSafelinkDefs.swift
[555/583] Compiling ATProtoKit ToolsOzoneSafelinkQueryEvents.swift
[556/583] Compiling ATProtoKit ToolsOzoneSafelinkQueryRules.swift
[557/583] Compiling ATProtoKit ToolsOzoneSafelinkRemoveRule.swift
[558/583] Compiling ATProtoKit ToolsOzoneSafelinkUpdateRule.swift
[559/583] Compiling ATProtoKit AppBskyActorGetProfile.swift
[560/583] Compiling ATProtoKit AppBskyActorGetProfiles.swift
[561/583] Compiling ATProtoKit AppBskyActorGetSuggestions.swift
[562/583] Compiling ATProtoKit AppBskyActorProfile.swift
[563/583] Compiling ATProtoKit AppBskyActorPutPreferences.swift
[564/583] Compiling ATProtoKit AppBskyActorSearchActors.swift
[565/583] Compiling ATProtoKit AppBskyActorSearchActorsTypeahead.swift
[566/583] Compiling ATProtoKit AppBskyActorStatus.swift
[567/583] Compiling ATProtoKit AppBskyLexicon.swift
[568/583] Compiling ATProtoKit AppBskyBookmarkCreateBookmark.swift
[569/583] Compiling ATProtoKit AppBskyBookmarkDefs.swift
[570/583] Compiling ATProtoKit AppBskyBookmarkDeleteBookmark.swift
[571/583] Compiling ATProtoKit AppBskyBookmarkGetBookmark.swift
[572/583] Compiling ATProtoKit AppBskyEmbedDefs.swift
[573/583] Compiling ATProtoKit AppBskyEmbedExternal.swift
[574/583] Compiling ATProtoKit AppBskyEmbedImages.swift
[575/583] Compiling ATProtoKit AppBskyEmbedRecord.swift
[576/583] Compiling ATProtoKit AppBskyEmbedRecordWithMedia.swift
[577/583] Compiling ATProtoKit AppBskyEmbedVideo.swift
[578/583] Compiling ATProtoKit AppBskyFeedDefs.swift
[579/583] Compiling ATProtoKit AppBskyFeedDescribeFeedGenerator.swift
[580/583] Compiling ATProtoKit AppBskyFeedGenerator.swift
[581/583] Compiling ATProtoKit AppBskyFeedGetActorFeeds.swift
[582/583] Compiling ATProtoKit AppBskyFeedGetActorLikes.swift
[583/583] Compiling ATProtoKit AppBskyFeedGetAuthorFeed.swift
BUILD FAILURE 6.3 wasm