The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Nexio, reference main (d4a313), with Swift 6.2 for Linux on 30 Jun 2026 15:05:18 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-53886770-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:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 0e64495ecc1688c3b3e031a5ef1348b5c05091ae
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ANSCoder/Nexio.git
Reference: main
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
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at d4a3130 Merge pull request #3 from ANSCoder/chore/pr-tooling
Cloned https://github.com/ANSCoder/Nexio.git
Revision (git rev-parse @):
d4a31301027dea0a9dfd6a4eca91ceb289be1475
SUCCESS checkout https://github.com/ANSCoder/Nexio.git at main
========================================
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-53886770-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:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.2-latest: Pulling from saguaro1/spi-images
Digest: sha256:146297aca0eb7f3e338453cbf4c0aa72424647d7d0d3f35fda2f7ef7698dd3aa
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:basic-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/15] 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 | }
[4/15] 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 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/16] Emitting module Nexio
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:87: error: cannot find type 'URLRequest' in scope
28 |     }
29 |
30 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
   |                                                                                       `- error: cannot find type 'URLRequest' in scope
31 |         var mutableRequest = request
32 |         let strategy = await provider()
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:34: error: cannot find type 'URLRequest' in scope
28 |     }
29 |
30 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
   |                                  `- error: cannot find type 'URLRequest' in scope
