The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Coinpaprika with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4606859-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/coinpaprika/coinpaprika-api-swift-client.git
Reference: 2.4.0
Cloned https://github.com/coinpaprika/coinpaprika-api-swift-client.git into spi-builder-workspace
SUCCESS checkout https://github.com/coinpaprika/coinpaprika-api-swift-client.git at 2.4.0
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4606859-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/6] Compiling CoinpaprikaNetworking Request.swift
/host/spi-builder-workspace/Sources/Networking/Request.swift:13:62: error: cannot find type 'URLRequest' in scope
    func perform(responseQueue: DispatchQueue?, cachePolicy: URLRequest.CachePolicy?, session: NetworkSession, _ callback: @escaping (Result<Model, Error>) -> Void)
                                                             ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:51:37: error: cannot find type 'URLRequest' in scope
        case dynamic(signer: (inout URLRequest) -> Void)
                                    ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:56:49: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    public typealias ErrorParser = (_ response: HTTPURLResponse, _ data: Data) -> Error?
                                                ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/Networking/Request.swift:83:75: error: cannot find type 'URLRequest' in scope
    public func perform(responseQueue: DispatchQueue? = nil, cachePolicy: URLRequest.CachePolicy? = nil, session: NetworkSession = URLSession.shared, _ callback: @escaping (Result<Model, Error>) -> Void) {
                                                                          ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:83:143: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    public func perform(responseQueue: DispatchQueue? = nil, cachePolicy: URLRequest.CachePolicy? = nil, session: NetworkSession = URLSession.shared, _ callback: @escaping (Result<Model, Error>) -> Void) {
                                                                                                                                   ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:138:85: error: cannot find type 'URLRequest' in scope
    private func buildRequest(cachePolicy: URLRequest.CachePolicy? = nil) throws -> URLRequest {
                                                                                    ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:138:44: error: cannot find type 'URLRequest' in scope
    private func buildRequest(cachePolicy: URLRequest.CachePolicy? = nil) throws -> URLRequest {
                                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:204:59: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private func findFailureReason(data: Data?, response: URLResponse?) -> Error {
                                                          ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/Networking/Request.swift:88:22: error: cannot find type 'URLRequest' in scope
        let request: URLRequest
                     ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/NetworkSession.swift:11:33: error: cannot find type 'URLRequest' in scope
    func loadData(with request: URLRequest,
                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:110:109: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
                guard let httpResponse = urlResponse as? HTTPURLResponse, (200..<300).contains(httpResponse.statusCode) else {
                                                                                               ~~~~~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:139:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:205:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
        guard let response = response as? HTTPURLResponse else {
                             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
                                     
/host/spi-builder-workspace/Sources/Networking/Request.swift:205:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        guard let response = response as? HTTPURLResponse else {
                                          ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/Networking/Request.swift:213:61: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
        return ResponseError.serverError(httpCode: response.statusCode, url: response.url)
                                                   ~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:213:87: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
        return ResponseError.serverError(httpCode: response.statusCode, url: response.url)
                                                                             ~~~~~~~~ ^~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:218:29: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
            switch response.statusCode {
                   ~~~~~~~~ ^~~~~~~~~~
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/6] Compiling CoinpaprikaNetworking CodableModel.swift
[3/6] Emitting module CoinpaprikaNetworking
/host/spi-builder-workspace/Sources/Networking/NetworkSession.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
extension URLSession: NetworkSession {
^         ~~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/NetworkSession.swift:11:33: error: cannot find type 'URLRequest' in scope
    func loadData(with request: URLRequest,
                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/NetworkSession.swift:12:56: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
                  completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
                                                       ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/Networking/Request.swift:13:62: error: cannot find type 'URLRequest' in scope
    func perform(responseQueue: DispatchQueue?, cachePolicy: URLRequest.CachePolicy?, session: NetworkSession, _ callback: @escaping (Result<Model, Error>) -> Void)
                                                             ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:51:37: error: cannot find type 'URLRequest' in scope
        case dynamic(signer: (inout URLRequest) -> Void)
                                    ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:56:49: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    public typealias ErrorParser = (_ response: HTTPURLResponse, _ data: Data) -> Error?
                                                ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/Networking/Request.swift:83:75: error: cannot find type 'URLRequest' in scope
    public func perform(responseQueue: DispatchQueue? = nil, cachePolicy: URLRequest.CachePolicy? = nil, session: NetworkSession = URLSession.shared, _ callback: @escaping (Result<Model, Error>) -> Void) {
                                                                          ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:83:143: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    public func perform(responseQueue: DispatchQueue? = nil, cachePolicy: URLRequest.CachePolicy? = nil, session: NetworkSession = URLSession.shared, _ callback: @escaping (Result<Model, Error>) -> Void) {
                                                                                                                                   ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:138:85: error: cannot find type 'URLRequest' in scope
    private func buildRequest(cachePolicy: URLRequest.CachePolicy? = nil) throws -> URLRequest {
                                                                                    ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:138:44: error: cannot find type 'URLRequest' in scope
    private func buildRequest(cachePolicy: URLRequest.CachePolicy? = nil) throws -> URLRequest {
                                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/Request.swift:204:59: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private func findFailureReason(data: Data?, response: URLResponse?) -> Error {
                                                          ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
[4/6] Compiling CoinpaprikaNetworking Result.swift
[5/6] Compiling CoinpaprikaNetworking Errors.swift
[6/6] Compiling CoinpaprikaNetworking NetworkSession.swift
/host/spi-builder-workspace/Sources/Networking/NetworkSession.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
extension URLSession: NetworkSession {
^         ~~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/NetworkSession.swift:11:33: error: cannot find type 'URLRequest' in scope
    func loadData(with request: URLRequest,
                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/Networking/NetworkSession.swift:12:56: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
                  completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void)
                                                       ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/Networking/NetworkSession.swift:16:40: error: cannot find type 'URLRequest' in scope
    public func loadData(with request: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) {
                                       ^~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1