The Swift Package Index logo.Swift Package Index

Build Information

Failed to build MapboxSpeech with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4609320-1":/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/mapbox/mapbox-speech-swift.git
Reference: v2.1.1
Cloned https://github.com/mapbox/mapbox-speech-swift.git into spi-builder-workspace
SUCCESS checkout https://github.com/mapbox/mapbox-speech-swift.git at v2.1.1
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4609320-1":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Building for debugging...
error: emit-module command failed with exit code 1 (use -v to see invocation)
[1/6] Compiling MapboxSpeech MBSpeechOptions.swift
[2/6] Emitting module MapboxSpeech
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:299:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^         ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:41:25: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
    let systemVersion = ProcessInfo().operatingSystemVersion
                        ^
Foundation.ProcessInfo (internal):3:23: note: 'init()' declared here
    override internal init()
                      ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:150:124: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    @discardableResult open func audioData(with options: SpeechOptions, completionHandler: @escaping CompletionHandler) -> URLSessionDataTask {
                                                                                                                           ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:174:158: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    fileprivate func dataTask(with url: URL, completionHandler: @escaping (_ data: Data) -> Void, errorHandler: @escaping (_ error: SpeechError) -> Void) -> URLSessionDataTask {
                                                                                                                                                             ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:240:77: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    static func informativeError(code: String?, message: String?, response: URLResponse?, underlyingError error: Error?) -> SpeechError {
                                                                            ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:257:28: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    case unknown(response: URLResponse?, underlying: Error?, code: String?, message: String?)
                           ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
[3/6] Compiling MapboxSpeech MapboxSpeech.swift
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:299:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended
extension HTTPURLResponse {
^         ~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:41:25: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
    let systemVersion = ProcessInfo().operatingSystemVersion
                        ^
Foundation.ProcessInfo (internal):3:23: note: 'init()' declared here
    override internal init()
                      ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:150:124: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    @discardableResult open func audioData(with options: SpeechOptions, completionHandler: @escaping CompletionHandler) -> URLSessionDataTask {
                                                                                                                           ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:174:158: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    fileprivate func dataTask(with url: URL, completionHandler: @escaping (_ data: Data) -> Void, errorHandler: @escaping (_ error: SpeechError) -> Void) -> URLSessionDataTask {
                                                                                                                                                             ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:240:77: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    static func informativeError(code: String?, message: String?, response: URLResponse?, underlyingError error: Error?) -> SpeechError {
                                                                            ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:257:28: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    case unknown(response: URLResponse?, underlying: Error?, code: String?, message: String?)
                           ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:98:32: error: cannot find 'Selector' in scope
              mbx.responds(to: Selector(("serviceSkuToken"))),
                               ^~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:98:19: error: value of type 'AnyClass' (aka 'any AnyObject.Type') has no member 'responds'
              mbx.responds(to: Selector(("serviceSkuToken"))),
              ~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:99:41: error: value of type 'AnyClass' (aka 'any AnyObject.Type') has no member 'value'
              let serviceSkuToken = mbx.value(forKeyPath: "serviceSkuToken") as? String
                                    ~~~ ^~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:101:29: error: cannot find 'Selector' in scope
        if mbx.responds(to: Selector(("serviceAccessToken"))) {
                            ^~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:101:16: error: value of type 'AnyClass' (aka 'any AnyObject.Type') has no member 'responds'
        if mbx.responds(to: Selector(("serviceAccessToken"))) {
           ~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:102:48: error: value of type 'AnyClass' (aka 'any AnyObject.Type') has no member 'value'
            guard let serviceAccessToken = mbx.value(forKeyPath: "serviceAccessToken") as? String,
                                           ~~~ ^~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:161:14: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
        task.resume()
        ~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:176:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: url)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:178:64: error: cannot find type 'URLRequest' in scope
        let task = URLSession.shared.dataTask(with: request as URLRequest) { (possibleData, possibleResponse, possibleError) in
                                                               ^~~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:178:31: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
        let task = URLSession.shared.dataTask(with: request as URLRequest) { (possibleData, possibleResponse, possibleError) in
                   ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:180:49: error: argument type '_' expected to be an instance of a class or class-constrained type
                errorHandler(.unknown(response: possibleResponse, underlying: error, code: nil, message: nil))
                                                ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:241:36: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
        if let response = response as? HTTPURLResponse {
                          ~~~~~~~~~^~~~~~~~~~~~~~~~~~~
                                  
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:241:40: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        if let response = response as? HTTPURLResponse {
                                       ^~~~~~~~~~~~~~~
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
public typealias HTTPURLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:242:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
            switch (response.statusCode, code ?? "") {
                    ~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:244:65: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'rateLimitInterval'
                return .rateLimited(rateLimitInterval: response.rateLimitInterval, rateLimit: response.rateLimit, resetTime: response.rateLimitResetTime)
                                                       ~~~~~~~~ ^~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:244:104: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'rateLimit'
                return .rateLimited(rateLimitInterval: response.rateLimitInterval, rateLimit: response.rateLimit, resetTime: response.rateLimitResetTime)
                                                                                              ~~~~~~~~ ^~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:244:135: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'rateLimitResetTime'
                return .rateLimited(rateLimitInterval: response.rateLimitInterval, rateLimit: response.rateLimit, resetTime: response.rateLimitResetTime)
                                                                                                                             ~~~~~~~~ ^~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:266:37: error: 'DateComponentsFormatter' is unavailable: Not supported in swift-corelibs-foundation
            let intervalFormatter = DateComponentsFormatter()
                                    ^~~~~~~~~~~~~~~~~~~~~~~
Foundation.DateComponentsFormatter:2:12: note: 'DateComponentsFormatter' has been explicitly marked unavailable here
open class DateComponentsFormatter : Formatter {
           ^
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:277:36: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
                ?? HTTPURLResponse.localizedString(forStatusCode: (error as NSError?)?.code ?? -1)
                   ~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/MapboxSpeech/MapboxSpeech.swift:41:25: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
    let systemVersion = ProcessInfo().operatingSystemVersion
                        ^
Foundation.ProcessInfo (internal):3:23: note: 'init()' declared here
    override internal init()
                      ^
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 2