Build Information
Failed to build SwiftRest, reference main (c53f12
), with Swift 6.0 for Linux on 27 May 2025 01:47:53 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ricky-stone/SwiftRest.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/ricky-stone/SwiftRest
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at c53f121 Remove DEBUG guard from MockRestClient
Cloned https://github.com/ricky-stone/SwiftRest.git
Revision (git rev-parse @):
c53f121f51d3266385f8fd040d22c8dfb2ba264f
SUCCESS checkout https://github.com/ricky-stone/SwiftRest.git at main
========================================
Build
========================================
Selected platform: linux
Swift version: 6.0
Building package at path: $PWD
https://github.com/ricky-stone/SwiftRest.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:eb4fa402aea9a5d8f220b50fa960a581858eee7d87d88f234799973af2acd8ee
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/13] Compiling SwiftRest RestClientType.swift
[4/14] Compiling SwiftRest MockRestClient.swift
[5/14] Compiling SwiftRest NoContent.swift
[6/14] Compiling SwiftRest Json.swift
[7/14] Compiling SwiftRest JsonError.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/14] Compiling SwiftRest ErrorResponse.swift
[9/14] Compiling SwiftRest HTTPMethod.swift
[10/14] Emitting module SwiftRest
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:154:10: error: cannot find type 'URLRequest' in scope
152 | for httpRequest: SwiftRestRequest,
153 | requestURL: URL
154 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
155 | var request = URLRequest(url: requestURL)
156 | request.httpMethod = httpRequest.method.rawValue
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:200:24: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
198 | private func processResponse<T: Decodable>(
199 | _ data: Data,
200 | _ urlResponse: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
201 | _ startTime: Date,
202 | type: T.Type
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
[11/14] Compiling SwiftRest SwiftRestRequest.swift
[12/14] Compiling SwiftRest SwiftRestClient.swift
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:154:10: error: cannot find type 'URLRequest' in scope
152 | for httpRequest: SwiftRestRequest,
153 | requestURL: URL
154 | ) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
155 | var request = URLRequest(url: requestURL)
156 | request.httpMethod = httpRequest.method.rawValue
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:200:24: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
198 | private func processResponse<T: Decodable>(
199 | _ data: Data,
200 | _ urlResponse: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
201 | _ startTime: Date,
202 | type: T.Type
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/SwiftRest/SwiftRestClient.swift:66:64: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
64 | let startTime = Date()
65 | // Perform network call
66 | let (data, urlResponse) = try await URLSession.shared.data(for: request)
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
67 | // Process status code, headers, JSON decode if 2xx
68 | let response = try processResponse(
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:121:13: warning: variable 'requestURL' was never mutated; consider changing to 'let' constant
119 | baseURL: URL
120 | ) throws -> URL {
121 | var requestURL = baseURL.appendingPathComponent(httpRequest.path)
| `- warning: variable 'requestURL' was never mutated; consider changing to 'let' constant
122 |
123 | guard
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:155:23: error: cannot find 'URLRequest' in scope
153 | requestURL: URL
154 | ) -> URLRequest {
155 | var request = URLRequest(url: requestURL)
| `- error: cannot find 'URLRequest' in scope
156 | request.httpMethod = httpRequest.method.rawValue
157 |
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:205:46: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
203 | ) throws -> SwiftRestResponse<T> {
204 | let responseTime = Date().timeIntervalSince(startTime)
205 | guard let httpResponse = urlResponse as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
206 | let err = ErrorResponse(
207 | statusCode: 0,
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:205:50: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
203 | ) throws -> SwiftRestResponse<T> {
204 | let responseTime = Date().timeIntervalSince(startTime)
205 | guard let httpResponse = urlResponse as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
206 | let err = ErrorResponse(
207 | statusCode: 0,
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/SwiftRest/SwiftRestClient.swift:216:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
214 | }
215 |
216 | let statusCode = httpResponse.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
217 | let headers = httpResponse.allHeaderFields as? [String: String]
218 | let finalURL = httpResponse.url
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:217:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
215 |
216 | let statusCode = httpResponse.statusCode
217 | let headers = httpResponse.allHeaderFields as? [String: String]
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
218 | let finalURL = httpResponse.url
219 | let rawString = String(data: data, encoding: .utf8)
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:218:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
216 | let statusCode = httpResponse.statusCode
217 | let headers = httpResponse.allHeaderFields as? [String: String]
218 | let finalURL = httpResponse.url
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
219 | let rawString = String(data: data, encoding: .utf8)
220 |
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:228:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'mimeType'
226 | responseTime: responseTime,
227 | finalURL: finalURL,
228 | mimeType: httpResponse.mimeType
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'mimeType'
229 | )
230 |
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:232:47: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
230 |
231 | if let body = rawString,
232 | let contentType = httpResponse.value(forHTTPHeaderField: "Content-Type"),
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
233 | contentType.contains("application/json"),
234 | !body.isEmpty
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClient.swift:244:48: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'mimeType'
242 | responseTime: responseTime,
243 | finalURL: finalURL,
244 | mimeType: httpResponse.mimeType
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'mimeType'
245 | )
246 | }
[13/14] Compiling SwiftRest SwiftRestClientError.swift
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClientError.swift:65:18: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
63 | let body = (response.rawPayload ?? response.message) ?? ""
64 | let reason = HTTPURLResponse
65 | .localizedString(forStatusCode: response.statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
66 | .capitalized
67 | if body.isEmpty {
/host/spi-builder-workspace/Sources/SwiftRest/SwiftRestClientError.swift:126:18: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
124 | }
125 | let phrase = HTTPURLResponse
126 | .localizedString(forStatusCode: code)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
127 | .capitalized
128 | return "\(code): \(phrase)"
[14/14] Compiling SwiftRest SwiftRestResponse.swift
BUILD FAILURE 6.0 linux