The Swift Package Index logo.Swift Package Index

Build Information

Failed to build APIManager with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4609320-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.19.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/rauhul/api-manager.git
Reference: 0.4.0
Cloned https://github.com/rauhul/api-manager.git into spi-builder-workspace
SUCCESS checkout https://github.com/rauhul/api-manager.git at 0.4.0
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4609320-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Building for debugging...
[1/7] Compiling APIManager HTTP.swift
[2/7] Compiling APIManager Dictionary.swift
[3/7] 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: emit-module command failed with exit code 1 (use -v to see invocation)
[4/7] Compiling APIManager APIAuthorization.swift
[5/7] Compiling APIManager APIReturnable.swift
[6/7] 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
                 ^
[7/7] 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()
        ~~~~~~~~~ ^~~~~~
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 2