31 |         var mutableRequest = request
32 |         let strategy = await provider()
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |     }
29 |
30 |     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.
31 |         var mutableRequest = request
32 |         let strategy = await provider()
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:47:20: error: cannot find type 'URLRequest' in scope
45 |
46 |     public func retry(
47 |         _ request: URLRequest,
   |                    `- error: cannot find type 'URLRequest' in scope
48 |         dueTo error: NexioError,
49 |         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:34:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
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:34:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:34:50: error: value of type '_' expected to be instance of class or class-constrained type
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                                                  `- error: value of type '_' expected to be instance of class or class-constrained type
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:222:62: error: cannot find type 'URLRequest' in scope
220 |     /// - Throws: ``NexioError/decodingFailed(underlying:data:)`` if `T`
221 |     ///   doesn't match the response shape, or any status-mapped ``NexioError``.
222 |     private func perform<T: Decodable & Sendable>(_ request: URLRequest) async throws -> T {
    |                                                              `- error: cannot find type 'URLRequest' in scope
223 |         let (data, http) = try await executeWithInterceptors(request, attempt: 0)
224 |         logIfNeeded(request: request, response: http, data: data)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:254:20: error: cannot find type 'URLRequest' in scope
252 |     ///   interceptor opts to retry.
253 |     private func executeWithInterceptors(
254 |         _ request: URLRequest,
    |                    `- error: cannot find type 'URLRequest' in scope
255 |         attempt: Int
256 |     ) async throws -> (Data, HTTPURLResponse) {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:256:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 |         _ request: URLRequest,
255 |         attempt: Int
256 |     ) async throws -> (Data, HTTPURLResponse) {
    |                              `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
257 |         var adapted = request
258 |         for interceptor in interceptors {
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:292:17: error: cannot find type 'URLRequest' in scope
290 |         headers: [String: String],
291 |         body: Body?
292 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
293 |         guard let resolved = resolve(url) else {
294 |             throw NexioError.invalidURL(url)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:318:71: error: cannot find type 'URLRequest' in scope
316 |     /// - Returns: A populated `URLRequest`, ready for the interceptor pipeline.
317 |     /// - Throws: ``NexioError/invalidURL(_:)`` if the composed URL is malformed.
318 |     private func buildRequest(from endpoint: some Endpoint) throws -> URLRequest {
    |                                                                       `- error: cannot find type 'URLRequest' in scope
319 |         var components = URLComponents(
320 |             url: endpoint.baseURL.appendingPathComponent(endpoint.path),
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:365:56: error: cannot find type 'URLRequest' in scope
363 |     ///
364 |     /// - Parameter request: The request to mutate in place.
365 |     private func applyDefaultHeaders(to request: inout URLRequest) {
    |                                                        `- error: cannot find type 'URLRequest' in scope
366 |         config.defaultHeaders.forEach { request.setValue($1, forHTTPHeaderField: $0) }
367 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:375:72: error: cannot find type 'URLRequest' in scope
373 |     ///   - strategy: The strategy to apply — global or per-endpoint.
374 |     ///   - request: The request to mutate in place.
375 |     private func applyAuth(_ strategy: AuthStrategy, to request: inout URLRequest) {
    |                                                                        `- error: cannot find type 'URLRequest' in scope
376 |         switch strategy {
377 |         case .bearer(let token):
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:396:39: error: cannot find type 'URLRequest' in scope
394 |     ///   - response: The response that came back.
395 |     ///   - data: The raw response body (only its byte count is logged).
396 |     private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
    |                                       `- error: cannot find type 'URLRequest' in scope
397 |         switch config.logLevel {
398 |         case .none:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:396:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
394 |     ///   - response: The response that came back.
395 |     ///   - data: The raw response body (only its byte count is logged).
396 |     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.
397 |         switch config.logLevel {
398 |         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:27:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |     }
26 |
27 |     init(urlSessionTask: URLSessionTask) {
   |                          `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |         task = _TaskBox(urlSessionTask)
29 |     }
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:37:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// `URLSessionTask` is thread-safe for `cancel()` calls per Apple's docs.
36 | private final class _TaskBox: @unchecked Sendable {
37 |     private let wrapped: URLSessionTask
   |                          `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 |     init(_ task: URLSessionTask) { wrapped = task }
39 |     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:38:18: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | private final class _TaskBox: @unchecked Sendable {
37 |     private let wrapped: URLSessionTask
38 |     init(_ task: URLSessionTask) { wrapped = task }
   |                  `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |     func cancel() { wrapped.cancel() }
40 | }
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:40:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 38 |     // MARK: - Private State
 39 |
 40 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 41 |
 42 |     // 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:50:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 48 |     ///
 49 |     /// - Parameter session: Override for testing. Pass `nil` to use the default.
 50 |     public init(session: URLSession? = nil) {
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |         if let session {
 52 |             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:74:50: error: cannot find type 'PlatformImage' in scope
 72 |     /// - Throws: ``NexioError`` on network failure; a generic error if the
 73 |     ///   data cannot be decoded as an image.
 74 |     public func load(_ url: URL) async throws -> PlatformImage {
    |                                                  `- error: cannot find type 'PlatformImage' in scope
 75 |         let request = URLRequest(url: url)
 76 |         let (data, response) = try await session.nexioData(for: request)
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:54:25: error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 52 |             self.session = session
 53 |         } else {
 54 |             let cache = URLCache(
    |                         `- error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 55 |                 memoryCapacity: 50 * 1024 * 1024,   // 50 MB
 56 |                 diskCapacity: 200 * 1024 * 1024,    // 200 MB
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:59:50: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 57 |                 diskPath: "com.nexio.imagecache"
 58 |             )
 59 |             let config = URLSessionConfiguration.default
    |                                                  `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:61:42: error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
 59 |             let config = URLSessionConfiguration.default
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
    |                                          `- error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
 62 |             self.session = URLSession(configuration: config)
 63 |         }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:62:28: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
 62 |             self.session = URLSession(configuration: config)
    |                            `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 63 |         }
 64 |     }
/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:92:87: error: cannot find type 'URLRequest' in scope
 90 |     }
 91 |
 92 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
    |                                                                                       `- error: cannot find type 'URLRequest' in scope
 93 |         request // pass-through
 94 |     }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:92:34: error: cannot find type 'URLRequest' in scope
 90 |     }
 91 |
 92 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
    |                                  `- error: cannot find type 'URLRequest' in scope
 93 |         request // pass-through
 94 |     }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:92:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 90 |     }
 91 |
 92 |     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.
 93 |         request // pass-through
 94 |     }
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:97:20: error: cannot find type 'URLRequest' in scope
 95 |
 96 |     public func retry(
 97 |         _ request: URLRequest,
    |                    `- error: cannot find type 'URLRequest' in scope
 98 |         dueTo error: NexioError,
 99 |         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>
[6/16] Compiling Nexio AuthInterceptor.swift
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:87: error: cannot find type 'URLRequest' in scope
28 |     }
29 |
30 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
   |                                                                                       `- error: cannot find type 'URLRequest' in scope
31 |         var mutableRequest = request
32 |         let strategy = await provider()
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:34: error: cannot find type 'URLRequest' in scope
28 |     }
29 |
30 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
   |                                  `- error: cannot find type 'URLRequest' in scope
31 |         var mutableRequest = request
32 |         let strategy = await provider()
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |     }
29 |
30 |     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.
31 |         var mutableRequest = request
32 |         let strategy = await provider()
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:47:20: error: cannot find type 'URLRequest' in scope
45 |
46 |     public func retry(
47 |         _ request: URLRequest,
   |                    `- error: cannot find type 'URLRequest' in scope
48 |         dueTo error: NexioError,
49 |         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 | }
[7/16] Compiling Nexio AuthStrategy.swift
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:87: error: cannot find type 'URLRequest' in scope
28 |     }
29 |
30 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
   |                                                                                       `- error: cannot find type 'URLRequest' in scope
31 |         var mutableRequest = request
32 |         let strategy = await provider()
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:34: error: cannot find type 'URLRequest' in scope
28 |     }
29 |
30 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
   |                                  `- error: cannot find type 'URLRequest' in scope
31 |         var mutableRequest = request
32 |         let strategy = await provider()
/host/spi-builder-workspace/Sources/Nexio/Auth/AuthInterceptor.swift:30:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |     }
29 |
30 |     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.
31 |         var mutableRequest = request
32 |         let strategy = await provider()
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:47:20: error: cannot find type 'URLRequest' in scope
45 |
46 |     public func retry(
47 |         _ request: URLRequest,
   |                    `- error: cannot find type 'URLRequest' in scope
48 |         dueTo error: NexioError,
49 |         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 | }
[8/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:40:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 38 |     // MARK: - Private State
 39 |
 40 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 41 |
 42 |     // 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:50:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 48 |     ///
 49 |     /// - Parameter session: Override for testing. Pass `nil` to use the default.
 50 |     public init(session: URLSession? = nil) {
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |         if let session {
 52 |             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:74:50: error: cannot find type 'PlatformImage' in scope
 72 |     /// - Throws: ``NexioError`` on network failure; a generic error if the
 73 |     ///   data cannot be decoded as an image.
 74 |     public func load(_ url: URL) async throws -> PlatformImage {
    |                                                  `- error: cannot find type 'PlatformImage' in scope
 75 |         let request = URLRequest(url: url)
 76 |         let (data, response) = try await session.nexioData(for: request)
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:54:25: error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 52 |             self.session = session
 53 |         } else {
 54 |             let cache = URLCache(
    |                         `- error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 55 |                 memoryCapacity: 50 * 1024 * 1024,   // 50 MB
 56 |                 diskCapacity: 200 * 1024 * 1024,    // 200 MB
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:59:50: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 57 |                 diskPath: "com.nexio.imagecache"
 58 |             )
 59 |             let config = URLSessionConfiguration.default
    |                                                  `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:61:42: error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
 59 |             let config = URLSessionConfiguration.default
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
    |                                          `- error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
 62 |             self.session = URLSession(configuration: config)
 63 |         }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:62:28: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
 62 |             self.session = URLSession(configuration: config)
    |                            `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 63 |         }
 64 |     }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:75:23: error: cannot find 'URLRequest' in scope
 73 |     ///   data cannot be decoded as an image.
 74 |     public func load(_ url: URL) async throws -> PlatformImage {
 75 |         let request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 76 |         let (data, response) = try await session.nexioData(for: request)
 77 |         if let httpError = response.nexioError(data: data) {
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:76:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
 74 |     public func load(_ url: URL) async throws -> PlatformImage {
 75 |         let request = URLRequest(url: url)
 76 |         let (data, response) = try await session.nexioData(for: request)
    |                                                  `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
 77 |         if let httpError = response.nexioError(data: data) {
 78 |             throw httpError
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:80:27: error: cannot find 'PlatformImage' in scope
 78 |             throw httpError
 79 |         }
 80 |         guard let image = PlatformImage(data: data) else {
    |                           `- error: cannot find 'PlatformImage' in scope
 81 |             throw NexioError.decodingFailed(
 82 |                 underlying: ImageDecodingError.invalidImageData,
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:108:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
106 |     /// Removes all cached images from memory and disk.
107 |     public func clearCache() {
108 |         session.configuration.urlCache?.removeAllCachedResponses()
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
109 |     }
110 | }
[9/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:40:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 38 |     // MARK: - Private State
 39 |
 40 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 41 |
 42 |     // 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:50:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 48 |     ///
 49 |     /// - Parameter session: Override for testing. Pass `nil` to use the default.
 50 |     public init(session: URLSession? = nil) {
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |         if let session {
 52 |             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:74:50: error: cannot find type 'PlatformImage' in scope
 72 |     /// - Throws: ``NexioError`` on network failure; a generic error if the
 73 |     ///   data cannot be decoded as an image.
 74 |     public func load(_ url: URL) async throws -> PlatformImage {
    |                                                  `- error: cannot find type 'PlatformImage' in scope
 75 |         let request = URLRequest(url: url)
 76 |         let (data, response) = try await session.nexioData(for: request)
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:54:25: error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 52 |             self.session = session
 53 |         } else {
 54 |             let cache = URLCache(
    |                         `- error: 'URLCache' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 55 |                 memoryCapacity: 50 * 1024 * 1024,   // 50 MB
 56 |                 diskCapacity: 200 * 1024 * 1024,    // 200 MB
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:59:50: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 57 |                 diskPath: "com.nexio.imagecache"
 58 |             )
 59 |             let config = URLSessionConfiguration.default
    |                                                  `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:61:42: error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
 59 |             let config = URLSessionConfiguration.default
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
    |                                          `- error: cannot infer contextual base in reference to member 'returnCacheDataElseLoad'
 62 |             self.session = URLSession(configuration: config)
 63 |         }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:62:28: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 60 |             config.urlCache = cache
 61 |             config.requestCachePolicy = .returnCacheDataElseLoad
 62 |             self.session = URLSession(configuration: config)
    |                            `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 63 |         }
 64 |     }
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:75:23: error: cannot find 'URLRequest' in scope
 73 |     ///   data cannot be decoded as an image.
 74 |     public func load(_ url: URL) async throws -> PlatformImage {
 75 |         let request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 76 |         let (data, response) = try await session.nexioData(for: request)
 77 |         if let httpError = response.nexioError(data: data) {
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:76:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
 74 |     public func load(_ url: URL) async throws -> PlatformImage {
 75 |         let request = URLRequest(url: url)
 76 |         let (data, response) = try await session.nexioData(for: request)
    |                                                  `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
 77 |         if let httpError = response.nexioError(data: data) {
 78 |             throw httpError
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:80:27: error: cannot find 'PlatformImage' in scope
 78 |             throw httpError
 79 |         }
 80 |         guard let image = PlatformImage(data: data) else {
    |                           `- error: cannot find 'PlatformImage' in scope
 81 |             throw NexioError.decodingFailed(
 82 |                 underlying: ImageDecodingError.invalidImageData,
/host/spi-builder-workspace/Sources/Nexio/Image/ImageLoader.swift:108:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
106 |     /// Removes all cached images from memory and disk.
107 |     public func clearCache() {
108 |         session.configuration.urlCache?.removeAllCachedResponses()
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
109 |     }
110 | }
[10/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:13:33: error: cannot find type 'URLRequest' in scope
11 |     /// - Returns: Raw response data and the HTTP response.
12 |     /// - Throws: ``NexioError`` on network failure or non-2xx status.
13 |     func nexioData(for request: URLRequest) async throws -> (Data, HTTPURLResponse) {
   |                                 `- error: cannot find type 'URLRequest' in scope
14 |         let (data, response): (Data, URLResponse)
15 |         do {
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[11/16] Compiling Nexio RetryInterceptor.swift
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:92:87: error: cannot find type 'URLRequest' in scope
 90 |     }
 91 |
 92 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
    |                                                                                       `- error: cannot find type 'URLRequest' in scope
 93 |         request // pass-through
 94 |     }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:92:34: error: cannot find type 'URLRequest' in scope
 90 |     }
 91 |
 92 |     public func adapt(_ request: URLRequest, for session: URLSession) async throws -> URLRequest {
    |                                  `- error: cannot find type 'URLRequest' in scope
 93 |         request // pass-through
 94 |     }
/host/spi-builder-workspace/Sources/Nexio/Interceptor/RetryInterceptor.swift:92:59: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 90 |     }
 91 |
 92 |     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.
 93 |         request // pass-through
 94 |     }
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:97:20: error: cannot find type 'URLRequest' in scope
 95 |
 96 |     public func retry(
 97 |         _ request: URLRequest,
    |                    `- error: cannot find type 'URLRequest' in scope
 98 |         dueTo error: NexioError,
 99 |         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 | }
[12/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>
[13/16] Compiling Nexio NexioConfig.swift
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:27:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |     }
26 |
27 |     init(urlSessionTask: URLSessionTask) {
   |                          `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |         task = _TaskBox(urlSessionTask)
29 |     }
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:37:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// `URLSessionTask` is thread-safe for `cancel()` calls per Apple's docs.
36 | private final class _TaskBox: @unchecked Sendable {
37 |     private let wrapped: URLSessionTask
   |                          `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 |     init(_ task: URLSessionTask) { wrapped = task }
39 |     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:38:18: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | private final class _TaskBox: @unchecked Sendable {
37 |     private let wrapped: URLSessionTask
38 |     init(_ task: URLSessionTask) { wrapped = task }
   |                  `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |     func cancel() { wrapped.cancel() }
40 | }
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:39:29: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
37 |     private let wrapped: URLSessionTask
38 |     init(_ task: URLSessionTask) { wrapped = task }
39 |     func cancel() { wrapped.cancel() }
   |                             `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
40 | }
[14/16] Compiling Nexio NexioRequest.swift
/host/spi-builder-workspace/Sources/Nexio/Core/NexioRequest.swift:27:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 |     }
26 |
27 |     init(urlSessionTask: URLSessionTask) {
   |                          `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
28 |         task = _TaskBox(urlSessionTask)
29 |     }
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:37:26: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// `URLSessionTask` is thread-safe for `cancel()` calls per Apple's docs.
36 | private final class _TaskBox: @unchecked Sendable {
37 |     private let wrapped: URLSessionTask
   |                          `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 |     init(_ task: URLSessionTask) { wrapped = task }
39 |     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:38:18: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | private final class _TaskBox: @unchecked Sendable {
37 |     private let wrapped: URLSessionTask
38 |     init(_ task: URLSessionTask) { wrapped = task }
   |                  `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 |     func cancel() { wrapped.cancel() }
40 | }
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:39:29: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
37 |     private let wrapped: URLSessionTask
38 |     init(_ task: URLSessionTask) { wrapped = task }
39 |     func cancel() { wrapped.cancel() }
   |                             `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
40 | }
[15/16] Compiling Nexio Endpoint.swift
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:34:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
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:34:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:34:50: error: value of type '_' expected to be instance of class or class-constrained type
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                                                  `- error: value of type '_' expected to be instance of class or class-constrained type
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:222:62: error: cannot find type 'URLRequest' in scope
220 |     /// - Throws: ``NexioError/decodingFailed(underlying:data:)`` if `T`
221 |     ///   doesn't match the response shape, or any status-mapped ``NexioError``.
222 |     private func perform<T: Decodable & Sendable>(_ request: URLRequest) async throws -> T {
    |                                                              `- error: cannot find type 'URLRequest' in scope
223 |         let (data, http) = try await executeWithInterceptors(request, attempt: 0)
224 |         logIfNeeded(request: request, response: http, data: data)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:254:20: error: cannot find type 'URLRequest' in scope
252 |     ///   interceptor opts to retry.
253 |     private func executeWithInterceptors(
254 |         _ request: URLRequest,
    |                    `- error: cannot find type 'URLRequest' in scope
255 |         attempt: Int
256 |     ) async throws -> (Data, HTTPURLResponse) {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:256:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 |         _ request: URLRequest,
255 |         attempt: Int
256 |     ) async throws -> (Data, HTTPURLResponse) {
    |                              `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
257 |         var adapted = request
258 |         for interceptor in interceptors {
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:292:17: error: cannot find type 'URLRequest' in scope
290 |         headers: [String: String],
291 |         body: Body?
292 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
293 |         guard let resolved = resolve(url) else {
294 |             throw NexioError.invalidURL(url)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:318:71: error: cannot find type 'URLRequest' in scope
316 |     /// - Returns: A populated `URLRequest`, ready for the interceptor pipeline.
317 |     /// - Throws: ``NexioError/invalidURL(_:)`` if the composed URL is malformed.
318 |     private func buildRequest(from endpoint: some Endpoint) throws -> URLRequest {
    |                                                                       `- error: cannot find type 'URLRequest' in scope
319 |         var components = URLComponents(
320 |             url: endpoint.baseURL.appendingPathComponent(endpoint.path),
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:365:56: error: cannot find type 'URLRequest' in scope
363 |     ///
364 |     /// - Parameter request: The request to mutate in place.
365 |     private func applyDefaultHeaders(to request: inout URLRequest) {
    |                                                        `- error: cannot find type 'URLRequest' in scope
366 |         config.defaultHeaders.forEach { request.setValue($1, forHTTPHeaderField: $0) }
367 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:375:72: error: cannot find type 'URLRequest' in scope
373 |     ///   - strategy: The strategy to apply — global or per-endpoint.
374 |     ///   - request: The request to mutate in place.
375 |     private func applyAuth(_ strategy: AuthStrategy, to request: inout URLRequest) {
    |                                                                        `- error: cannot find type 'URLRequest' in scope
376 |         switch strategy {
377 |         case .bearer(let token):
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:396:39: error: cannot find type 'URLRequest' in scope
394 |     ///   - response: The response that came back.
395 |     ///   - data: The raw response body (only its byte count is logged).
396 |     private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
    |                                       `- error: cannot find type 'URLRequest' in scope
397 |         switch config.logLevel {
398 |         case .none:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:396:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
394 |     ///   - response: The response that came back.
395 |     ///   - data: The raw response body (only its byte count is logged).
396 |     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.
397 |         switch config.logLevel {
398 |         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:50:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 48 |     public func configure(_ config: NexioConfig) {
 49 |         self.config = config
 50 |         let sessionConfig = URLSessionConfiguration.default
    |                                                     `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 51 |         sessionConfig.timeoutIntervalForRequest = config.timeout
 52 |         sessionConfig.httpAdditionalHeaders = config.defaultHeaders as [AnyHashable: Any]
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:56:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 54 |             sessionConfig.protocolClasses = protocolClasses + (sessionConfig.protocolClasses ?? [])
 55 |         }
 56 |         session = URLSession(configuration: sessionConfig)
    |                   `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 57 |         // Wire the config's retry policy as the first interceptor so callers
 58 |         // don't have to add RetryInterceptor manually when using NexioConfig.retry.
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:98:59: error: cannot infer contextual base in reference to member 'get'
 96 |         headers: [String: String] = [:]
 97 |     ) async throws -> T {
 98 |         let request = try buildRequest(url: url, method: .get, headers: headers, body: nil as String?)
    |                                                           `- error: cannot infer contextual base in reference to member 'get'
 99 |         return try await perform(request)
100 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:115:59: error: cannot infer contextual base in reference to member 'post'
113 |         headers: [String: String] = [:]
114 |     ) async throws -> T {
115 |         let request = try buildRequest(url: url, method: .post, headers: headers, body: body)
    |                                                           `- error: cannot infer contextual base in reference to member 'post'
116 |         return try await perform(request)
117 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:132:59: error: cannot infer contextual base in reference to member 'put'
130 |         headers: [String: String] = [:]
131 |     ) async throws -> T {
132 |         let request = try buildRequest(url: url, method: .put, headers: headers, body: body)
    |                                                           `- error: cannot infer contextual base in reference to member 'put'
133 |         return try await perform(request)
134 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:149:59: error: cannot infer contextual base in reference to member 'patch'
147 |         headers: [String: String] = [:]
148 |     ) async throws -> T {
149 |         let request = try buildRequest(url: url, method: .patch, headers: headers, body: body)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
150 |         return try await perform(request)
151 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:163:59: error: cannot infer contextual base in reference to member 'delete'
161 |         headers: [String: String] = [:]
162 |     ) async throws {
163 |         let request = try buildRequest(url: url, method: .delete, headers: headers, body: nil as String?)
    |                                                           `- error: cannot infer contextual base in reference to member 'delete'
164 |         let (data, http) = try await executeWithInterceptors(request, attempt: 0)
165 |         logIfNeeded(request: request, response: http, data: data)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:199:23: error: cannot find 'URLRequest' in scope
197 |             throw NexioError.invalidURL(url)
198 |         }
199 |         var request = URLRequest(url: resolvedURL)
    |                       `- error: cannot find 'URLRequest' in scope
200 |         request.httpMethod = HTTPMethod.get.rawValue
201 |         applyDefaultHeaders(to: &request)
/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/Core/NexioClient.swift:263:44: error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
261 |
262 |         do {
263 |             let result = try await session.nexioData(for: adapted)
    |                                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
264 |             return result
265 |         } catch let nexioError as NexioError {
/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:296:23: error: cannot find 'URLRequest' in scope
294 |             throw NexioError.invalidURL(url)
295 |         }
296 |         var request = URLRequest(url: resolved)
    |                       `- error: cannot find 'URLRequest' in scope
297 |         request.httpMethod = method.rawValue
298 |         applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:329:23: error: cannot find 'URLRequest' in scope
327 |             throw NexioError.invalidURL(endpoint.baseURL.absoluteString + endpoint.path)
328 |         }
329 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
330 |         request.httpMethod = endpoint.method.rawValue
331 |         applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:401:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'isSuccess'
399 |             break
400 |         case .errors:
401 |             guard !response.isSuccess else { return }
    |                             `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'isSuccess'
402 |             print("[Nexio] ❌ \(request.httpMethod ?? "?") \(request.url?.absoluteString ?? "") → \(response.statusCode)")
403 |         case .all:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:405:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
403 |         case .all:
404 |             print("[Nexio] ➡️  \(request.httpMethod ?? "?") \(request.url?.absoluteString ?? "")")
405 |             print("[Nexio] ⬅️  \(response.statusCode) (\(data.count) bytes)")
    |                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
406 |         }
407 |     }
[16/16] Compiling Nexio NexioClient.swift
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:34:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
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:34:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:34:50: error: value of type '_' expected to be instance of class or class-constrained type
 32 |     private var authStrategy: AuthStrategy = .none
 33 |     private var interceptors: [any Interceptor] = []
 34 |     private var session: URLSession = URLSession.shared
    |                                                  `- error: value of type '_' expected to be instance of class or class-constrained type
 35 |     private let decoder: JSONDecoder = JSONDecoder()
 36 |     private let encoder: JSONEncoder = JSONEncoder()
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:222:62: error: cannot find type 'URLRequest' in scope
220 |     /// - Throws: ``NexioError/decodingFailed(underlying:data:)`` if `T`
221 |     ///   doesn't match the response shape, or any status-mapped ``NexioError``.
222 |     private func perform<T: Decodable & Sendable>(_ request: URLRequest) async throws -> T {
    |                                                              `- error: cannot find type 'URLRequest' in scope
223 |         let (data, http) = try await executeWithInterceptors(request, attempt: 0)
224 |         logIfNeeded(request: request, response: http, data: data)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:254:20: error: cannot find type 'URLRequest' in scope
252 |     ///   interceptor opts to retry.
253 |     private func executeWithInterceptors(
254 |         _ request: URLRequest,
    |                    `- error: cannot find type 'URLRequest' in scope
255 |         attempt: Int
256 |     ) async throws -> (Data, HTTPURLResponse) {
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:256:30: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 |         _ request: URLRequest,
255 |         attempt: Int
256 |     ) async throws -> (Data, HTTPURLResponse) {
    |                              `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
257 |         var adapted = request
258 |         for interceptor in interceptors {
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:292:17: error: cannot find type 'URLRequest' in scope
290 |         headers: [String: String],
291 |         body: Body?
292 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
293 |         guard let resolved = resolve(url) else {
294 |             throw NexioError.invalidURL(url)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:318:71: error: cannot find type 'URLRequest' in scope
316 |     /// - Returns: A populated `URLRequest`, ready for the interceptor pipeline.
317 |     /// - Throws: ``NexioError/invalidURL(_:)`` if the composed URL is malformed.
318 |     private func buildRequest(from endpoint: some Endpoint) throws -> URLRequest {
    |                                                                       `- error: cannot find type 'URLRequest' in scope
319 |         var components = URLComponents(
320 |             url: endpoint.baseURL.appendingPathComponent(endpoint.path),
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:365:56: error: cannot find type 'URLRequest' in scope
363 |     ///
364 |     /// - Parameter request: The request to mutate in place.
365 |     private func applyDefaultHeaders(to request: inout URLRequest) {
    |                                                        `- error: cannot find type 'URLRequest' in scope
366 |         config.defaultHeaders.forEach { request.setValue($1, forHTTPHeaderField: $0) }
367 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:375:72: error: cannot find type 'URLRequest' in scope
373 |     ///   - strategy: The strategy to apply — global or per-endpoint.
374 |     ///   - request: The request to mutate in place.
375 |     private func applyAuth(_ strategy: AuthStrategy, to request: inout URLRequest) {
    |                                                                        `- error: cannot find type 'URLRequest' in scope
376 |         switch strategy {
377 |         case .bearer(let token):
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:396:39: error: cannot find type 'URLRequest' in scope
394 |     ///   - response: The response that came back.
395 |     ///   - data: The raw response body (only its byte count is logged).
396 |     private func logIfNeeded(request: URLRequest, response: HTTPURLResponse, data: Data) {
    |                                       `- error: cannot find type 'URLRequest' in scope
397 |         switch config.logLevel {
398 |         case .none:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:396:61: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
394 |     ///   - response: The response that came back.
395 |     ///   - data: The raw response body (only its byte count is logged).
396 |     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.
397 |         switch config.logLevel {
398 |         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:50:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 48 |     public func configure(_ config: NexioConfig) {
 49 |         self.config = config
 50 |         let sessionConfig = URLSessionConfiguration.default
    |                                                     `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
 51 |         sessionConfig.timeoutIntervalForRequest = config.timeout
 52 |         sessionConfig.httpAdditionalHeaders = config.defaultHeaders as [AnyHashable: Any]
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:56:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 54 |             sessionConfig.protocolClasses = protocolClasses + (sessionConfig.protocolClasses ?? [])
 55 |         }
 56 |         session = URLSession(configuration: sessionConfig)
    |                   `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 57 |         // Wire the config's retry policy as the first interceptor so callers
 58 |         // don't have to add RetryInterceptor manually when using NexioConfig.retry.
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:98:59: error: cannot infer contextual base in reference to member 'get'
 96 |         headers: [String: String] = [:]
 97 |     ) async throws -> T {
 98 |         let request = try buildRequest(url: url, method: .get, headers: headers, body: nil as String?)
    |                                                           `- error: cannot infer contextual base in reference to member 'get'
 99 |         return try await perform(request)
100 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:115:59: error: cannot infer contextual base in reference to member 'post'
113 |         headers: [String: String] = [:]
114 |     ) async throws -> T {
115 |         let request = try buildRequest(url: url, method: .post, headers: headers, body: body)
    |                                                           `- error: cannot infer contextual base in reference to member 'post'
116 |         return try await perform(request)
117 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:132:59: error: cannot infer contextual base in reference to member 'put'
130 |         headers: [String: String] = [:]
131 |     ) async throws -> T {
132 |         let request = try buildRequest(url: url, method: .put, headers: headers, body: body)
    |                                                           `- error: cannot infer contextual base in reference to member 'put'
133 |         return try await perform(request)
134 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:149:59: error: cannot infer contextual base in reference to member 'patch'
147 |         headers: [String: String] = [:]
148 |     ) async throws -> T {
149 |         let request = try buildRequest(url: url, method: .patch, headers: headers, body: body)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
150 |         return try await perform(request)
151 |     }
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:163:59: error: cannot infer contextual base in reference to member 'delete'
161 |         headers: [String: String] = [:]
162 |     ) async throws {
163 |         let request = try buildRequest(url: url, method: .delete, headers: headers, body: nil as String?)
    |                                                           `- error: cannot infer contextual base in reference to member 'delete'
164 |         let (data, http) = try await executeWithInterceptors(request, attempt: 0)
165 |         logIfNeeded(request: request, response: http, data: data)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:199:23: error: cannot find 'URLRequest' in scope
197 |             throw NexioError.invalidURL(url)
198 |         }
199 |         var request = URLRequest(url: resolvedURL)
    |                       `- error: cannot find 'URLRequest' in scope
200 |         request.httpMethod = HTTPMethod.get.rawValue
201 |         applyDefaultHeaders(to: &request)
/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/Core/NexioClient.swift:263:44: error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
261 |
262 |         do {
263 |             let result = try await session.nexioData(for: adapted)
    |                                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'nexioData'
264 |             return result
265 |         } catch let nexioError as NexioError {
/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:296:23: error: cannot find 'URLRequest' in scope
294 |             throw NexioError.invalidURL(url)
295 |         }
296 |         var request = URLRequest(url: resolved)
    |                       `- error: cannot find 'URLRequest' in scope
297 |         request.httpMethod = method.rawValue
298 |         applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:329:23: error: cannot find 'URLRequest' in scope
327 |             throw NexioError.invalidURL(endpoint.baseURL.absoluteString + endpoint.path)
328 |         }
329 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
330 |         request.httpMethod = endpoint.method.rawValue
331 |         applyDefaultHeaders(to: &request)
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:401:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'isSuccess'
399 |             break
400 |         case .errors:
401 |             guard !response.isSuccess else { return }
    |                             `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'isSuccess'
402 |             print("[Nexio] ❌ \(request.httpMethod ?? "?") \(request.url?.absoluteString ?? "") → \(response.statusCode)")
403 |         case .all:
/host/spi-builder-workspace/Sources/Nexio/Core/NexioClient.swift:405:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
403 |         case .all:
404 |             print("[Nexio] ➡️  \(request.httpMethod ?? "?") \(request.url?.absoluteString ?? "")")
405 |             print("[Nexio] ⬅️  \(response.statusCode) (\(data.count) bytes)")
    |                                          `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
406 |         }
407 |     }
BUILD FAILURE 6.2 linux