Build Information
Failed to build RestApi, reference main (cd4f41), with Swift 6.2 for Linux on 20 Jun 2025 06:30:58 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/RxDx/restapi.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/RxDx/restapi
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at cd4f41e Upgrade unit tests from XCTest to Swift Testing (#6)
Cloned https://github.com/RxDx/restapi.git
Revision (git rev-parse @):
cd4f41e2c65640d76e479e9d9e573cb7a6c5c10a
SUCCESS checkout https://github.com/RxDx/restapi.git at main
========================================
Build
========================================
Selected platform: linux
Swift version: 6.2
Building package at path: $PWD
https://github.com/RxDx/restapi.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:f81a7bd7aa87a0f81848d48c5bcc03f5f78deebd37fa5f9be9913077205d3687
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.2-latest
Fetching https://github.com/swiftlang/swift-testing.git
[1/23359] Fetching swift-testing
Fetched https://github.com/swiftlang/swift-testing.git from cache (1.10s)
Fetching https://github.com/swiftlang/swift-syntax.git
[1/70906] Fetching swift-syntax
Fetched https://github.com/swiftlang/swift-syntax.git from cache (4.75s)
Computing version for https://github.com/swiftlang/swift-syntax.git
Computed https://github.com/swiftlang/swift-syntax.git at 602.0.0-prerelease-2025-05-29 (5.53s)
Creating working copy for https://github.com/swiftlang/swift-syntax.git
Working copy of https://github.com/swiftlang/swift-syntax.git resolved at 602.0.0-prerelease-2025-05-29
Creating working copy for https://github.com/swiftlang/swift-testing.git
Working copy of https://github.com/swiftlang/swift-testing.git resolved at main (e63d542)
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Emitting module RestApi
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// An URLSessionProtocol that contains the method used to request data from network
4 | public protocol URLSessionProtocol {
5 | func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:50: error: cannot find type 'URLSessionTaskDelegate' in scope
3 | /// An URLSessionProtocol that contains the method used to request data from network
4 | public protocol URLSessionProtocol {
5 | func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:98: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
3 | /// An URLSessionProtocol that contains the method used to request data from network
4 | public protocol URLSessionProtocol {
5 | func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | }
7 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:9:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
7 |
8 | /// An URLSession extension that conforms to URLSessionProtocol
9 | extension URLSession: URLSessionProtocol {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
10 | }
11 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:78:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
76 | ],
77 | debug: Bool = false,
78 | urlSession: URLSessionProtocol = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
79 | encoder: RestApiEncoder = JSONEncoder(),
80 | decoder: RestApiDecoder = JSONDecoder()
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:562:17: error: cannot find type 'URLRequest' in scope
560 | verb: Verb,
561 | header: [String: String]?
562 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
563 | var urlRequest = URLRequest(url: url)
564 | self.header.forEach { (key, value) in
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:579:39: error: cannot find type 'URLRequest' in scope
577 | /// - debug: A boolean flag that will print debug logs if true.
578 | /// - Returns: A response data.
579 | private func data(for urlRequest: URLRequest, debug: Bool?) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
580 | let debug = debug ?? self.debug
581 | if debug {
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[4/4] Compiling RestApi RestApi.swift
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:28: error: cannot find type 'URLRequest' in scope
3 | /// An URLSessionProtocol that contains the method used to request data from network
4 | public protocol URLSessionProtocol {
5 | func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:50: error: cannot find type 'URLSessionTaskDelegate' in scope
3 | /// An URLSessionProtocol that contains the method used to request data from network
4 | public protocol URLSessionProtocol {
5 | func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
6 | }
7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:98: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
3 | /// An URLSessionProtocol that contains the method used to request data from network
4 | public protocol URLSessionProtocol {
5 | func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | }
7 |
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:9:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
7 |
8 | /// An URLSession extension that conforms to URLSessionProtocol
9 | extension URLSession: URLSessionProtocol {
| `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
10 | }
11 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:78:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
76 | ],
77 | debug: Bool = false,
78 | urlSession: URLSessionProtocol = URLSession.shared,
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
79 | encoder: RestApiEncoder = JSONEncoder(),
80 | decoder: RestApiDecoder = JSONDecoder()
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:562:17: error: cannot find type 'URLRequest' in scope
560 | verb: Verb,
561 | header: [String: String]?
562 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
563 | var urlRequest = URLRequest(url: url)
564 | self.header.forEach { (key, value) in
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:579:39: error: cannot find type 'URLRequest' in scope
577 | /// - debug: A boolean flag that will print debug logs if true.
578 | /// - Returns: A response data.
579 | private func data(for urlRequest: URLRequest, debug: Bool?) async throws -> Data {
| `- error: cannot find type 'URLRequest' in scope
580 | let debug = debug ?? self.debug
581 | if debug {
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:113:63: error: cannot infer contextual base in reference to member 'get'
111 | ) async throws -> T {
112 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
113 | let urlRequest = try buildUrlRequest(url: url, verb: .get, header: header)
| `- error: cannot infer contextual base in reference to member 'get'
114 | let data = try await data(for: urlRequest, debug: debug)
115 | return try decoder.decode(T.self, from: data)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:140:63: error: cannot infer contextual base in reference to member 'post'
138 | ) async throws -> T? {
139 | let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
140 | var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
| `- error: cannot infer contextual base in reference to member 'post'
141 | if let resource = resource {
142 | urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:167:63: error: cannot infer contextual base in reference to member 'post'
165 | ) async throws {
166 | let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
167 | var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
| `- error: cannot infer contextual base in reference to member 'post'
168 | if let resource = resource {
169 | urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:194:63: error: cannot infer contextual base in reference to member 'post'
192 | ) async throws -> T? {
193 | let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
194 | var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
| `- error: cannot infer contextual base in reference to member 'post'
195 | if let payload = payload {
196 | urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:221:63: error: cannot infer contextual base in reference to member 'post'
219 | ) async throws {
220 | let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
221 | var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
| `- error: cannot infer contextual base in reference to member 'post'
222 | if let payload = payload {
223 | urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:252:63: error: cannot infer contextual base in reference to member 'put'
250 | ) async throws -> T? {
251 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
252 | var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
| `- error: cannot infer contextual base in reference to member 'put'
253 | if let resource = resource {
254 | urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:281:63: error: cannot infer contextual base in reference to member 'put'
279 | ) async throws {
280 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
281 | var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
| `- error: cannot infer contextual base in reference to member 'put'
282 | if let resource = resource {
283 | urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:310:63: error: cannot infer contextual base in reference to member 'put'
308 | ) async throws -> T? {
309 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
310 | var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
| `- error: cannot infer contextual base in reference to member 'put'
311 | if let payload = payload {
312 | urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:339:63: error: cannot infer contextual base in reference to member 'put'
337 | ) async throws {
338 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
339 | var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
| `- error: cannot infer contextual base in reference to member 'put'
340 | if let payload = payload {
341 | urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:371:63: error: cannot infer contextual base in reference to member 'patch'
369 | ) async throws -> T? {
370 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
371 | var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
| `- error: cannot infer contextual base in reference to member 'patch'
372 | if let resource = resource {
373 | urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:400:63: error: cannot infer contextual base in reference to member 'patch'
398 | ) async throws {
399 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
400 | var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
| `- error: cannot infer contextual base in reference to member 'patch'
401 | if let resource = resource {
402 | urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:429:63: error: cannot infer contextual base in reference to member 'patch'
427 | ) async throws -> T? {
428 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
429 | var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
| `- error: cannot infer contextual base in reference to member 'patch'
430 | if let payload = payload {
431 | urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:458:63: error: cannot infer contextual base in reference to member 'patch'
456 | ) async throws {
457 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
458 | var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
| `- error: cannot infer contextual base in reference to member 'patch'
459 | if let payload = payload {
460 | urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:487:63: error: cannot infer contextual base in reference to member 'delete'
485 | ) async throws -> T? {
486 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
487 | let urlRequest = try buildUrlRequest(url: url, verb: .delete, header: header)
| `- error: cannot infer contextual base in reference to member 'delete'
488 | let data = try await data(for: urlRequest, debug: debug)
489 | return try? decoder.decode(T.self, from: data)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:511:63: error: cannot infer contextual base in reference to member 'delete'
509 | ) async throws {
510 | let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
511 | let urlRequest = try buildUrlRequest(url: url, verb: .delete, header: header)
| `- error: cannot infer contextual base in reference to member 'delete'
512 | let _ = try await data(for: urlRequest, debug: debug)
513 | }
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:563:26: error: cannot find 'URLRequest' in scope
561 | header: [String: String]?
562 | ) throws -> URLRequest {
563 | var urlRequest = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
564 | self.header.forEach { (key, value) in
565 | urlRequest.setValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:591:85: error: 'nil' requires a contextual type
589 | }
590 | }
591 | let (data, response) = try await urlSession.data(for: urlRequest, delegate: nil)
| `- error: 'nil' requires a contextual type
592 | let responseStatusCode = (response as? HTTPURLResponse)?.statusCode
593 | if debug {
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:592:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
590 | }
591 | let (data, response) = try await urlSession.data(for: urlRequest, delegate: nil)
592 | let responseStatusCode = (response as? HTTPURLResponse)?.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
593 | if debug {
594 | debugPrint("Response: \(response.debugDescription)")
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
BUILD FAILURE 6.2 linux