The Swift Package Index logo.Swift Package Index

Build Information

Failed to build IPData 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/heyzooi/IPData.git
Reference: 1.0.0
Cloned https://github.com/heyzooi/IPData.git into spi-builder-workspace
SUCCESS checkout https://github.com/heyzooi/IPData.git at 1.0.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/10] Compiling IPData StatusCode.swift
[2/10] Compiling IPData Threat.swift
[3/11] Compiling IPData Result.swift
[4/11] Compiling IPData Timezone.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/11] Compiling IPData Carrier.swift
[6/11] Compiling IPData Currency.swift
[7/11] Compiling IPData Language.swift
[8/11] Emitting module IPData
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    public static var urlSession = URLSession.shared
                                   ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask? {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        response: URLResponse?,
                  ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
[9/11] Compiling IPData IPDataError.swift
/host/spi-builder-workspace/Sources/IPData/IPDataError.swift:41:36: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
            return HTTPURLResponse.localizedString(forStatusCode: statusCode)
                   ~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~
[10/11] Compiling IPData IP.swift
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    public static var urlSession = URLSession.shared
                                   ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask? {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        response: URLResponse?,
                  ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:23:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
        let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
                   ~~~~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:41:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
        let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
                   ~~~~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:59:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: urlComponents.url!)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:64:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
            let task = urlSession.dataTask(with: request) { data, response, error in
                       ~~~~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:69:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
        } catch {
          ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85: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/IPData/IPData.swift:85: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/IPData/IPData.swift:89:62: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
        guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
                                                    ~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:90:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
            completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
                                                                               ~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:104:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
                    let error = IPDataError(statusCode: response.statusCode, message: message)
                                                        ~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:111:93: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
                completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
                                                                                   ~~~~~~~~ ^~~~~~~~~~
[11/11] Compiling IPData IPData.swift
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
    public static var urlSession = URLSession.shared
                                   ~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        urlSession: URLSession = urlSession,
                    ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        ) -> URLSessionTask? {
             ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
        response: URLResponse?,
                  ^~~~~~~~~~~
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
public typealias URLResponse = AnyObject
                 ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:23:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
        let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
                   ~~~~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:41:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
        let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
                   ~~~~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:59:23: error: cannot find 'URLRequest' in scope
        var request = URLRequest(url: urlComponents.url!)
                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:64:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
            let task = urlSession.dataTask(with: request) { data, response, error in
                       ~~~~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:69:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
        } catch {
          ^
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85: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/IPData/IPData.swift:85: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/IPData/IPData.swift:89:62: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
        guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
                                                    ~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:90:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
            completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
                                                                               ~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:104:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
                    let error = IPDataError(statusCode: response.statusCode, message: message)
                                                        ~~~~~~~~ ^~~~~~~~~~
/host/spi-builder-workspace/Sources/IPData/IPData.swift:111:93: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
                completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
                                                                                   ~~~~~~~~ ^~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1