The Swift Package Index logo.Swift Package Index

Build Information

Failed to build APIClient, reference 1.0.2 (d75108), with Swift 6.2 for Android on 20 Jul 2025 23:15:50 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.2-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Archichil/swift-api-client.git
Reference: 1.0.2
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/Archichil/swift-api-client
 * tag               1.0.2      -> FETCH_HEAD
HEAD is now at d751086 Merge pull request #4 from Archichil/dev
Cloned https://github.com/Archichil/swift-api-client.git
Revision (git rev-parse @):
d7510864afeb323550de7aff31a61fae782d5ae3
SUCCESS checkout https://github.com/Archichil/swift-api-client.git at 1.0.2
========================================
Build
========================================
Selected platform:         android
Swift version:             6.2
Building package at path:  $PWD
https://github.com/Archichil/swift-api-client.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.2-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1
android-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:b7c4a6b4153ff40ef9277e2157e708f835b8eb011095d53bd8db4594eb2b7798
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-8C5A4AE7A8CE2BA.txt
[3/7] Compiling APIClient APIClient+Specification.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/7] Compiling APIClient APIClient+HTTPMethods.swift
[5/7] Compiling APIClient NetworkError.swift
[6/7] Emitting module APIClient
/host/spi-builder-workspace/Source/Core/APIClient.swift:54:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 52 |     /// Defaults to `URLSession.shared` but can be customized for testing or
 53 |     /// specific configuration requirements.
 54 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 55 |
 56 |     /// The JSON decoder for response data.
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/Source/Core/APIClient.swift:92:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 90 |     public init(
 91 |         baseURL: URL,
 92 |         urlSession: URLSession = URLSession.shared,
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 93 |         decoder: JSONDecoder = JSONDecoder(),
 94 |         useSnakeCaseConversion: Bool = true
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Core/APIClient.swift:92:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 90 |     public init(
 91 |         baseURL: URL,
 92 |         urlSession: URLSession = URLSession.shared,
    |                                             `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 93 |         decoder: JSONDecoder = JSONDecoder(),
 94 |         useSnakeCaseConversion: Bool = true
/host/spi-builder-workspace/Source/Core/APIClient.swift:204:43: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
202 |     ///   - `NetworkError.invalidResponse` if the response is not an `HTTPURLResponse`
203 |     ///   - `NetworkError.requestFailed(statusCode:)` if the status code is outside the 200-299 range
204 |     private func handleResponse(response: URLResponse) throws(NetworkError) {
    |                                           `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 |         guard let httpResponse = response as? HTTPURLResponse else {
206 |             throw NetworkError.invalidResponse
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Core/APIClient.swift:54:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClient' has non-sendable type 'URLSession' (aka 'AnyObject')
 52 |     /// Defaults to `URLSession.shared` but can be customized for testing or
 53 |     /// specific configuration requirements.
 54 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClient' has non-sendable type 'URLSession' (aka 'AnyObject')
 55 |
 56 |     /// The JSON decoder for response data.
[7/7] Compiling APIClient APIClient.swift
/host/spi-builder-workspace/Source/Core/APIClient.swift:54:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 52 |     /// Defaults to `URLSession.shared` but can be customized for testing or
 53 |     /// specific configuration requirements.
 54 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 55 |
 56 |     /// The JSON decoder for response data.
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/Source/Core/APIClient.swift:92:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 90 |     public init(
 91 |         baseURL: URL,
 92 |         urlSession: URLSession = URLSession.shared,
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 93 |         decoder: JSONDecoder = JSONDecoder(),
 94 |         useSnakeCaseConversion: Bool = true
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Core/APIClient.swift:92:45: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 90 |     public init(
 91 |         baseURL: URL,
 92 |         urlSession: URLSession = URLSession.shared,
    |                                             `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 93 |         decoder: JSONDecoder = JSONDecoder(),
 94 |         useSnakeCaseConversion: Bool = true
/host/spi-builder-workspace/Source/Core/APIClient.swift:204:43: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
202 |     ///   - `NetworkError.invalidResponse` if the response is not an `HTTPURLResponse`
203 |     ///   - `NetworkError.requestFailed(statusCode:)` if the status code is outside the 200-299 range
204 |     private func handleResponse(response: URLResponse) throws(NetworkError) {
    |                                           `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
205 |         guard let httpResponse = response as? HTTPURLResponse else {
206 |             throw NetworkError.invalidResponse
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Source/Core/APIClient.swift:54:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClient' has non-sendable type 'URLSession' (aka 'AnyObject')
 52 |     /// Defaults to `URLSession.shared` but can be customized for testing or
 53 |     /// specific configuration requirements.
 54 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'APIClient' has non-sendable type 'URLSession' (aka 'AnyObject')
 55 |
 56 |     /// The JSON decoder for response data.
/host/spi-builder-workspace/Source/Core/APIClient.swift:143:23: error: cannot find 'URLRequest' in scope
141 |     public func sendRequest<T: Decodable>(_ specification: APISpecification) async throws -> T {
142 |         let url = try constructURL(from: specification)
143 |         var request = URLRequest(
    |                       `- error: cannot find 'URLRequest' in scope
144 |             url: url,
145 |             cachePolicy: .useProtocolCachePolicy,
/host/spi-builder-workspace/Source/Core/APIClient.swift:145:27: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
143 |         var request = URLRequest(
144 |             url: url,
145 |             cachePolicy: .useProtocolCachePolicy,
    |                           `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
146 |             timeoutInterval: TimeInterval(floatLiteral: 30.0)
147 |         )
/host/spi-builder-workspace/Source/Core/APIClient.swift:152:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
150 |         request.allHTTPHeaderFields = specification.headers
151 |
152 |         let (data, response) = try await urlSession.data(for: request)
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
153 |         try handleResponse(response: response)
154 |
/host/spi-builder-workspace/Source/Core/APIClient.swift:205:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
203 |     ///   - `NetworkError.requestFailed(statusCode:)` if the status code is outside the 200-299 range
204 |     private func handleResponse(response: URLResponse) throws(NetworkError) {
205 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                           `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
206 |             throw NetworkError.invalidResponse
207 |         }
/host/spi-builder-workspace/Source/Core/APIClient.swift:205:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
203 |     ///   - `NetworkError.requestFailed(statusCode:)` if the status code is outside the 200-299 range
204 |     private func handleResponse(response: URLResponse) throws(NetworkError) {
205 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
206 |             throw NetworkError.invalidResponse
207 |         }
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/Source/Core/APIClient.swift:209:51: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
207 |         }
208 |
209 |         guard (200 ... 299).contains(httpResponse.statusCode) else {
    |                                                   `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
210 |             throw NetworkError.requestFailed(statusCode: httpResponse.statusCode)
211 |         }
/host/spi-builder-workspace/Source/Core/APIClient.swift:210:71: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
208 |
209 |         guard (200 ... 299).contains(httpResponse.statusCode) else {
210 |             throw NetworkError.requestFailed(statusCode: httpResponse.statusCode)
    |                                                                       `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
211 |         }
212 |     }
BUILD FAILURE 6.2 android