Build Information
Failed to build APIManager with Swift 5.10 for Linux.
Build Command
bash -c docker run --rm -v "checkouts-4609320-1":/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/rauhul/api-manager.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/rauhul/api-manager
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at c8b6b42 Migrate to swift 5.0+, remove Cocopods for SPM
Cloned https://github.com/rauhul/api-manager.git
Revision (git rev-parse @):
c8b6b426a4172cf1cd4568601cf36b6437d65ae8
SUCCESS checkout https://github.com/rauhul/api-manager.git at main
========================================
Build
========================================
Selected platform: linux
Swift version: 5.10
Building package at path: $workDir
https://github.com/rauhul/api-manager.git
Running build ...
bash -c docker run --rm -v "checkouts-4609320-1":/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/9] Compiling APIManager HTTP.swift
[4/9] Compiling APIManager APIReturnable.swift
[5/9] Compiling APIManager Dictionary.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/9] Compiling APIManager APIAuthorization.swift
[7/9] Emitting module APIManager
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:58:6: error: Objective-C interoperability is disabled
@objc private dynamic var state: APIRequestState {
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:71:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var dataTask: URLSessionDataTask?
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:100:45: error: cannot find type 'URLRequest' in scope
private func formURLRequest() throws -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:129:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func urlRequestCallback(data: Data?, response: URLResponse?, error: Error?) {
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
[8/9] Compiling APIManager APIRequest.swift
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:58:6: error: Objective-C interoperability is disabled
@objc private dynamic var state: APIRequestState {
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:71:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var dataTask: URLSessionDataTask?
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:100:45: error: cannot find type 'URLRequest' in scope
private func formURLRequest() throws -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:129:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func urlRequestCallback(data: Data?, response: URLResponse?, error: Error?) {
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:99: error: '#keyPath' can only be used with the Objective-C runtime
@objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:103: error: '#keyPath' can only be used with the Objective-C runtime
@objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:102: error: '#keyPath' can only be used with the Objective-C runtime
@objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:114:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: url)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:136:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
} else if let response = response as? HTTPURLResponse, let data = data {
~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:136:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
} else if let response = response as? HTTPURLResponse, let data = data {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:138:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
try service.validate(statusCode: response.statusCode)
~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:160:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
dataTask = URLSession.shared.dataTask(with: urlRequest, completionHandler: urlRequestCallback)
~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:161:23: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
dataTask?.resume()
~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:224:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
dataTask?.cancel()
~~~~~~~~~ ^~~~~~
[9/9] Compiling APIManager APIService.swift
/host/spi-builder-workspace/Sources/APIManager/APIService.swift:67:47: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
let description = HTTPURLResponse.localizedString(forStatusCode: statusCode)
~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~
error: fatalError
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/4] Emitting module APIManager
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:58:6: error: Objective-C interoperability is disabled
@objc private dynamic var state: APIRequestState {
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:71:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var dataTask: URLSessionDataTask?
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:100:45: error: cannot find type 'URLRequest' in scope
private func formURLRequest() throws -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:129:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func urlRequestCallback(data: Data?, response: URLResponse?, error: Error?) {
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
[3/4] Compiling APIManager APIRequest.swift
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:58:6: error: Objective-C interoperability is disabled
@objc private dynamic var state: APIRequestState {
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:71:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private var dataTask: URLSessionDataTask?
^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:6: error: Objective-C interoperability is disabled
@objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
~^~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:100:45: error: cannot find type 'URLRequest' in scope
private func formURLRequest() throws -> URLRequest {
^~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:129:60: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
private func urlRequestCallback(data: Data?, response: URLResponse?, error: Error?) {
^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:93:99: error: '#keyPath' can only be used with the Objective-C runtime
@objc private dynamic class func keyPathsForValuesAffectingIsReady() -> Set<String> { return [#keyPath(state)] }
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:95:103: error: '#keyPath' can only be used with the Objective-C runtime
@objc private dynamic class func keyPathsForValuesAffectingIsExecuting() -> Set<String> { return [#keyPath(state)] }
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:97:102: error: '#keyPath' can only be used with the Objective-C runtime
@objc private dynamic class func keyPathsForValuesAffectingIsFinished() -> Set<String> { return [#keyPath(state)] }
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:114:23: error: cannot find 'URLRequest' in scope
var request = URLRequest(url: url)
^~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:136:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
} else if let response = response as? HTTPURLResponse, let data = data {
~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:136:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
} else if let response = response as? HTTPURLResponse, let data = data {
^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
^
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:138:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
try service.validate(statusCode: response.statusCode)
~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:160:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
dataTask = URLSession.shared.dataTask(with: urlRequest, completionHandler: urlRequestCallback)
~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:161:23: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
dataTask?.resume()
~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/APIManager/APIRequest.swift:224:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
dataTask?.cancel()
~~~~~~~~~ ^~~~~~
[4/4] Compiling APIManager APIService.swift
/host/spi-builder-workspace/Sources/APIManager/APIService.swift:67:47: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
let description = HTTPURLResponse.localizedString(forStatusCode: statusCode)
~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~
error: fatalError
BUILD FAILURE 5.10 linux