Build Information
Failed to build ATProtoKit, reference 0.34.1 (263f09), with Swift 6.3 for Wasm on 24 Aug 2026 00:02:52 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344849-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1Build Log
96 | uniqueKeysWithValues: httpResponse.allHeaderFields.compactMap { entry in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
97 | guard let name = entry.key as? String, let value = entry.value as? String else {
98 | return nil
/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
[557/681] 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:48:20: error: cannot find type 'URLRequest' in scope
46 | /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
47 | func execute(
48 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:27:23: error: cannot find type 'URLRequest' in scope
25 | for request: URLRequest,
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
28 | }
29 |
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:25:22: error: cannot find type 'URLRequest' in scope
23 | /// - Throws: An error if authorization cannot be prepared.
24 | func authenticatedRequest(
25 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
/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:59:24: error: cannot find type 'URLSessionDelegate' in scope
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
| `- error: cannot find type 'URLSessionDelegate' in scope
60 | delegateQueue: OperationQueue? = nil,
61 | responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:60:24: error: cannot find type 'OperationQueue' in scope
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
60 | delegateQueue: OperationQueue? = nil,
| `- error: cannot find type 'OperationQueue' in scope
61 | responseProvider: ATRequestExecutor? = nil,
62 | requestAuthenticator: ATRequestAuthenticator? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:58:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | /// Defaults to `nil`.
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 | delegate: (any URLSessionDelegate)? = nil,
60 | 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:134:10: error: cannot find type 'URLRequest' in scope
132 | proxyValue: String? = nil,
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
135 | var request = URLRequest(url: requestURL)
136 | request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:210:54: error: cannot find type 'URLRequest' in scope
208 | /// - decodeTo: The type to decode the response into.
209 | /// - Returns: An instance of the specified `Decodable` type.
210 | 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
211 | let data = try await self.performRequest(request, withEncodingBody: body)
212 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:234:40: error: cannot find type 'URLRequest' in scope
232 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
233 | /// - Returns: A `Data` object that contains the blob.
234 | public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
235 | let data = try await self.performRequest(request, withEncodingBody: body)
236 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:246:54: error: cannot find type 'URLRequest' in scope
244 | /// - decodeTo: The type to decode the response into.
245 | /// - Returns: An instance of the specified `Decodable` type.
246 | public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
247 | var urlRequest = request
248 | urlRequest.httpBody = data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:44: error: cannot find type 'URLRequest' in scope
289 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
290 | /// - Returns: A tuple containing the data and the HTTPURLResponse.
291 | private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
292 | // Wait for ATRecordTypeRegistry to be ready before proceeding
293 | 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:100:64: error: reference to member 'default' cannot be resolved without a contextual type
98 | /// - ``APIClientConfiguration``
99 | public init(with configuration: APIClientConfiguration) {
100 | let config = configuration.urlSessionConfiguration ?? .default
| `- error: reference to member 'default' cannot be resolved without a contextual type
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:102:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 | let config = configuration.urlSessionConfiguration ?? .default
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
103 | self.executor = configuration.responseProvider
104 | self.requestAuthenticator = configuration.requestAuthenticator
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:135:23: error: cannot find 'URLRequest' in scope
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
135 | var request = URLRequest(url: requestURL)
| `- error: cannot find 'URLRequest' in scope
136 | request.httpMethod = httpMethod.rawValue
137 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:257:46: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | }
256 |
257 | let (responseData, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
258 | if let executor {
259 | (responseData, response) = try await executor.execute(
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:264:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
262 | )
263 | } else {
264 | (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
265 | }
266 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
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:271:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
269 | }
270 |
271 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:273:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
271 | guard httpResponse.statusCode == 200 else {
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
274 | throw URLError(.badServerResponse)
275 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:320:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
318 |
319 | do {
320 | let (data, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
321 | if let executor = self.executor {
322 | (data, response) = try await executor.execute(
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:327:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
325 | )
326 | } else {
327 | (data, response) = try await urlSession.data(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
328 | }
329 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
335 | switch httpResponse.statusCode {
336 | case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 | switch httpResponse.statusCode {
336 | 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:335:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
335 | switch httpResponse.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
336 | case 200:
337 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:346:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
344 | throw ATAPIError.badRequest(error: errorResponse)
345 | case 401:
346 | let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
347 | let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
348 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:382:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
380 | throw ATAPIError.payloadTooLarge(error: errorResponse)
381 | case 429:
382 | let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
383 | TimeInterval(retryAfterHeader)
384 | } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:430:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
428 | default:
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:431:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
433 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The base hostname of the PLC directory.
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/ATBuiltInIdentityResolver.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
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/ATBuiltInIdentityResolver.swift:37:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:37:35: error: value of type '_' expected to be instance of class or class-constrained type
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:16: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
26 |
27 | /// The base hostname of the PLC directory.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:47:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
45 | let documentURL = try didDocumentURL(for: did)
46 |
47 | let (data, response) = try await urlSession.data(from: documentURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
48 | guard let httpResponse = response as? HTTPURLResponse,
49 | (200..<300).contains(httpResponse.statusCode) else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:50:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | _ request: URLRequest,
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | }
52 |
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/ATRequestExecutor.swift:60:36: error: cannot find type 'URLRequest' in scope
58 |
59 | /// The closure that executes a complete request.
60 | public let handler: @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
61 |
62 | /// Creates a closure-backed request executor.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:66:39: error: cannot find type 'URLRequest' in scope
64 | /// - Parameter handler: The closure that executes a complete request.
65 | public init(
66 | handler: @escaping @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
67 | ) {
68 | self.handler = handler
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:80:20: error: cannot find type 'URLRequest' in scope
78 | /// - Throws: An error from the underlying request closure.
79 | public func execute(
80 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:82:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
80 | _ request: URLRequest,
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return try await handler(request, authorizationRequirement)
84 | }
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/Extensions/ExtensionHelpers.swift:275:11: error: cannot find type 'URLRequest' in scope
273 |
274 | // MARK: - URLRequest Extension
275 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
276 |
277 | private static let atProtoKitAuthorizationRequirementKey = "com.cjrriley.ATProtoKit.authorizationRequirement"
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:49:39: error: cannot find type 'URLRequest' in scope
47 | /// - request: The `URLRequest` about to be sent.
48 | /// - body: The encoded HTTP body data for the request. Optional.
49 | public func logRequest(_ request: URLRequest, body: Data?) {
| `- error: cannot find type 'URLRequest' in scope
50 | print("\n--- API REQUEST ---")
51 | print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:89:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
87 | /// - data: The raw response data, if any. Optional.
88 | /// - error: An `Error` if the request failed. Optional.
89 | 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.
90 | print("\n--- API RESPONSE ---")
91 |
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:92:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
93 | print("Status: \(httpResponse.statusCode)")
94 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:92:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | print("Status: \(httpResponse.statusCode)")
94 |
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:93:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
93 | print("Status: \(httpResponse.statusCode)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
94 |
95 | let headers: [String: String] = Dictionary(
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:96:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
94 |
95 | let headers: [String: String] = Dictionary(
96 | uniqueKeysWithValues: httpResponse.allHeaderFields.compactMap { entry in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
97 | guard let name = entry.key as? String, let value = entry.value as? String else {
98 | return nil
/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
[558/681] 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:48:20: error: cannot find type 'URLRequest' in scope
46 | /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
47 | func execute(
48 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:27:23: error: cannot find type 'URLRequest' in scope
25 | for request: URLRequest,
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
28 | }
29 |
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:25:22: error: cannot find type 'URLRequest' in scope
23 | /// - Throws: An error if authorization cannot be prepared.
24 | func authenticatedRequest(
25 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
/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:59:24: error: cannot find type 'URLSessionDelegate' in scope
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
| `- error: cannot find type 'URLSessionDelegate' in scope
60 | delegateQueue: OperationQueue? = nil,
61 | responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:60:24: error: cannot find type 'OperationQueue' in scope
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
60 | delegateQueue: OperationQueue? = nil,
| `- error: cannot find type 'OperationQueue' in scope
61 | responseProvider: ATRequestExecutor? = nil,
62 | requestAuthenticator: ATRequestAuthenticator? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:58:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | /// Defaults to `nil`.
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 | delegate: (any URLSessionDelegate)? = nil,
60 | 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:134:10: error: cannot find type 'URLRequest' in scope
132 | proxyValue: String? = nil,
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
135 | var request = URLRequest(url: requestURL)
136 | request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:210:54: error: cannot find type 'URLRequest' in scope
208 | /// - decodeTo: The type to decode the response into.
209 | /// - Returns: An instance of the specified `Decodable` type.
210 | 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
211 | let data = try await self.performRequest(request, withEncodingBody: body)
212 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:234:40: error: cannot find type 'URLRequest' in scope
232 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
233 | /// - Returns: A `Data` object that contains the blob.
234 | public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
235 | let data = try await self.performRequest(request, withEncodingBody: body)
236 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:246:54: error: cannot find type 'URLRequest' in scope
244 | /// - decodeTo: The type to decode the response into.
245 | /// - Returns: An instance of the specified `Decodable` type.
246 | public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
247 | var urlRequest = request
248 | urlRequest.httpBody = data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:44: error: cannot find type 'URLRequest' in scope
289 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
290 | /// - Returns: A tuple containing the data and the HTTPURLResponse.
291 | private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
292 | // Wait for ATRecordTypeRegistry to be ready before proceeding
293 | 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:100:64: error: reference to member 'default' cannot be resolved without a contextual type
98 | /// - ``APIClientConfiguration``
99 | public init(with configuration: APIClientConfiguration) {
100 | let config = configuration.urlSessionConfiguration ?? .default
| `- error: reference to member 'default' cannot be resolved without a contextual type
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:102:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 | let config = configuration.urlSessionConfiguration ?? .default
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
103 | self.executor = configuration.responseProvider
104 | self.requestAuthenticator = configuration.requestAuthenticator
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:135:23: error: cannot find 'URLRequest' in scope
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
135 | var request = URLRequest(url: requestURL)
| `- error: cannot find 'URLRequest' in scope
136 | request.httpMethod = httpMethod.rawValue
137 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:257:46: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | }
256 |
257 | let (responseData, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
258 | if let executor {
259 | (responseData, response) = try await executor.execute(
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:264:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
262 | )
263 | } else {
264 | (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
265 | }
266 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
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:271:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
269 | }
270 |
271 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:273:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
271 | guard httpResponse.statusCode == 200 else {
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
274 | throw URLError(.badServerResponse)
275 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:320:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
318 |
319 | do {
320 | let (data, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
321 | if let executor = self.executor {
322 | (data, response) = try await executor.execute(
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:327:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
325 | )
326 | } else {
327 | (data, response) = try await urlSession.data(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
328 | }
329 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
335 | switch httpResponse.statusCode {
336 | case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 | switch httpResponse.statusCode {
336 | 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:335:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
335 | switch httpResponse.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
336 | case 200:
337 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:346:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
344 | throw ATAPIError.badRequest(error: errorResponse)
345 | case 401:
346 | let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
347 | let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
348 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:382:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
380 | throw ATAPIError.payloadTooLarge(error: errorResponse)
381 | case 429:
382 | let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
383 | TimeInterval(retryAfterHeader)
384 | } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:430:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
428 | default:
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:431:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
433 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The base hostname of the PLC directory.
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/ATBuiltInIdentityResolver.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
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/ATBuiltInIdentityResolver.swift:37:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:37:35: error: value of type '_' expected to be instance of class or class-constrained type
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:16: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
26 |
27 | /// The base hostname of the PLC directory.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:47:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
45 | let documentURL = try didDocumentURL(for: did)
46 |
47 | let (data, response) = try await urlSession.data(from: documentURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
48 | guard let httpResponse = response as? HTTPURLResponse,
49 | (200..<300).contains(httpResponse.statusCode) else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:50:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | _ request: URLRequest,
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | }
52 |
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/ATRequestExecutor.swift:60:36: error: cannot find type 'URLRequest' in scope
58 |
59 | /// The closure that executes a complete request.
60 | public let handler: @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
61 |
62 | /// Creates a closure-backed request executor.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:66:39: error: cannot find type 'URLRequest' in scope
64 | /// - Parameter handler: The closure that executes a complete request.
65 | public init(
66 | handler: @escaping @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
67 | ) {
68 | self.handler = handler
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:80:20: error: cannot find type 'URLRequest' in scope
78 | /// - Throws: An error from the underlying request closure.
79 | public func execute(
80 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:82:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
80 | _ request: URLRequest,
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return try await handler(request, authorizationRequirement)
84 | }
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/Extensions/ExtensionHelpers.swift:275:11: error: cannot find type 'URLRequest' in scope
273 |
274 | // MARK: - URLRequest Extension
275 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
276 |
277 | private static let atProtoKitAuthorizationRequirementKey = "com.cjrriley.ATProtoKit.authorizationRequirement"
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:49:39: error: cannot find type 'URLRequest' in scope
47 | /// - request: The `URLRequest` about to be sent.
48 | /// - body: The encoded HTTP body data for the request. Optional.
49 | public func logRequest(_ request: URLRequest, body: Data?) {
| `- error: cannot find type 'URLRequest' in scope
50 | print("\n--- API REQUEST ---")
51 | print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:89:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
87 | /// - data: The raw response data, if any. Optional.
88 | /// - error: An `Error` if the request failed. Optional.
89 | 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.
90 | print("\n--- API RESPONSE ---")
91 |
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:92:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
93 | print("Status: \(httpResponse.statusCode)")
94 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:92:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | print("Status: \(httpResponse.statusCode)")
94 |
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:93:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
93 | print("Status: \(httpResponse.statusCode)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
94 |
95 | let headers: [String: String] = Dictionary(
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:96:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
94 |
95 | let headers: [String: String] = Dictionary(
96 | uniqueKeysWithValues: httpResponse.allHeaderFields.compactMap { entry in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
97 | guard let name = entry.key as? String, let value = entry.value as? String else {
98 | return nil
/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
[559/681] 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:48:20: error: cannot find type 'URLRequest' in scope
46 | /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
47 | func execute(
48 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:27:23: error: cannot find type 'URLRequest' in scope
25 | for request: URLRequest,
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
28 | }
29 |
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:25:22: error: cannot find type 'URLRequest' in scope
23 | /// - Throws: An error if authorization cannot be prepared.
24 | func authenticatedRequest(
25 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
/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:59:24: error: cannot find type 'URLSessionDelegate' in scope
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
| `- error: cannot find type 'URLSessionDelegate' in scope
60 | delegateQueue: OperationQueue? = nil,
61 | responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:60:24: error: cannot find type 'OperationQueue' in scope
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
60 | delegateQueue: OperationQueue? = nil,
| `- error: cannot find type 'OperationQueue' in scope
61 | responseProvider: ATRequestExecutor? = nil,
62 | requestAuthenticator: ATRequestAuthenticator? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:58:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | /// Defaults to `nil`.
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 | delegate: (any URLSessionDelegate)? = nil,
60 | 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:134:10: error: cannot find type 'URLRequest' in scope
132 | proxyValue: String? = nil,
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
135 | var request = URLRequest(url: requestURL)
136 | request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:210:54: error: cannot find type 'URLRequest' in scope
208 | /// - decodeTo: The type to decode the response into.
209 | /// - Returns: An instance of the specified `Decodable` type.
210 | 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
211 | let data = try await self.performRequest(request, withEncodingBody: body)
212 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:234:40: error: cannot find type 'URLRequest' in scope
232 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
233 | /// - Returns: A `Data` object that contains the blob.
234 | public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
235 | let data = try await self.performRequest(request, withEncodingBody: body)
236 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:246:54: error: cannot find type 'URLRequest' in scope
244 | /// - decodeTo: The type to decode the response into.
245 | /// - Returns: An instance of the specified `Decodable` type.
246 | public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
247 | var urlRequest = request
248 | urlRequest.httpBody = data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:44: error: cannot find type 'URLRequest' in scope
289 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
290 | /// - Returns: A tuple containing the data and the HTTPURLResponse.
291 | private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
292 | // Wait for ATRecordTypeRegistry to be ready before proceeding
293 | 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:100:64: error: reference to member 'default' cannot be resolved without a contextual type
98 | /// - ``APIClientConfiguration``
99 | public init(with configuration: APIClientConfiguration) {
100 | let config = configuration.urlSessionConfiguration ?? .default
| `- error: reference to member 'default' cannot be resolved without a contextual type
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:102:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 | let config = configuration.urlSessionConfiguration ?? .default
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
103 | self.executor = configuration.responseProvider
104 | self.requestAuthenticator = configuration.requestAuthenticator
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:135:23: error: cannot find 'URLRequest' in scope
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
135 | var request = URLRequest(url: requestURL)
| `- error: cannot find 'URLRequest' in scope
136 | request.httpMethod = httpMethod.rawValue
137 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:257:46: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | }
256 |
257 | let (responseData, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
258 | if let executor {
259 | (responseData, response) = try await executor.execute(
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:264:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
262 | )
263 | } else {
264 | (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
265 | }
266 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
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:271:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
269 | }
270 |
271 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:273:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
271 | guard httpResponse.statusCode == 200 else {
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
274 | throw URLError(.badServerResponse)
275 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:320:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
318 |
319 | do {
320 | let (data, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
321 | if let executor = self.executor {
322 | (data, response) = try await executor.execute(
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:327:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
325 | )
326 | } else {
327 | (data, response) = try await urlSession.data(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
328 | }
329 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
335 | switch httpResponse.statusCode {
336 | case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 | switch httpResponse.statusCode {
336 | 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:335:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
335 | switch httpResponse.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
336 | case 200:
337 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:346:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
344 | throw ATAPIError.badRequest(error: errorResponse)
345 | case 401:
346 | let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
347 | let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
348 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:382:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
380 | throw ATAPIError.payloadTooLarge(error: errorResponse)
381 | case 429:
382 | let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
383 | TimeInterval(retryAfterHeader)
384 | } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:430:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
428 | default:
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:431:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
433 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The base hostname of the PLC directory.
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/ATBuiltInIdentityResolver.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
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/ATBuiltInIdentityResolver.swift:37:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:37:35: error: value of type '_' expected to be instance of class or class-constrained type
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:16: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
26 |
27 | /// The base hostname of the PLC directory.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:47:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
45 | let documentURL = try didDocumentURL(for: did)
46 |
47 | let (data, response) = try await urlSession.data(from: documentURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
48 | guard let httpResponse = response as? HTTPURLResponse,
49 | (200..<300).contains(httpResponse.statusCode) else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:50:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | _ request: URLRequest,
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | }
52 |
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/ATRequestExecutor.swift:60:36: error: cannot find type 'URLRequest' in scope
58 |
59 | /// The closure that executes a complete request.
60 | public let handler: @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
61 |
62 | /// Creates a closure-backed request executor.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:66:39: error: cannot find type 'URLRequest' in scope
64 | /// - Parameter handler: The closure that executes a complete request.
65 | public init(
66 | handler: @escaping @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
67 | ) {
68 | self.handler = handler
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:80:20: error: cannot find type 'URLRequest' in scope
78 | /// - Throws: An error from the underlying request closure.
79 | public func execute(
80 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:82:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
80 | _ request: URLRequest,
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return try await handler(request, authorizationRequirement)
84 | }
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/Extensions/ExtensionHelpers.swift:275:11: error: cannot find type 'URLRequest' in scope
273 |
274 | // MARK: - URLRequest Extension
275 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
276 |
277 | private static let atProtoKitAuthorizationRequirementKey = "com.cjrriley.ATProtoKit.authorizationRequirement"
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:49:39: error: cannot find type 'URLRequest' in scope
47 | /// - request: The `URLRequest` about to be sent.
48 | /// - body: The encoded HTTP body data for the request. Optional.
49 | public func logRequest(_ request: URLRequest, body: Data?) {
| `- error: cannot find type 'URLRequest' in scope
50 | print("\n--- API REQUEST ---")
51 | print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:89:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
87 | /// - data: The raw response data, if any. Optional.
88 | /// - error: An `Error` if the request failed. Optional.
89 | 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.
90 | print("\n--- API RESPONSE ---")
91 |
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:92:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
93 | print("Status: \(httpResponse.statusCode)")
94 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:92:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | print("Status: \(httpResponse.statusCode)")
94 |
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:93:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
93 | print("Status: \(httpResponse.statusCode)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
94 |
95 | let headers: [String: String] = Dictionary(
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:96:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
94 |
95 | let headers: [String: String] = Dictionary(
96 | uniqueKeysWithValues: httpResponse.allHeaderFields.compactMap { entry in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
97 | guard let name = entry.key as? String, let value = entry.value as? String else {
98 | return nil
/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
[560/681] 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:48:20: error: cannot find type 'URLRequest' in scope
46 | /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
47 | func execute(
48 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:27:23: error: cannot find type 'URLRequest' in scope
25 | for request: URLRequest,
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
28 | }
29 |
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:25:22: error: cannot find type 'URLRequest' in scope
23 | /// - Throws: An error if authorization cannot be prepared.
24 | func authenticatedRequest(
25 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
/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:59:24: error: cannot find type 'URLSessionDelegate' in scope
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
| `- error: cannot find type 'URLSessionDelegate' in scope
60 | delegateQueue: OperationQueue? = nil,
61 | responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:60:24: error: cannot find type 'OperationQueue' in scope
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
60 | delegateQueue: OperationQueue? = nil,
| `- error: cannot find type 'OperationQueue' in scope
61 | responseProvider: ATRequestExecutor? = nil,
62 | requestAuthenticator: ATRequestAuthenticator? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:58:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | /// Defaults to `nil`.
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 | delegate: (any URLSessionDelegate)? = nil,
60 | 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:134:10: error: cannot find type 'URLRequest' in scope
132 | proxyValue: String? = nil,
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
135 | var request = URLRequest(url: requestURL)
136 | request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:210:54: error: cannot find type 'URLRequest' in scope
208 | /// - decodeTo: The type to decode the response into.
209 | /// - Returns: An instance of the specified `Decodable` type.
210 | 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
211 | let data = try await self.performRequest(request, withEncodingBody: body)
212 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:234:40: error: cannot find type 'URLRequest' in scope
232 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
233 | /// - Returns: A `Data` object that contains the blob.
234 | public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
235 | let data = try await self.performRequest(request, withEncodingBody: body)
236 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:246:54: error: cannot find type 'URLRequest' in scope
244 | /// - decodeTo: The type to decode the response into.
245 | /// - Returns: An instance of the specified `Decodable` type.
246 | public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
247 | var urlRequest = request
248 | urlRequest.httpBody = data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:44: error: cannot find type 'URLRequest' in scope
289 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
290 | /// - Returns: A tuple containing the data and the HTTPURLResponse.
291 | private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
292 | // Wait for ATRecordTypeRegistry to be ready before proceeding
293 | 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:100:64: error: reference to member 'default' cannot be resolved without a contextual type
98 | /// - ``APIClientConfiguration``
99 | public init(with configuration: APIClientConfiguration) {
100 | let config = configuration.urlSessionConfiguration ?? .default
| `- error: reference to member 'default' cannot be resolved without a contextual type
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:102:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 | let config = configuration.urlSessionConfiguration ?? .default
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
103 | self.executor = configuration.responseProvider
104 | self.requestAuthenticator = configuration.requestAuthenticator
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:135:23: error: cannot find 'URLRequest' in scope
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
135 | var request = URLRequest(url: requestURL)
| `- error: cannot find 'URLRequest' in scope
136 | request.httpMethod = httpMethod.rawValue
137 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:257:46: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | }
256 |
257 | let (responseData, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
258 | if let executor {
259 | (responseData, response) = try await executor.execute(
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:264:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
262 | )
263 | } else {
264 | (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
265 | }
266 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
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:271:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
269 | }
270 |
271 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:273:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
271 | guard httpResponse.statusCode == 200 else {
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
274 | throw URLError(.badServerResponse)
275 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:320:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
318 |
319 | do {
320 | let (data, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
321 | if let executor = self.executor {
322 | (data, response) = try await executor.execute(
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:327:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
325 | )
326 | } else {
327 | (data, response) = try await urlSession.data(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
328 | }
329 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
335 | switch httpResponse.statusCode {
336 | case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 | switch httpResponse.statusCode {
336 | 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:335:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
335 | switch httpResponse.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
336 | case 200:
337 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:346:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
344 | throw ATAPIError.badRequest(error: errorResponse)
345 | case 401:
346 | let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
347 | let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
348 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:382:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
380 | throw ATAPIError.payloadTooLarge(error: errorResponse)
381 | case 429:
382 | let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
383 | TimeInterval(retryAfterHeader)
384 | } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:430:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
428 | default:
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:431:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
433 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The base hostname of the PLC directory.
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/ATBuiltInIdentityResolver.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
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/ATBuiltInIdentityResolver.swift:37:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:37:35: error: value of type '_' expected to be instance of class or class-constrained type
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:16: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
26 |
27 | /// The base hostname of the PLC directory.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:47:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
45 | let documentURL = try didDocumentURL(for: did)
46 |
47 | let (data, response) = try await urlSession.data(from: documentURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
48 | guard let httpResponse = response as? HTTPURLResponse,
49 | (200..<300).contains(httpResponse.statusCode) else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:50:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | _ request: URLRequest,
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | }
52 |
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/ATRequestExecutor.swift:60:36: error: cannot find type 'URLRequest' in scope
58 |
59 | /// The closure that executes a complete request.
60 | public let handler: @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
61 |
62 | /// Creates a closure-backed request executor.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:66:39: error: cannot find type 'URLRequest' in scope
64 | /// - Parameter handler: The closure that executes a complete request.
65 | public init(
66 | handler: @escaping @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
67 | ) {
68 | self.handler = handler
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:80:20: error: cannot find type 'URLRequest' in scope
78 | /// - Throws: An error from the underlying request closure.
79 | public func execute(
80 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:82:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
80 | _ request: URLRequest,
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return try await handler(request, authorizationRequirement)
84 | }
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/Extensions/ExtensionHelpers.swift:275:11: error: cannot find type 'URLRequest' in scope
273 |
274 | // MARK: - URLRequest Extension
275 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
276 |
277 | private static let atProtoKitAuthorizationRequirementKey = "com.cjrriley.ATProtoKit.authorizationRequirement"
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:49:39: error: cannot find type 'URLRequest' in scope
47 | /// - request: The `URLRequest` about to be sent.
48 | /// - body: The encoded HTTP body data for the request. Optional.
49 | public func logRequest(_ request: URLRequest, body: Data?) {
| `- error: cannot find type 'URLRequest' in scope
50 | print("\n--- API REQUEST ---")
51 | print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:89:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
87 | /// - data: The raw response data, if any. Optional.
88 | /// - error: An `Error` if the request failed. Optional.
89 | 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.
90 | print("\n--- API RESPONSE ---")
91 |
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:92:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
93 | print("Status: \(httpResponse.statusCode)")
94 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:92:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | print("Status: \(httpResponse.statusCode)")
94 |
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:93:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
93 | print("Status: \(httpResponse.statusCode)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
94 |
95 | let headers: [String: String] = Dictionary(
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:96:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
94 |
95 | let headers: [String: String] = Dictionary(
96 | uniqueKeysWithValues: httpResponse.allHeaderFields.compactMap { entry in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
97 | guard let name = entry.key as? String, let value = entry.value as? String else {
98 | return nil
/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
[561/681] Compiling ATProtoKit resource_bundle_accessor.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:48:20: error: cannot find type 'URLRequest' in scope
46 | /// - Throws: An error if the request fails, is cancelled, or if a networking error occurs.
47 | func execute(
48 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:27:23: error: cannot find type 'URLRequest' in scope
25 | for request: URLRequest,
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
28 | }
29 |
/host/spi-builder-workspace/Sources/ATProtoKit/APIReference/SessionManager/SessionAuthorization.swift:25:22: error: cannot find type 'URLRequest' in scope
23 | /// - Throws: An error if authorization cannot be prepared.
24 | func authenticatedRequest(
25 | for request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
26 | authorizationRequirement: ATRequestAuthorizationRequirement
27 | ) async throws -> URLRequest
/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:59:24: error: cannot find type 'URLSessionDelegate' in scope
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
| `- error: cannot find type 'URLSessionDelegate' in scope
60 | delegateQueue: OperationQueue? = nil,
61 | responseProvider: ATRequestExecutor? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:60:24: error: cannot find type 'OperationQueue' in scope
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
59 | delegate: (any URLSessionDelegate)? = nil,
60 | delegateQueue: OperationQueue? = nil,
| `- error: cannot find type 'OperationQueue' in scope
61 | responseProvider: ATRequestExecutor? = nil,
62 | requestAuthenticator: ATRequestAuthenticator? = nil,
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientConfiguration.swift:58:34: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | /// Defaults to `nil`.
57 | public init(
58 | urlSessionConfiguration: URLSessionConfiguration? = nil,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 | delegate: (any URLSessionDelegate)? = nil,
60 | 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:134:10: error: cannot find type 'URLRequest' in scope
132 | proxyValue: String? = nil,
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
135 | var request = URLRequest(url: requestURL)
136 | request.httpMethod = httpMethod.rawValue
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:210:54: error: cannot find type 'URLRequest' in scope
208 | /// - decodeTo: The type to decode the response into.
209 | /// - Returns: An instance of the specified `Decodable` type.
210 | 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
211 | let data = try await self.performRequest(request, withEncodingBody: body)
212 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:234:40: error: cannot find type 'URLRequest' in scope
232 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
233 | /// - Returns: A `Data` object that contains the blob.
234 | public func sendRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
235 | let data = try await self.performRequest(request, withEncodingBody: body)
236 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:246:54: error: cannot find type 'URLRequest' in scope
244 | /// - decodeTo: The type to decode the response into.
245 | /// - Returns: An instance of the specified `Decodable` type.
246 | public func sendRequest<T: Decodable>(_ request: URLRequest, withDataBody data: Data, decodeTo: T.Type) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
247 | var urlRequest = request
248 | urlRequest.httpBody = data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:291:44: error: cannot find type 'URLRequest' in scope
289 | /// - body: An optional `Encodable` body to be encoded and attached to the request.
290 | /// - Returns: A tuple containing the data and the HTTPURLResponse.
291 | private func performRequest(_ request: URLRequest, withEncodingBody body: (Encodable & Sendable)? = nil) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
292 | // Wait for ATRecordTypeRegistry to be ready before proceeding
293 | 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:100:64: error: reference to member 'default' cannot be resolved without a contextual type
98 | /// - ``APIClientConfiguration``
99 | public init(with configuration: APIClientConfiguration) {
100 | let config = configuration.urlSessionConfiguration ?? .default
| `- error: reference to member 'default' cannot be resolved without a contextual type
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:102:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
100 | let config = configuration.urlSessionConfiguration ?? .default
101 | config.httpAdditionalHeaders = ["User-Agent": APIClientService.userAgent]
102 | self.urlSession = URLSession(configuration: config, delegate: configuration.delegate, delegateQueue: configuration.delegateQueue)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
103 | self.executor = configuration.responseProvider
104 | self.requestAuthenticator = configuration.requestAuthenticator
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:135:23: error: cannot find 'URLRequest' in scope
133 | isRelatedToBskyChat: Bool = false
134 | ) -> URLRequest {
135 | var request = URLRequest(url: requestURL)
| `- error: cannot find 'URLRequest' in scope
136 | request.httpMethod = httpMethod.rawValue
137 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:257:46: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
255 | }
256 |
257 | let (responseData, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
258 | if let executor {
259 | (responseData, response) = try await executor.execute(
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:264:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
262 | )
263 | } else {
264 | (responseData, response) = try await urlSession.upload(for: urlRequest, from: data)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'upload'
265 | }
266 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:267:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 | }
266 |
267 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 | throw ATHTTPRequestError.errorGettingResponse
269 | }
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:271:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
269 | }
270 |
271 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:273:53: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
271 | guard httpResponse.statusCode == 200 else {
272 | let responseBody = String(data: responseData, encoding: .utf8) ?? "No response body"
273 | print("HTTP Status Code: \(httpResponse.statusCode) - Response Body: \(responseBody)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
274 | throw URLError(.badServerResponse)
275 | }
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:320:42: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
318 |
319 | do {
320 | let (data, response): (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
321 | if let executor = self.executor {
322 | (data, response) = try await executor.execute(
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:327:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
325 | )
326 | } else {
327 | (data, response) = try await urlSession.data(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
328 | }
329 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:44: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
335 | switch httpResponse.statusCode {
336 | case 200:
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:334:48: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
332 | #endif
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 | switch httpResponse.statusCode {
336 | 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:335:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
333 |
334 | if let httpResponse = response as? HTTPURLResponse {
335 | switch httpResponse.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
336 | case 200:
337 | return data
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:346:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
344 | throw ATAPIError.badRequest(error: errorResponse)
345 | case 401:
346 | let wwwAuthenticateHeader = httpResponse.allHeaderFields["WWW-Authenticate"] as? String
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
347 | let errorResponse = try JSONDecoder().decode(ATHTTPResponseError.self, from: data)
348 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:382:101: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
380 | throw ATAPIError.payloadTooLarge(error: errorResponse)
381 | case 429:
382 | let retryAfterValue: TimeInterval? = if let retryAfterHeader = httpResponse.allHeaderFields["ratelimit-reset"] as? String {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
383 | TimeInterval(retryAfterHeader)
384 | } else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:430:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
428 | default:
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/APIClientService.swift:431:56: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
429 | let errorResponse = String(data: data, encoding: .utf8) ?? "No response body"
430 | let errorCode = httpResponse.statusCode
431 | let httpHeaders = httpResponse.allHeaderFields as? [String: String] ?? [:]
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
432 | let error = ATAPIError.unknown(error: errorResponse, errorCode: errorCode, errorData: data, httpHeaders: httpHeaders)
433 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The base hostname of the PLC directory.
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/ATBuiltInIdentityResolver.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
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/ATBuiltInIdentityResolver.swift:37:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:37:35: error: value of type '_' expected to be instance of class or class-constrained type
35 | /// ``APIHostname/plcDirectory``.
36 | public init(
37 | urlSession: URLSession = .shared,
| `- error: value of type '_' expected to be instance of class or class-constrained type
38 | plcDirectoryURL: String = APIHostname.plcDirectory
39 | ) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:25:16: warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
23 |
24 | /// The URL session used for the lookups.
25 | public let urlSession: URLSession
| `- warning: stored property 'urlSession' of 'Sendable'-conforming struct 'ATBuiltInIdentityResolver' has non-Sendable type 'AnyObject'; this is an error in the Swift 6 language mode
26 |
27 | /// The base hostname of the PLC directory.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATBuiltInIdentityResolver.swift:47:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
45 | let documentURL = try didDocumentURL(for: did)
46 |
47 | let (data, response) = try await urlSession.data(from: documentURL)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
48 | guard let httpResponse = response as? HTTPURLResponse,
49 | (200..<300).contains(httpResponse.statusCode) else {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:50:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | _ request: URLRequest,
49 | authorizationRequirement: ATRequestAuthorizationRequirement
50 | ) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | }
52 |
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/ATRequestExecutor.swift:60:36: error: cannot find type 'URLRequest' in scope
58 |
59 | /// The closure that executes a complete request.
60 | public let handler: @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
61 |
62 | /// Creates a closure-backed request executor.
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:66:39: error: cannot find type 'URLRequest' in scope
64 | /// - Parameter handler: The closure that executes a complete request.
65 | public init(
66 | handler: @escaping @Sendable (URLRequest, ATRequestAuthorizationRequirement) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
67 | ) {
68 | self.handler = handler
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:80:20: error: cannot find type 'URLRequest' in scope
78 | /// - Throws: An error from the underlying request closure.
79 | public func execute(
80 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/ATRequestExecutor.swift:82:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
80 | _ request: URLRequest,
81 | authorizationRequirement: ATRequestAuthorizationRequirement
82 | ) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return try await handler(request, authorizationRequirement)
84 | }
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/Extensions/ExtensionHelpers.swift:275:11: error: cannot find type 'URLRequest' in scope
273 |
274 | // MARK: - URLRequest Extension
275 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
276 |
277 | private static let atProtoKitAuthorizationRequirementKey = "com.cjrriley.ATProtoKit.authorizationRequirement"
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:49:39: error: cannot find type 'URLRequest' in scope
47 | /// - request: The `URLRequest` about to be sent.
48 | /// - body: The encoded HTTP body data for the request. Optional.
49 | public func logRequest(_ request: URLRequest, body: Data?) {
| `- error: cannot find type 'URLRequest' in scope
50 | print("\n--- API REQUEST ---")
51 | print("URL: \(request.url?.absoluteString ?? "(nil)")")
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:89:41: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
87 | /// - data: The raw response data, if any. Optional.
88 | /// - error: An `Error` if the request failed. Optional.
89 | 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.
90 | print("\n--- API RESPONSE ---")
91 |
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:92:40: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
93 | print("Status: \(httpResponse.statusCode)")
94 |
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:92:44: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | print("\n--- API RESPONSE ---")
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
93 | print("Status: \(httpResponse.statusCode)")
94 |
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:93:43: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 |
92 | if let httpResponse = response as? HTTPURLResponse {
93 | print("Status: \(httpResponse.statusCode)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
94 |
95 | let headers: [String: String] = Dictionary(
/host/spi-builder-workspace/Sources/ATProtoKit/Utilities/Logging/ConsoleDebugger.swift:96:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
94 |
95 | let headers: [String: String] = Dictionary(
96 | uniqueKeysWithValues: httpResponse.allHeaderFields.compactMap { entry in
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
97 | guard let name = entry.key as? String, let value = entry.value as? String else {
98 | return nil
/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
[562/681] Compiling ATProtoKit ToolsOzoneSafelinkRemoveRule.swift
[563/681] Compiling ATProtoKit ToolsOzoneSafelinkUpdateRule.swift
[564/681] Compiling ATProtoKit ToolsOzoneServerGetConfig.swift
[565/681] Compiling ATProtoKit ToolsOzoneModerationSetAddValues.swift
[566/681] Compiling ATProtoKit ToolsOzoneSetDefs.swift
[567/681] Compiling ATProtoKit ToolsOzoneSetDeleteSet.swift
[568/681] Compiling ATProtoKit ToolsOzoneSetDeleteValues.swift
[569/681] Compiling ATProtoKit ToolsOzoneSetGetValues.swift
[570/681] Compiling ATProtoKit ToolsOzoneSetQuerySets.swift
[571/681] Compiling ATProtoKit ToolsOzoneSettingDefs.swift
[572/681] Compiling ATProtoKit ToolsOzoneSettingListOptions.swift
[573/681] Compiling ATProtoKit ToolsOzoneSettingRemoveOptions.swift
[574/681] Compiling ATProtoKit ToolsOzoneSettingUpsertOption.swift
[575/681] Compiling ATProtoKit ToolsOzoneSignatureDefs.swift
[576/681] Compiling ATProtoKit ToolsOzoneSignatureFindCorrelation.swift
[577/681] Compiling ATProtoKit ToolsOzoneSignatureFindRelatedAccounts.swift
[578/681] Compiling ATProtoKit ToolsOzoneSignatureSearchAccounts.swift
[579/681] Compiling ATProtoKit ToolsOzoneTeamAddMember.swift
[580/681] Compiling ATProtoKit ToolsOzoneTeamDefs.swift
[581/681] Compiling ATProtoKit ToolsOzoneTeamDeleteMember.swift
[582/681] Compiling ATProtoKit ToolsOzoneTeamListMembers.swift
[583/681] Compiling ATProtoKit ToolsOzoneTeamUpdateMember.swift
[584/681] Compiling ATProtoKit ToolsOzoneLexicon.swift
[585/681] Compiling ATProtoKit ToolsOzoneVerificationDefs.swift
[586/681] Compiling ATProtoKit ComAtprotoTempRequestPhoneVerification.swift
[587/681] Compiling ATProtoKit ComAtprotoTempRevokeAccountCredentials.swift
[588/681] Compiling ATProtoKit ToolsOzoneCommunicationCreateTemplate.swift
[589/681] Compiling ATProtoKit ToolsOzoneCommunicationDefs.swift
[590/681] Compiling ATProtoKit ToolsOzoneCommunicationDeleteTemplate.swift
[591/681] Compiling ATProtoKit ToolsOzoneCommunicationListTemplates.swift
[592/681] Compiling ATProtoKit ToolsOzoneCommunicationUpdateTemplate.swift
[593/681] Compiling ATProtoKit ToolsOzoneHostingGetAccountHistory.swift
[594/681] Compiling ATProtoKit ToolsOzoneModerationCancelScheduledActions.swift
[595/681] Compiling ATProtoKit ToolsOzoneModerationDefs.swift
[596/681] Compiling ATProtoKit ToolsOzoneModerationEmitEvent.swift
[597/681] Compiling ATProtoKit ToolsOzoneModerationGetAccountTimeline.swift
[598/681] Compiling ATProtoKit ToolsOzoneModerationGetRecords.swift
[599/681] Compiling ATProtoKit ToolsOzoneModerationGetReporterStats.swift
[600/681] Compiling ATProtoKit ToolsOzoneModerationGetRepos.swift
[601/681] Compiling ATProtoKit ToolsOzoneModerationGetSubjects.swift
[602/681] Compiling ATProtoKit ToolsOzoneModerationListScheduledActions.swift
[603/681] Compiling ATProtoKit ToolsOzoneModerationQueryEvents.swift
[604/681] Compiling ATProtoKit ToolsOzoneModerationQueryStatuses.swift
[605/681] Compiling ATProtoKit ToolsOzoneModerationSearchRepos.swift
[606/681] Compiling ATProtoKit ToolsOzoneQueueAssignModerator.swift
[607/681] Compiling ATProtoKit ToolsOzoneQueueCreateQueue.swift
[608/681] Compiling ATProtoKit ToolsOzoneQueueDefs.swift
[609/681] Compiling ATProtoKit ToolsOzoneQueueDeleteQueue.swift
[610/681] Compiling ATProtoKit AppBskyUnspeccedGetTrends.swift
[611/681] Compiling ATProtoKit AppBskyUnspeccedGetTrendsSkeleton.swift
[612/681] Compiling ATProtoKit AppBskyUnspeccedInitAgeAssurance.swift
[613/681] Compiling ATProtoKit AppBskyUnspeccedSearchActorsSkeleton.swift
[614/681] Compiling ATProtoKit AppBskyUnspeccedSearchPostsSkeleton.swift
[615/681] Compiling ATProtoKit AppBskyUnspeccedStarterPacksSkeleton.swift
[616/681] Compiling ATProtoKit AppBskyVideoDefs.swift
[617/681] Compiling ATProtoKit AppBskyVideoGetJobStatus.swift
[618/681] Compiling ATProtoKit AppBskyVideoGetUploadLimits.swift
[619/681] Compiling ATProtoKit AppBskyVideoUploadVideo.swift
[620/681] Compiling ATProtoKit ChatBskyActorDeclaration.swift
[621/681] Compiling ATProtoKit ChatBskyActorDefs.swift
[622/681] Compiling ATProtoKit ChatBskyActorDeleteAccount.swift
[623/681] Compiling ATProtoKit ChatBskyLexicon.swift
[624/681] Compiling ATProtoKit ChatBskyConvoAcceptConvo.swift
[625/681] Compiling ATProtoKit ChatBskyConvoAddReaction.swift
[626/681] Compiling ATProtoKit ChatBskyConvoDefs.swift
[627/681] Compiling ATProtoKit ChatBskyConvoDeleteMessageForSelf.swift
[628/681] Compiling ATProtoKit ChatBskyConvoGetConvo.swift
[629/681] Compiling ATProtoKit ChatBskyConvoGetConvoAvailability.swift
[630/681] Compiling ATProtoKit ChatBskyConvoGetConvoForMembers.swift
[631/681] Compiling ATProtoKit ChatBskyConvoGetLog.swift
[632/681] Compiling ATProtoKit ChatBskyConvoGetMessages.swift
[633/681] Compiling ATProtoKit ChatBskyConvoLeaveConvo.swift
[634/681] Compiling ATProtoKit ToolsOzoneQueueGetAssignments.swift
[635/681] Compiling ATProtoKit ToolsOzoneQueueListQueues.swift
[636/681] Compiling ATProtoKit ToolsOzoneQueueRouteReports.swift
[637/681] Compiling ATProtoKit ToolsOzoneQueueUnassignModerator.swift
[638/681] Compiling ATProtoKit ToolsOzoneQueueUpdateQueue.swift
[639/681] Compiling ATProtoKit ToolsOzoneReportAssignModerator.swift
[640/681] Compiling ATProtoKit ToolsOzoneReportCloseReports.swift
[641/681] Compiling ATProtoKit ToolsOzoneReportCreateActivity.swift
[642/681] Compiling ATProtoKit ToolsOzoneReportDefs.swift
[643/681] Compiling ATProtoKit ToolsOzoneReportGetAssignments.swift
[644/681] Compiling ATProtoKit ToolsOzoneReportGetHistoricalStats.swift
[645/681] Compiling ATProtoKit ToolsOzoneReportGetLatestReport.swift
[646/681] Compiling ATProtoKit ToolsOzoneReportGetLiveStats.swift
[647/681] Compiling ATProtoKit ToolsOzoneReportGetReport.swift
[648/681] Compiling ATProtoKit ToolsOzoneReportListActivities.swift
[649/681] Compiling ATProtoKit ToolsOzoneReportQueryActivities.swift
[650/681] Compiling ATProtoKit ToolsOzoneReportQueryReports.swift
[651/681] Compiling ATProtoKit ToolsOzoneReportReassignQueue.swift
[652/681] Compiling ATProtoKit ToolsOzoneReportRefreshStats.swift
[653/681] Compiling ATProtoKit ToolsOzoneReportUnassignModerator.swift
[654/681] Compiling ATProtoKit ToolsOzoneSafelinkAddRule.swift
[655/681] Compiling ATProtoKit ToolsOzoneSafelinkDefs.swift
[656/681] Compiling ATProtoKit ToolsOzoneSafelinkQueryEvents.swift
[657/681] Compiling ATProtoKit ToolsOzoneSafelinkQueryRules.swift
[658/681] Compiling ATProtoKit AppBskyDraftUpdateDraft.swift
[659/681] Compiling ATProtoKit AppBskyEmbedDefs.swift
[660/681] Compiling ATProtoKit AppBskyEmbedExternal.swift
[661/681] Compiling ATProtoKit AppBskyEmbedGallery.swift
[662/681] Compiling ATProtoKit AppBskyEmbedGetEmbedExternalView.swift
[663/681] Compiling ATProtoKit AppBskyEmbedImages.swift
[664/681] Compiling ATProtoKit AppBskyEmbedRecord.swift
[665/681] Compiling ATProtoKit AppBskyEmbedRecordWithMedia.swift
[666/681] Compiling ATProtoKit AppBskyEmbedVideo.swift
[667/681] Compiling ATProtoKit AppBskyFeedDefs.swift
[668/681] Compiling ATProtoKit AppBskyFeedDescribeFeedGenerator.swift
[669/681] Compiling ATProtoKit AppBskyFeedGenerator.swift
[670/681] Compiling ATProtoKit AppBskyFeedGetActorFeeds.swift
[671/681] Compiling ATProtoKit AppBskyFeedGetActorLikes.swift
[672/681] Compiling ATProtoKit AppBskyFeedGetAuthorFeed.swift
[673/681] Compiling ATProtoKit AppBskyFeedGetFeed.swift
[674/681] Compiling ATProtoKit AppBskyFeedGetFeedGenerator.swift
[675/681] Compiling ATProtoKit AppBskyFeedGetFeedGenerators.swift
[676/681] Compiling ATProtoKit AppBskyFeedGetFeedSkeleton.swift
[677/681] Compiling ATProtoKit AppBskyFeedGetLikes.swift
[678/681] Compiling ATProtoKit AppBskyFeedGetListFeed.swift
[679/681] Compiling ATProtoKit AppBskyFeedGetPostThread.swift
[680/681] Compiling ATProtoKit AppBskyFeedGetPosts.swift
[681/681] Compiling ATProtoKit AppBskyFeedGetQuotes.swift
BUILD FAILURE 6.3 wasm