Build Information
Failed to build Nexio, reference 2.0.0 (aca814), with Swift 6.2 for Linux on 23 Oct 2026 02:18:20 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-53886769-2":/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:linux-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1Build Log
========================================
RunAll
========================================
Builder version: 5.1.3
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ANSCoder/Nexio.git
Reference: 2.0.0
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/ANSCoder/Nexio
* tag 2.0.0 -> FETCH_HEAD
HEAD is now at aca8149 Fix request pipeline, authentication, cancellation, and URL handling (#4)
Cloned https://github.com/ANSCoder/Nexio.git
Revision (git rev-parse @):
aca8149127f8a05a7d1e2942d570fe184e061451
SUCCESS checkout https://github.com/ANSCoder/Nexio.git at 2.0.0
========================================
Build
========================================
Selected platform: linux
Swift version: 6.2
Building package at path: $PWD
https://github.com/ANSCoder/Nexio.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-53886769-2":/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:linux-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
linux-6.2-latest: Pulling from saguaro1/spi-images
Digest: sha256:af72ee10f3ab8145e300c2afec9616a3ae441bd9d7c561ce3ed6cd39331f6017
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:linux-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/15] Emitting module Nexio
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:87: error: cannot find type 'URLRequest' in scope
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:34: error: cannot find type 'URLRequest' in scope
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
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/Nexio/Auth/AuthInterceptor.swift:53:20: error: cannot find type 'URLRequest' in scope
51 |
52 | public func retry(
53 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
54 | dueTo error: NexioError,
55 | attempt: Int
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:80: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:27: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:46:27: error: cannot find type 'URLRequest' in scope
44 | /// - attempt: Zero-based retry counter (0 = first failure).
45 | /// - Returns: `true` to retry, `false` to propagate the error.
46 | func retry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool
| `- error: cannot find type 'URLRequest' in scope
47 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:42:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
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/Nexio/Core/NexioClient.swift:42:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:42:50: error: value of type '_' expected to be instance of class or class-constrained type
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: value of type '_' expected to be instance of class or class-constrained type
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:246:20: error: cannot find type 'URLRequest' in scope
244 | /// match the response, or any status-mapped ``NexioError``.
245 | private func perform<T: Decodable & Sendable>(
246 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
247 | skipDynamicAuth: Bool
248 | ) async throws -> T {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:271:21: error: cannot find type 'URLRequest' in scope
269 | /// transport ``NexioError`` from the final attempt.
270 | private func send(
271 | _ original: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
272 | skipDynamicAuth: Bool
273 | ) async throws -> (Data, HTTPURLResponse) {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:273:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
271 | _ original: URLRequest,
272 | skipDynamicAuth: Bool
273 | ) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
274 | // A token refresh issued from inside an AuthInterceptor provider must not
275 | // go through that same interceptor again, or it would recurse.
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/Nexio/Core/NexioClient.swift:315:86: error: cannot find type 'URLRequest' in scope
313 | /// - skipDynamicAuth: Whether to skip ``AuthInterceptor``.
314 | /// - Returns: The adapted request.
315 | private func adapt(_ request: URLRequest, skipDynamicAuth: Bool) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
316 | var adapted = request
317 | for interceptor in interceptors {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:315:35: error: cannot find type 'URLRequest' in scope
313 | /// - skipDynamicAuth: Whether to skip ``AuthInterceptor``.
314 | /// - Returns: The adapted request.
315 | private func adapt(_ request: URLRequest, skipDynamicAuth: Bool) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
316 | var adapted = request
317 | for interceptor in interceptors {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:336:20: error: cannot find type 'URLRequest' in scope
334 | /// - Returns: `true` to run another attempt.
335 | private func shouldRetry(
336 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
337 | dueTo error: NexioError,
338 | attempt: Int
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:368:17: error: cannot find type 'URLRequest' in scope
366 | headers: [String: String],
367 | body: Body?
368 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
369 | guard let resolved = resolve(url) else {
370 | throw NexioError.invalidURL(url)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:394:71: error: cannot find type 'URLRequest' in scope
392 | /// - Returns: A populated `URLRequest`, ready for the interceptor pipeline.
393 | /// - Throws: ``NexioError/invalidURL(_:)`` if the composed URL is malformed.
394 | private func buildRequest(from endpoint: some Endpoint) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
395 | var components = URLComponents(
396 | url: endpoint.baseURL.appendingPathComponent(endpoint.path),
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:461:56: error: cannot find type 'URLRequest' in scope
459 | ///
460 | /// - Parameter request: The request to mutate in place.
461 | private func applyDefaultHeaders(to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
462 | config.defaultHeaders.forEach { request.setValue($1, forHTTPHeaderField: $0) }
463 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:473:61: error: cannot find type 'URLRequest' in scope
471 | ///
472 | /// - Parameter request: The request to clean, in place.
473 | private func stripCredentialHeaders(from request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
474 | for name in Self.credentialHeaderNames {
475 | request.setValue(nil, forHTTPHeaderField: name)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:485:72: error: cannot find type 'URLRequest' in scope
483 | /// - strategy: The strategy to apply, global or per-endpoint.
484 | /// - request: The request to mutate in place.
485 | private func applyAuth(_ strategy: AuthStrategy, to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
486 | switch strategy {
487 | case .bearer(let token):
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:506:39: error: cannot find type 'URLRequest' in scope
504 | /// - response: The response that came back.
505 | /// - data: The raw response body (only its byte count is logged).
506 | private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
| `- error: cannot find type 'URLRequest' in scope
507 | switch config.logLevel {
508 | case .none:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:506:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
504 | /// - response: The response that came back.
505 | /// - data: The raw response body (only its byte count is logged).
506 | private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
507 | switch config.logLevel {
508 | case .none:
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/Nexio/Core/NexioRequest.swift:30:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 | }
29 |
30 | init(urlSessionTask: URLSessionTask) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | task = _TaskBox(urlSessionTask)
32 | }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:40:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | /// `URLSessionTask` is thread-safe for `cancel()` calls per Apple's docs.
39 | private final class _TaskBox: @unchecked Sendable {
40 | private let wrapped: URLSessionTask
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | init(_ task: URLSessionTask) { wrapped = task }
42 | func cancel() { wrapped.cancel() }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:41:18: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | private final class _TaskBox: @unchecked Sendable {
40 | private let wrapped: URLSessionTask
41 | init(_ task: URLSessionTask) { wrapped = task }
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | func cancel() { wrapped.cancel() }
43 | }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Errors/NexioError.swift:22:23: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | /// The server returned HTTP 401.
22 | case unauthorized(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The server returned HTTP 404.
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/Nexio/Errors/NexioError.swift:25:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The server returned HTTP 404.
25 | case notFound(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The server returned a 5xx or other unexpected status code.
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/Nexio/Errors/NexioError.swift:22:10: error: associated value 'unauthorized' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
20 |
21 | /// The server returned HTTP 401.
22 | case unauthorized(HTTPURLResponse)
| `- error: associated value 'unauthorized' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
23 |
24 | /// The server returned HTTP 404.
/host/spi-builder-workspace/Sources/Nexio/Errors/NexioError.swift:25:10: error: associated value 'notFound' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
23 |
24 | /// The server returned HTTP 404.
25 | case notFound(HTTPURLResponse)
| `- error: associated value 'notFound' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
26 |
27 | /// The server returned a 5xx or other unexpected status code.
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:24:16: error: cannot find type 'PlatformImage' in scope
22 | /// never mutated afterwards, so sharing the reference is safe.
23 | private struct DecodedImage: @unchecked Sendable {
24 | let image: PlatformImage
| `- error: cannot find type 'PlatformImage' in scope
25 | }
26 |
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:51:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
49 | // MARK: - Private State
50 |
51 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 |
53 | // MARK: - Init
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/Nexio/Image/ImageLoader.swift:61:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 | ///
60 | /// - Parameter session: Override for testing. Pass `nil` to use the default.
61 | public init(session: URLSession? = nil) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 | if let session {
63 | self.session = session
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/Nexio/Image/ImageLoader.swift:85:50: error: cannot find type 'PlatformImage' in scope
83 | /// - Throws: ``NexioError`` on network failure; a generic error if the
84 | /// data cannot be decoded as an image.
85 | public func load(_ url: URL) async throws -> PlatformImage {
| `- error: cannot find type 'PlatformImage' in scope
86 | let request = URLRequest(url: url)
87 | let (data, response) = try await session.nexioData(for: request)
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:65:25: error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
63 | self.session = session
64 | } else {
65 | let cache = URLCache(
| `- error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
66 | memoryCapacity: 50 * 1024 * 1024, // 50 MB
67 | diskCapacity: 200 * 1024 * 1024, // 200 MB
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:70:50: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
68 | diskPath: "com.nexio.imagecache"
69 | )
70 | let config = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:72:42: error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
70 | let config = URLSessionConfiguration.default
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
| `- error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
73 | self.session = URLSession(configuration: config)
74 | }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:73:28: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
73 | self.session = URLSession(configuration: config)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
74 | }
75 | }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:52: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Called after a request fails.
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/Nexio/Interceptor/RetryInterceptor.swift:99:33: error: cannot find type 'URLRequest' in scope
97 | /// - attempt: Zero-based attempt counter.
98 | /// - Returns: `true` to run another attempt.
99 | func shouldRetry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool {
| `- error: cannot find type 'URLRequest' in scope
100 | guard maxAttempts > 0, attempt < maxAttempts else { return false }
101 | guard Self.isIdempotent(request), Self.isRetryable(error) else { return false }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:115:41: error: cannot find type 'URLRequest' in scope
113 |
114 | /// Whether repeating `request` is safe. A missing method means GET.
115 | static func isIdempotent(_ request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
116 | let method = (request.httpMethod ?? "GET").uppercased()
117 | return ["GET", "HEAD", "PUT", "DELETE", "OPTIONS"].contains(method)
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:155:87: error: cannot find type 'URLRequest' in scope
153 | }
154 |
155 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
156 | request // pass-through
157 | }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:155:34: error: cannot find type 'URLRequest' in scope
153 | }
154 |
155 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
156 | request // pass-through
157 | }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:155:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
153 | }
154 |
155 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
156 | request // pass-through
157 | }
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/Nexio/Interceptor/RetryInterceptor.swift:160:20: error: cannot find type 'URLRequest' in scope
158 |
159 | public func retry(
160 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
161 | dueTo error: NexioError,
162 | attempt: Int
/host/spi-builder-workspace/Sources/Nexio/Internal/HTTPURLResponseExtensions.swift:6:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
4 | import Foundation
5 |
6 | extension HTTPURLResponse {
| `- error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
7 |
8 | /// Returns `true` when the status code is in the 200–299 range.
/host/spi-builder-workspace/Sources/Nexio/Internal/URLSessionExtensions.swift:6:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
4 | import Foundation
5 |
6 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
7 |
8 | /// Performs a data task and maps common `NSError` codes to ``NexioError``.
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[4/16] Compiling Nexio HTTPURLResponseExtensions.swift
/host/spi-builder-workspace/Sources/Nexio/Internal/HTTPURLResponseExtensions.swift:6:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
4 | import Foundation
5 |
6 | extension HTTPURLResponse {
| `- error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
7 |
8 | /// Returns `true` when the status code is in the 200–299 range.
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[5/16] Compiling Nexio URLSessionExtensions.swift
/host/spi-builder-workspace/Sources/Nexio/Internal/URLSessionExtensions.swift:6:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
4 | import Foundation
5 |
6 | extension URLSession {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
7 |
8 | /// Performs a data task and maps common `NSError` codes to ``NexioError``.
/host/spi-builder-workspace/Sources/Nexio/Internal/URLSessionExtensions.swift:15:33: error: cannot find type 'URLRequest' in scope
13 | /// was cancelled. Non-2xx responses are returned, not thrown, so the caller
14 | /// can decide whether to retry.
15 | func nexioData(for request: URLRequest) async throws -> (Data, HTTPURLResponse) {
| `- error: cannot find type 'URLRequest' in scope
16 | let (data, response): (Data, URLResponse)
17 | do {
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[6/16] Compiling Nexio NexioConfig.swift
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:30:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 | }
29 |
30 | init(urlSessionTask: URLSessionTask) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | task = _TaskBox(urlSessionTask)
32 | }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:40:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | /// `URLSessionTask` is thread-safe for `cancel()` calls per Apple's docs.
39 | private final class _TaskBox: @unchecked Sendable {
40 | private let wrapped: URLSessionTask
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | init(_ task: URLSessionTask) { wrapped = task }
42 | func cancel() { wrapped.cancel() }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:41:18: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | private final class _TaskBox: @unchecked Sendable {
40 | private let wrapped: URLSessionTask
41 | init(_ task: URLSessionTask) { wrapped = task }
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | func cancel() { wrapped.cancel() }
43 | }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:42:29: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
40 | private let wrapped: URLSessionTask
41 | init(_ task: URLSessionTask) { wrapped = task }
42 | func cancel() { wrapped.cancel() }
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
43 | }
[7/16] Compiling Nexio NexioRequest.swift
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:30:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 | }
29 |
30 | init(urlSessionTask: URLSessionTask) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | task = _TaskBox(urlSessionTask)
32 | }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:40:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | /// `URLSessionTask` is thread-safe for `cancel()` calls per Apple's docs.
39 | private final class _TaskBox: @unchecked Sendable {
40 | private let wrapped: URLSessionTask
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | init(_ task: URLSessionTask) { wrapped = task }
42 | func cancel() { wrapped.cancel() }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:41:18: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | private final class _TaskBox: @unchecked Sendable {
40 | private let wrapped: URLSessionTask
41 | init(_ task: URLSessionTask) { wrapped = task }
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
42 | func cancel() { wrapped.cancel() }
43 | }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:42:29: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
40 | private let wrapped: URLSessionTask
41 | init(_ task: URLSessionTask) { wrapped = task }
42 | func cancel() { wrapped.cancel() }
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
43 | }
[8/16] Compiling Nexio AuthInterceptor.swift
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:87: error: cannot find type 'URLRequest' in scope
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:34: error: cannot find type 'URLRequest' in scope
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
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/Nexio/Auth/AuthInterceptor.swift:53:20: error: cannot find type 'URLRequest' in scope
51 |
52 | public func retry(
53 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
54 | dueTo error: NexioError,
55 | attempt: Int
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:80: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:27: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:46:27: error: cannot find type 'URLRequest' in scope
44 | /// - attempt: Zero-based retry counter (0 = first failure).
45 | /// - Returns: `true` to retry, `false` to propagate the error.
46 | func retry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool
| `- error: cannot find type 'URLRequest' in scope
47 | }
[9/16] Compiling Nexio AuthStrategy.swift
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:87: error: cannot find type 'URLRequest' in scope
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:34: error: cannot find type 'URLRequest' in scope
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:34:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | }
33 |
34 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | var mutableRequest = request
36 | let strategy = await AuthResolution.$isResolving.withValue(true) {
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/Nexio/Auth/AuthInterceptor.swift:53:20: error: cannot find type 'URLRequest' in scope
51 |
52 | public func retry(
53 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
54 | dueTo error: NexioError,
55 | attempt: Int
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:80: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:27: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:46:27: error: cannot find type 'URLRequest' in scope
44 | /// - attempt: Zero-based retry counter (0 = first failure).
45 | /// - Returns: `true` to retry, `false` to propagate the error.
46 | func retry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool
| `- error: cannot find type 'URLRequest' in scope
47 | }
[10/16] Compiling Nexio Endpoint.swift
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:42:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
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/Nexio/Core/NexioClient.swift:42:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:42:50: error: value of type '_' expected to be instance of class or class-constrained type
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: value of type '_' expected to be instance of class or class-constrained type
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:246:20: error: cannot find type 'URLRequest' in scope
244 | /// match the response, or any status-mapped ``NexioError``.
245 | private func perform<T: Decodable & Sendable>(
246 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
247 | skipDynamicAuth: Bool
248 | ) async throws -> T {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:271:21: error: cannot find type 'URLRequest' in scope
269 | /// transport ``NexioError`` from the final attempt.
270 | private func send(
271 | _ original: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
272 | skipDynamicAuth: Bool
273 | ) async throws -> (Data, HTTPURLResponse) {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:273:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
271 | _ original: URLRequest,
272 | skipDynamicAuth: Bool
273 | ) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
274 | // A token refresh issued from inside an AuthInterceptor provider must not
275 | // go through that same interceptor again, or it would recurse.
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/Nexio/Core/NexioClient.swift:315:86: error: cannot find type 'URLRequest' in scope
313 | /// - skipDynamicAuth: Whether to skip ``AuthInterceptor``.
314 | /// - Returns: The adapted request.
315 | private func adapt(_ request: URLRequest, skipDynamicAuth: Bool) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
316 | var adapted = request
317 | for interceptor in interceptors {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:315:35: error: cannot find type 'URLRequest' in scope
313 | /// - skipDynamicAuth: Whether to skip ``AuthInterceptor``.
314 | /// - Returns: The adapted request.
315 | private func adapt(_ request: URLRequest, skipDynamicAuth: Bool) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
316 | var adapted = request
317 | for interceptor in interceptors {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:336:20: error: cannot find type 'URLRequest' in scope
334 | /// - Returns: `true` to run another attempt.
335 | private func shouldRetry(
336 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
337 | dueTo error: NexioError,
338 | attempt: Int
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:368:17: error: cannot find type 'URLRequest' in scope
366 | headers: [String: String],
367 | body: Body?
368 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
369 | guard let resolved = resolve(url) else {
370 | throw NexioError.invalidURL(url)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:394:71: error: cannot find type 'URLRequest' in scope
392 | /// - Returns: A populated `URLRequest`, ready for the interceptor pipeline.
393 | /// - Throws: ``NexioError/invalidURL(_:)`` if the composed URL is malformed.
394 | private func buildRequest(from endpoint: some Endpoint) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
395 | var components = URLComponents(
396 | url: endpoint.baseURL.appendingPathComponent(endpoint.path),
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:461:56: error: cannot find type 'URLRequest' in scope
459 | ///
460 | /// - Parameter request: The request to mutate in place.
461 | private func applyDefaultHeaders(to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
462 | config.defaultHeaders.forEach { request.setValue($1, forHTTPHeaderField: $0) }
463 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:473:61: error: cannot find type 'URLRequest' in scope
471 | ///
472 | /// - Parameter request: The request to clean, in place.
473 | private func stripCredentialHeaders(from request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
474 | for name in Self.credentialHeaderNames {
475 | request.setValue(nil, forHTTPHeaderField: name)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:485:72: error: cannot find type 'URLRequest' in scope
483 | /// - strategy: The strategy to apply, global or per-endpoint.
484 | /// - request: The request to mutate in place.
485 | private func applyAuth(_ strategy: AuthStrategy, to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
486 | switch strategy {
487 | case .bearer(let token):
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:506:39: error: cannot find type 'URLRequest' in scope
504 | /// - response: The response that came back.
505 | /// - data: The raw response body (only its byte count is logged).
506 | private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
| `- error: cannot find type 'URLRequest' in scope
507 | switch config.logLevel {
508 | case .none:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:506:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
504 | /// - response: The response that came back.
505 | /// - data: The raw response body (only its byte count is logged).
506 | private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
507 | switch config.logLevel {
508 | case .none:
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/Nexio/Core/NexioClient.swift:62:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
60 | let previous = session
61 |
62 | let sessionConfig = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
63 | sessionConfig.timeoutIntervalForRequest = config.timeout
64 | // Default headers are applied per request (see applyDefaultHeaders), not
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:69:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
67 | sessionConfig.protocolClasses = protocolClasses + (sessionConfig.protocolClasses ?? [])
68 | }
69 | session = URLSession(configuration: sessionConfig)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 |
71 | // Release the session we replaced. Tasks already running are allowed to finish.
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:72:36: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
70 |
71 | // Release the session we replaced. Tasks already running are allowed to finish.
72 | if previous !== URLSession.shared {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
73 | previous.finishTasksAndInvalidate()
74 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:73:22: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
71 | // Release the session we replaced. Tasks already running are allowed to finish.
72 | if previous !== URLSession.shared {
73 | previous.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
74 | }
75 |
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:114:59: error: cannot infer contextual base in reference to member 'get'
112 | headers: [String: String] = [:]
113 | ) async throws -> T {
114 | let request = try buildRequest(url: url, method: .get, headers: headers, body: nil as String?)
| `- error: cannot infer contextual base in reference to member 'get'
115 | return try await perform(request, skipDynamicAuth: false)
116 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:134:59: error: cannot infer contextual base in reference to member 'post'
132 | headers: [String: String] = [:]
133 | ) async throws -> T {
134 | let request = try buildRequest(url: url, method: .post, headers: headers, body: body)
| `- error: cannot infer contextual base in reference to member 'post'
135 | return try await perform(request, skipDynamicAuth: false)
136 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:151:59: error: cannot infer contextual base in reference to member 'put'
149 | headers: [String: String] = [:]
150 | ) async throws -> T {
151 | let request = try buildRequest(url: url, method: .put, headers: headers, body: body)
| `- error: cannot infer contextual base in reference to member 'put'
152 | return try await perform(request, skipDynamicAuth: false)
153 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:170:59: error: cannot infer contextual base in reference to member 'patch'
168 | headers: [String: String] = [:]
169 | ) async throws -> T {
170 | let request = try buildRequest(url: url, method: .patch, headers: headers, body: body)
| `- error: cannot infer contextual base in reference to member 'patch'
171 | return try await perform(request, skipDynamicAuth: false)
172 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:184:59: error: cannot infer contextual base in reference to member 'delete'
182 | headers: [String: String] = [:]
183 | ) async throws {
184 | let request = try buildRequest(url: url, method: .delete, headers: headers, body: nil as String?)
| `- error: cannot infer contextual base in reference to member 'delete'
185 | let (data, http) = try await send(request, skipDynamicAuth: false)
186 | logIfNeeded(request: request, response: http, data: data)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:223:23: error: cannot find 'URLRequest' in scope
221 | throw NexioError.invalidURL(url)
222 | }
223 | var request = URLRequest(url: resolvedURL)
| `- error: cannot find 'URLRequest' in scope
224 | request.httpMethod = HTTPMethod.get.rawValue
225 | applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:284:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
282 |
283 | do {
284 | let (data, http) = try await session.nexioData(for: adapted)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
285 | if let statusError = http.nexioError(data: data) {
286 | if await shouldRetry(adapted, dueTo: statusError, attempt: attempt) {
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:80: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:27: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:99:33: error: cannot find type 'URLRequest' in scope
97 | /// - attempt: Zero-based attempt counter.
98 | /// - Returns: `true` to run another attempt.
99 | func shouldRetry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool {
| `- error: cannot find type 'URLRequest' in scope
100 | guard maxAttempts > 0, attempt < maxAttempts else { return false }
101 | guard Self.isIdempotent(request), Self.isRetryable(error) else { return false }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:46:27: error: cannot find type 'URLRequest' in scope
44 | /// - attempt: Zero-based retry counter (0 = first failure).
45 | /// - Returns: `true` to retry, `false` to propagate the error.
46 | func retry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool
| `- error: cannot find type 'URLRequest' in scope
47 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:372:23: error: cannot find 'URLRequest' in scope
370 | throw NexioError.invalidURL(url)
371 | }
372 | var request = URLRequest(url: resolved)
| `- error: cannot find 'URLRequest' in scope
373 | request.httpMethod = method.rawValue
374 | applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:405:23: error: cannot find 'URLRequest' in scope
403 | throw NexioError.invalidURL(endpoint.baseURL.absoluteString + endpoint.path)
404 | }
405 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
406 | request.httpMethod = endpoint.method.rawValue
407 | applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:475:30: error: 'nil' requires a contextual type
473 | private func stripCredentialHeaders(from request: inout URLRequest) {
474 | for name in Self.credentialHeaderNames {
475 | request.setValue(nil, forHTTPHeaderField: name)
| `- error: 'nil' requires a contextual type
476 | }
477 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:511:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'isSuccess'
509 | break
510 | case .errors:
511 | guard !response.isSuccess else { return }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'isSuccess'
512 | print("[Nexio] ❌ \(request.httpMethod ?? "?") \(URLRedactor.redacted(request.url)) → \(response.statusCode)")
513 | case .all:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:515:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
513 | case .all:
514 | print("[Nexio] ➡️ \(request.httpMethod ?? "?") \(URLRedactor.redacted(request.url))")
515 | print("[Nexio] ⬅️ \(response.statusCode) (\(data.count) bytes)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
516 | }
517 | }
[11/16] Compiling Nexio NexioClient.swift
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:42:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
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/Nexio/Core/NexioClient.swift:42:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:42:50: error: value of type '_' expected to be instance of class or class-constrained type
40 | private var retryPolicy: RetryPolicy = .none
41 | private var interceptors: [any Interceptor] = []
42 | private var session: URLSession = URLSession.shared
| `- error: value of type '_' expected to be instance of class or class-constrained type
43 | private let encoder: JSONEncoder = JSONEncoder()
44 |
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:246:20: error: cannot find type 'URLRequest' in scope
244 | /// match the response, or any status-mapped ``NexioError``.
245 | private func perform<T: Decodable & Sendable>(
246 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
247 | skipDynamicAuth: Bool
248 | ) async throws -> T {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:271:21: error: cannot find type 'URLRequest' in scope
269 | /// transport ``NexioError`` from the final attempt.
270 | private func send(
271 | _ original: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
272 | skipDynamicAuth: Bool
273 | ) async throws -> (Data, HTTPURLResponse) {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:273:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
271 | _ original: URLRequest,
272 | skipDynamicAuth: Bool
273 | ) async throws -> (Data, HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
274 | // A token refresh issued from inside an AuthInterceptor provider must not
275 | // go through that same interceptor again, or it would recurse.
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/Nexio/Core/NexioClient.swift:315:86: error: cannot find type 'URLRequest' in scope
313 | /// - skipDynamicAuth: Whether to skip ``AuthInterceptor``.
314 | /// - Returns: The adapted request.
315 | private func adapt(_ request: URLRequest, skipDynamicAuth: Bool) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
316 | var adapted = request
317 | for interceptor in interceptors {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:315:35: error: cannot find type 'URLRequest' in scope
313 | /// - skipDynamicAuth: Whether to skip ``AuthInterceptor``.
314 | /// - Returns: The adapted request.
315 | private func adapt(_ request: URLRequest, skipDynamicAuth: Bool) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
316 | var adapted = request
317 | for interceptor in interceptors {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:336:20: error: cannot find type 'URLRequest' in scope
334 | /// - Returns: `true` to run another attempt.
335 | private func shouldRetry(
336 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
337 | dueTo error: NexioError,
338 | attempt: Int
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:368:17: error: cannot find type 'URLRequest' in scope
366 | headers: [String: String],
367 | body: Body?
368 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
369 | guard let resolved = resolve(url) else {
370 | throw NexioError.invalidURL(url)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:394:71: error: cannot find type 'URLRequest' in scope
392 | /// - Returns: A populated `URLRequest`, ready for the interceptor pipeline.
393 | /// - Throws: ``NexioError/invalidURL(_:)`` if the composed URL is malformed.
394 | private func buildRequest(from endpoint: some Endpoint) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
395 | var components = URLComponents(
396 | url: endpoint.baseURL.appendingPathComponent(endpoint.path),
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:461:56: error: cannot find type 'URLRequest' in scope
459 | ///
460 | /// - Parameter request: The request to mutate in place.
461 | private func applyDefaultHeaders(to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
462 | config.defaultHeaders.forEach { request.setValue($1, forHTTPHeaderField: $0) }
463 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:473:61: error: cannot find type 'URLRequest' in scope
471 | ///
472 | /// - Parameter request: The request to clean, in place.
473 | private func stripCredentialHeaders(from request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
474 | for name in Self.credentialHeaderNames {
475 | request.setValue(nil, forHTTPHeaderField: name)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:485:72: error: cannot find type 'URLRequest' in scope
483 | /// - strategy: The strategy to apply, global or per-endpoint.
484 | /// - request: The request to mutate in place.
485 | private func applyAuth(_ strategy: AuthStrategy, to request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
486 | switch strategy {
487 | case .bearer(let token):
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:506:39: error: cannot find type 'URLRequest' in scope
504 | /// - response: The response that came back.
505 | /// - data: The raw response body (only its byte count is logged).
506 | private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
| `- error: cannot find type 'URLRequest' in scope
507 | switch config.logLevel {
508 | case .none:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:506:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
504 | /// - response: The response that came back.
505 | /// - data: The raw response body (only its byte count is logged).
506 | private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
507 | switch config.logLevel {
508 | case .none:
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/Nexio/Core/NexioClient.swift:62:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
60 | let previous = session
61 |
62 | let sessionConfig = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
63 | sessionConfig.timeoutIntervalForRequest = config.timeout
64 | // Default headers are applied per request (see applyDefaultHeaders), not
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:69:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
67 | sessionConfig.protocolClasses = protocolClasses + (sessionConfig.protocolClasses ?? [])
68 | }
69 | session = URLSession(configuration: sessionConfig)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
70 |
71 | // Release the session we replaced. Tasks already running are allowed to finish.
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:72:36: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
70 |
71 | // Release the session we replaced. Tasks already running are allowed to finish.
72 | if previous !== URLSession.shared {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
73 | previous.finishTasksAndInvalidate()
74 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:73:22: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
71 | // Release the session we replaced. Tasks already running are allowed to finish.
72 | if previous !== URLSession.shared {
73 | previous.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
74 | }
75 |
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:114:59: error: cannot infer contextual base in reference to member 'get'
112 | headers: [String: String] = [:]
113 | ) async throws -> T {
114 | let request = try buildRequest(url: url, method: .get, headers: headers, body: nil as String?)
| `- error: cannot infer contextual base in reference to member 'get'
115 | return try await perform(request, skipDynamicAuth: false)
116 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:134:59: error: cannot infer contextual base in reference to member 'post'
132 | headers: [String: String] = [:]
133 | ) async throws -> T {
134 | let request = try buildRequest(url: url, method: .post, headers: headers, body: body)
| `- error: cannot infer contextual base in reference to member 'post'
135 | return try await perform(request, skipDynamicAuth: false)
136 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:151:59: error: cannot infer contextual base in reference to member 'put'
149 | headers: [String: String] = [:]
150 | ) async throws -> T {
151 | let request = try buildRequest(url: url, method: .put, headers: headers, body: body)
| `- error: cannot infer contextual base in reference to member 'put'
152 | return try await perform(request, skipDynamicAuth: false)
153 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:170:59: error: cannot infer contextual base in reference to member 'patch'
168 | headers: [String: String] = [:]
169 | ) async throws -> T {
170 | let request = try buildRequest(url: url, method: .patch, headers: headers, body: body)
| `- error: cannot infer contextual base in reference to member 'patch'
171 | return try await perform(request, skipDynamicAuth: false)
172 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:184:59: error: cannot infer contextual base in reference to member 'delete'
182 | headers: [String: String] = [:]
183 | ) async throws {
184 | let request = try buildRequest(url: url, method: .delete, headers: headers, body: nil as String?)
| `- error: cannot infer contextual base in reference to member 'delete'
185 | let (data, http) = try await send(request, skipDynamicAuth: false)
186 | logIfNeeded(request: request, response: http, data: data)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:223:23: error: cannot find 'URLRequest' in scope
221 | throw NexioError.invalidURL(url)
222 | }
223 | var request = URLRequest(url: resolvedURL)
| `- error: cannot find 'URLRequest' in scope
224 | request.httpMethod = HTTPMethod.get.rawValue
225 | applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:284:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
282 |
283 | do {
284 | let (data, http) = try await session.nexioData(for: adapted)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
285 | if let statusError = http.nexioError(data: data) {
286 | if await shouldRetry(adapted, dueTo: statusError, attempt: attempt) {
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:80: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:27: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:99:33: error: cannot find type 'URLRequest' in scope
97 | /// - attempt: Zero-based attempt counter.
98 | /// - Returns: `true` to run another attempt.
99 | func shouldRetry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool {
| `- error: cannot find type 'URLRequest' in scope
100 | guard maxAttempts > 0, attempt < maxAttempts else { return false }
101 | guard Self.isIdempotent(request), Self.isRetryable(error) else { return false }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:46:27: error: cannot find type 'URLRequest' in scope
44 | /// - attempt: Zero-based retry counter (0 = first failure).
45 | /// - Returns: `true` to retry, `false` to propagate the error.
46 | func retry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool
| `- error: cannot find type 'URLRequest' in scope
47 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:372:23: error: cannot find 'URLRequest' in scope
370 | throw NexioError.invalidURL(url)
371 | }
372 | var request = URLRequest(url: resolved)
| `- error: cannot find 'URLRequest' in scope
373 | request.httpMethod = method.rawValue
374 | applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:405:23: error: cannot find 'URLRequest' in scope
403 | throw NexioError.invalidURL(endpoint.baseURL.absoluteString + endpoint.path)
404 | }
405 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
406 | request.httpMethod = endpoint.method.rawValue
407 | applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:475:30: error: 'nil' requires a contextual type
473 | private func stripCredentialHeaders(from request: inout URLRequest) {
474 | for name in Self.credentialHeaderNames {
475 | request.setValue(nil, forHTTPHeaderField: name)
| `- error: 'nil' requires a contextual type
476 | }
477 | }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:511:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'isSuccess'
509 | break
510 | case .errors:
511 | guard !response.isSuccess else { return }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'isSuccess'
512 | print("[Nexio] ❌ \(request.httpMethod ?? "?") \(URLRedactor.redacted(request.url)) → \(response.statusCode)")
513 | case .all:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:515:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
513 | case .all:
514 | print("[Nexio] ➡️ \(request.httpMethod ?? "?") \(URLRedactor.redacted(request.url))")
515 | print("[Nexio] ⬅️ \(response.statusCode) (\(data.count) bytes)")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
516 | }
517 | }
[12/16] Compiling Nexio RetryInterceptor.swift
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:99:33: error: cannot find type 'URLRequest' in scope
97 | /// - attempt: Zero-based attempt counter.
98 | /// - Returns: `true` to run another attempt.
99 | func shouldRetry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool {
| `- error: cannot find type 'URLRequest' in scope
100 | guard maxAttempts > 0, attempt < maxAttempts else { return false }
101 | guard Self.isIdempotent(request), Self.isRetryable(error) else { return false }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:115:41: error: cannot find type 'URLRequest' in scope
113 |
114 | /// Whether repeating `request` is safe. A missing method means GET.
115 | static func isIdempotent(_ request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
116 | let method = (request.httpMethod ?? "GET").uppercased()
117 | return ["GET", "HEAD", "PUT", "DELETE", "OPTIONS"].contains(method)
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:155:87: error: cannot find type 'URLRequest' in scope
153 | }
154 |
155 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
156 | request // pass-through
157 | }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:155:34: error: cannot find type 'URLRequest' in scope
153 | }
154 |
155 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
156 | request // pass-through
157 | }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:155:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
153 | }
154 |
155 | public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
156 | request // pass-through
157 | }
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/Nexio/Interceptor/RetryInterceptor.swift:160:20: error: cannot find type 'URLRequest' in scope
158 |
159 | public func retry(
160 | _ request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
161 | dueTo error: NexioError,
162 | attempt: Int
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:80: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:27: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:46:27: error: cannot find type 'URLRequest' in scope
44 | /// - attempt: Zero-based retry counter (0 = first failure).
45 | /// - Returns: `true` to retry, `false` to propagate the error.
46 | func retry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool
| `- error: cannot find type 'URLRequest' in scope
47 | }
[13/16] Compiling Nexio NexioError.swift
/host/spi-builder-workspace/Sources/Nexio/Errors/NexioError.swift:22:23: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | /// The server returned HTTP 401.
22 | case unauthorized(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The server returned HTTP 404.
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/Nexio/Errors/NexioError.swift:25:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The server returned HTTP 404.
25 | case notFound(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The server returned a 5xx or other unexpected status code.
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/Nexio/Errors/NexioError.swift:22:10: error: associated value 'unauthorized' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
20 |
21 | /// The server returned HTTP 401.
22 | case unauthorized(HTTPURLResponse)
| `- error: associated value 'unauthorized' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
23 |
24 | /// The server returned HTTP 404.
/host/spi-builder-workspace/Sources/Nexio/Errors/NexioError.swift:25:10: error: associated value 'notFound' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
23 |
24 | /// The server returned HTTP 404.
25 | case notFound(HTTPURLResponse)
| `- error: associated value 'notFound' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
26 |
27 | /// The server returned a 5xx or other unexpected status code.
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:24:16: error: cannot find type 'PlatformImage' in scope
22 | /// never mutated afterwards, so sharing the reference is safe.
23 | private struct DecodedImage: @unchecked Sendable {
24 | let image: PlatformImage
| `- error: cannot find type 'PlatformImage' in scope
25 | }
26 |
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:51:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
49 | // MARK: - Private State
50 |
51 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 |
53 | // MARK: - Init
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/Nexio/Image/ImageLoader.swift:61:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 | ///
60 | /// - Parameter session: Override for testing. Pass `nil` to use the default.
61 | public init(session: URLSession? = nil) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 | if let session {
63 | self.session = session
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/Nexio/Image/ImageLoader.swift:85:50: error: cannot find type 'PlatformImage' in scope
83 | /// - Throws: ``NexioError`` on network failure; a generic error if the
84 | /// data cannot be decoded as an image.
85 | public func load(_ url: URL) async throws -> PlatformImage {
| `- error: cannot find type 'PlatformImage' in scope
86 | let request = URLRequest(url: url)
87 | let (data, response) = try await session.nexioData(for: request)
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:65:25: error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
63 | self.session = session
64 | } else {
65 | let cache = URLCache(
| `- error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
66 | memoryCapacity: 50 * 1024 * 1024, // 50 MB
67 | diskCapacity: 200 * 1024 * 1024, // 200 MB
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:70:50: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
68 | diskPath: "com.nexio.imagecache"
69 | )
70 | let config = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:72:42: error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
70 | let config = URLSessionConfiguration.default
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
| `- error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
73 | self.session = URLSession(configuration: config)
74 | }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:73:28: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
73 | self.session = URLSession(configuration: config)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
74 | }
75 | }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:86:23: error: cannot find 'URLRequest' in scope
84 | /// data cannot be decoded as an image.
85 | public func load(_ url: URL) async throws -> PlatformImage {
86 | let request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
87 | let (data, response) = try await session.nexioData(for: request)
88 | if let httpError = response.nexioError(data: data) {
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:87:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
85 | public func load(_ url: URL) async throws -> PlatformImage {
86 | let request = URLRequest(url: url)
87 | let (data, response) = try await session.nexioData(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
88 | if let httpError = response.nexioError(data: data) {
89 | throw httpError
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:128:9: error: cannot find 'PlatformImage' in scope
126 | /// Decodes image bytes. Nonisolated, so it runs off the actor.
127 | private static func decodeImage(_ data: Data) async -> DecodedImage? {
128 | PlatformImage(data: data).map { DecodedImage(image: $0) }
| `- error: cannot find 'PlatformImage' in scope
129 | }
130 |
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:133:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
131 | /// Removes all cached images from memory and disk.
132 | public func clearCache() {
133 | session.configuration.urlCache?.removeAllCachedResponses()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
134 | }
135 | }
[14/16] Compiling Nexio ImageLoader.swift
/host/spi-builder-workspace/Sources/Nexio/Errors/NexioError.swift:22:23: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |
21 | /// The server returned HTTP 401.
22 | case unauthorized(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The server returned HTTP 404.
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/Nexio/Errors/NexioError.swift:25:19: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | /// The server returned HTTP 404.
25 | case notFound(HTTPURLResponse)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The server returned a 5xx or other unexpected status code.
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/Nexio/Errors/NexioError.swift:22:10: error: associated value 'unauthorized' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
20 |
21 | /// The server returned HTTP 401.
22 | case unauthorized(HTTPURLResponse)
| `- error: associated value 'unauthorized' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
23 |
24 | /// The server returned HTTP 404.
/host/spi-builder-workspace/Sources/Nexio/Errors/NexioError.swift:25:10: error: associated value 'notFound' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
23 |
24 | /// The server returned HTTP 404.
25 | case notFound(HTTPURLResponse)
| `- error: associated value 'notFound' of 'Sendable'-conforming enum 'NexioError' has non-Sendable type 'HTTPURLResponse' (aka 'AnyObject')
26 |
27 | /// The server returned a 5xx or other unexpected status code.
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:24:16: error: cannot find type 'PlatformImage' in scope
22 | /// never mutated afterwards, so sharing the reference is safe.
23 | private struct DecodedImage: @unchecked Sendable {
24 | let image: PlatformImage
| `- error: cannot find type 'PlatformImage' in scope
25 | }
26 |
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:51:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
49 | // MARK: - Private State
50 |
51 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 |
53 | // MARK: - Init
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/Nexio/Image/ImageLoader.swift:61:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 | ///
60 | /// - Parameter session: Override for testing. Pass `nil` to use the default.
61 | public init(session: URLSession? = nil) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
62 | if let session {
63 | self.session = session
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/Nexio/Image/ImageLoader.swift:85:50: error: cannot find type 'PlatformImage' in scope
83 | /// - Throws: ``NexioError`` on network failure; a generic error if the
84 | /// data cannot be decoded as an image.
85 | public func load(_ url: URL) async throws -> PlatformImage {
| `- error: cannot find type 'PlatformImage' in scope
86 | let request = URLRequest(url: url)
87 | let (data, response) = try await session.nexioData(for: request)
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:65:25: error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
63 | self.session = session
64 | } else {
65 | let cache = URLCache(
| `- error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
66 | memoryCapacity: 50 * 1024 * 1024, // 50 MB
67 | diskCapacity: 200 * 1024 * 1024, // 200 MB
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:70:50: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
68 | diskPath: "com.nexio.imagecache"
69 | )
70 | let config = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:72:42: error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
70 | let config = URLSessionConfiguration.default
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
| `- error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
73 | self.session = URLSession(configuration: config)
74 | }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:73:28: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
71 | config.urlCache = cache
72 | config.requestCachePolicy = .returnCacheDataElseLoad
73 | self.session = URLSession(configuration: config)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
74 | }
75 | }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:86:23: error: cannot find 'URLRequest' in scope
84 | /// data cannot be decoded as an image.
85 | public func load(_ url: URL) async throws -> PlatformImage {
86 | let request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
87 | let (data, response) = try await session.nexioData(for: request)
88 | if let httpError = response.nexioError(data: data) {
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:87:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
85 | public func load(_ url: URL) async throws -> PlatformImage {
86 | let request = URLRequest(url: url)
87 | let (data, response) = try await session.nexioData(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
88 | if let httpError = response.nexioError(data: data) {
89 | throw httpError
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:128:9: error: cannot find 'PlatformImage' in scope
126 | /// Decodes image bytes. Nonisolated, so it runs off the actor.
127 | private static func decodeImage(_ data: Data) async -> DecodedImage? {
128 | PlatformImage(data: data).map { DecodedImage(image: $0) }
| `- error: cannot find 'PlatformImage' in scope
129 | }
130 |
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:133:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
131 | /// Removes all cached images from memory and disk.
132 | public func clearCache() {
133 | session.configuration.urlCache?.removeAllCachedResponses()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
134 | }
135 | }
[15/16] Compiling Nexio NexioImage.swift
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:80: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:27: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:52: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Called after a request fails.
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/Nexio/Interceptor/Interceptor.swift:46:27: error: cannot find type 'URLRequest' in scope
44 | /// - attempt: Zero-based retry counter (0 = first failure).
45 | /// - Returns: `true` to retry, `false` to propagate the error.
46 | func retry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool
| `- error: cannot find type 'URLRequest' in scope
47 | }
[16/16] Compiling Nexio Interceptor.swift
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:80: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:27: error: cannot find type 'URLRequest' in scope
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: cannot find type 'URLRequest' in scope
35 |
36 | /// Called after a request fails.
/host/spi-builder-workspace/Sources/Nexio/Interceptor/Interceptor.swift:34:52: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | /// - session: The session that will execute the request.
33 | /// - Returns: The (possibly mutated) request.
34 | func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// Called after a request fails.
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/Nexio/Interceptor/Interceptor.swift:46:27: error: cannot find type 'URLRequest' in scope
44 | /// - attempt: Zero-based retry counter (0 = first failure).
45 | /// - Returns: `true` to retry, `false` to propagate the error.
46 | func retry(_ request: URLRequest, dueTo error: NexioError, attempt: Int) async -> Bool
| `- error: cannot find type 'URLRequest' in scope
47 | }
BUILD FAILURE 6.2 linux