Build Information
Failed to build OkHttpClient with Swift 5.10 for Linux.
Build Command
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.29.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/rmichelberger/OkHttpClient.git
Reference: 1.0.0
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/rmichelberger/OkHttpClient
* tag 1.0.0 -> FETCH_HEAD
HEAD is now at 4b16a0f - fixed simple logger
Cloned https://github.com/rmichelberger/OkHttpClient.git
Revision (git rev-parse @):
4b16a0f97e814132326e76479fe90e2f9fc962a2
SUCCESS checkout https://github.com/rmichelberger/OkHttpClient.git at 1.0.0
========================================
Build
========================================
Selected platform: linux
Swift version: 5.10
Building package at path: $workDir
https://github.com/rmichelberger/OkHttpClient.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling OkHttpClient SimpleLogger.swift
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:6:30: error: cannot find type 'URLRequest' in scope
public func log(request: URLRequest) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:33:31: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func log(response: HTTPURLResponse, data: Data?) {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:4:23: error: cannot find type 'URLRequest' in scope
func log(request: URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:35:39: error: type of expression is ambiguous without a type annotation
let urlString = response.url?.absoluteString
~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:43:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
responseLog += "HTTP \(response.statusCode)"
~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:54:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
for (name,value) in response.allHeaderFields {
~~~~~~~~ ^~~~~~~~~~~~~~~
[4/10] Compiling OkHttpClient NullEncodable.swift
[5/10] Compiling OkHttpClient Logger.swift
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:4:23: error: cannot find type 'URLRequest' in scope
func log(request: URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:5:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
func log(response: HTTPURLResponse, data: Data?)
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/10] Emitting module OkHttpClient
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:4:23: error: cannot find type 'URLRequest' in scope
func log(request: URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:5:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
func log(response: HTTPURLResponse, data: Data?)
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:6:30: error: cannot find type 'URLRequest' in scope
public func log(request: URLRequest) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:33:31: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func log(response: HTTPURLResponse, data: Data?) {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:26:8: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
public extension URLSession {
^ ~~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:12:48: error: cannot find type 'URLRequest' in scope
public func execute<T: Decodable>(request: URLRequest) async throws -> T {
^~~~~~~~~~
[7/10] Compiling OkHttpClient RawDataDecoder.swift
[8/10] Compiling OkHttpClient DataDecoder.swift
[9/10] Compiling OkHttpClient JSON.swift
[10/10] Compiling OkHttpClient OkHttpClient.swift
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:26:8: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
public extension URLSession {
^ ~~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:4:23: error: cannot find type 'URLRequest' in scope
func log(request: URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:12:48: error: cannot find type 'URLRequest' in scope
public func execute<T: Decodable>(request: URLRequest) async throws -> T {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:14:33: error: extra argument 'request' in call
logger.log(request: request)
~~~~~~~~~~^~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:14:23: error: missing arguments for parameters 'response', 'data' in call
logger.log(request: request)
^
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:5:10: note: 'log(response:data:)' declared here
func log(response: HTTPURLResponse, data: Data?)
^
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:16:43: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
let result = try await URLSession.shared.data(for: request)
~~~~~~~~~~ ^~~~~~
error: fatalError
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/5] Compiling OkHttpClient OkHttpClient.swift
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:26:8: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
public extension URLSession {
^ ~~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:4:23: error: cannot find type 'URLRequest' in scope
func log(request: URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:12:48: error: cannot find type 'URLRequest' in scope
public func execute<T: Decodable>(request: URLRequest) async throws -> T {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:14:33: error: extra argument 'request' in call
logger.log(request: request)
~~~~~~~~~~^~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:14:23: error: missing arguments for parameters 'response', 'data' in call
logger.log(request: request)
^
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:5:10: note: 'log(response:data:)' declared here
func log(response: HTTPURLResponse, data: Data?)
^
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:16:43: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
let result = try await URLSession.shared.data(for: request)
~~~~~~~~~~ ^~~~~~
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/5] Emitting module OkHttpClient
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:4:23: error: cannot find type 'URLRequest' in scope
func log(request: URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:5:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
func log(response: HTTPURLResponse, data: Data?)
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:6:30: error: cannot find type 'URLRequest' in scope
public func log(request: URLRequest) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:33:31: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func log(response: HTTPURLResponse, data: Data?) {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:26:8: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
public extension URLSession {
^ ~~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/OkHttpClient.swift:12:48: error: cannot find type 'URLRequest' in scope
public func execute<T: Decodable>(request: URLRequest) async throws -> T {
^~~~~~~~~~
[4/5] Compiling OkHttpClient SimpleLogger.swift
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:6:30: error: cannot find type 'URLRequest' in scope
public func log(request: URLRequest) {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:33:31: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public func log(response: HTTPURLResponse, data: Data?) {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:4:23: error: cannot find type 'URLRequest' in scope
func log(request: URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:35:39: error: type of expression is ambiguous without a type annotation
let urlString = response.url?.absoluteString
~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:43:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
responseLog += "HTTP \(response.statusCode)"
~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/SimpleLogger.swift:54:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
for (name,value) in response.allHeaderFields {
~~~~~~~~ ^~~~~~~~~~~~~~~
[5/5] Compiling OkHttpClient Logger.swift
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:4:23: error: cannot find type 'URLRequest' in scope
func log(request: URLRequest)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/OkHttpClient/Logger/Logger.swift:5:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
func log(response: HTTPURLResponse, data: Data?)
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
error: fatalError
BUILD FAILURE 5.10 linux