Build Information
Failed to build JSONHTTPClient with Swift 5.9 for Linux.
Build Command
bash -c docker run --rm -v "checkouts-4606859-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.41.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/otaviokz/JSONHTTPClient.git
Reference: develop
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/otaviokz/JSONHTTPClient
* branch develop -> FETCH_HEAD
* [new branch] develop -> origin/develop
HEAD is now at 3450210 Merge pull request #3 from otaviokz/v1.1.0
Cloned https://github.com/otaviokz/JSONHTTPClient.git
Revision (git rev-parse @):
34502106a676cac3d86209814a9bb99ddab66ea2
SUCCESS checkout https://github.com/otaviokz/JSONHTTPClient.git at develop
========================================
Build
========================================
Selected platform: linux
Swift version: 5.9
Building package at path: $workDir
https://github.com/otaviokz/JSONHTTPClient.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Building for debugging...
[1/4] Compiling JSONHTTPClient JSONHTTPClientError.swift
[2/4] Compiling JSONHTTPClient URLRequests+Utils.swift
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:15:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:16:50: error: cannot find type 'URLRequest' in scope
private func method(_ method: HTTPMethod) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:22:32: error: cannot find type 'URLRequest' in scope
func body(_ body: Data) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:28:56: error: cannot find type 'URLRequest' in scope
static func postData(_ body: Data, to url: URL) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:32:56: error: cannot find type 'URLRequest' in scope
static func postJSON(_ body: Data, to url: URL) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:49:88: error: cannot find type 'URLRequest' in scope
static func get(_ url: URL, cachePolicy: CachePolicy = .useProtocolCachePolicy) -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:49:46: error: cannot find type 'CachePolicy' in scope
static func get(_ url: URL, cachePolicy: CachePolicy = .useProtocolCachePolicy) -> URLRequest {
^~~~~~~~~~~
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Emitting module JSONHTTPClient
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:30:43: error: cannot find type 'URLRequest' in scope
func connect<T: Decodable>(_ request: URLRequest) async throws -> T {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/URLRequests+Utils.swift:15:11: error: cannot find type 'URLRequest' in scope
extension URLRequest {
^~~~~~~~~~
[4/4] Compiling JSONHTTPClient JSONHTTPClient.swift
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:30:43: error: cannot find type 'URLRequest' in scope
func connect<T: Decodable>(_ request: URLRequest) async throws -> T {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:19:28: error: cannot infer contextual base in reference to member 'get'
try await connect(.get(url).headers(httpHeaders))
~^~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:24:28: error: cannot infer contextual base in reference to member 'postJSON'
try await connect(.postJSON(body, to: url).headers(httpHeaders))
~^~~~~~~~
/host/spi-builder-workspace/Sources/JSONHTTPClient/JSONHTTPClient.swift:31:56: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
let (data, rulResponse) = try await URLSession.shared.data(for: request)
~~~~~~~~~~ ^~~~~~
error: fatalError
BUILD FAILURE 5.9 linux