The Swift Package Index logo.Swift Package Index

Build Information

Failed to build TestUtils 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/1904labs/ios-test-utils.git
Reference: 1.0.2
Cloned https://github.com/1904labs/ios-test-utils.git into spi-builder-workspace
SUCCESS checkout https://github.com/1904labs/ios-test-utils.git at 1.0.2
========================================
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...
error: emit-module command failed with exit code 1 (use -v to see invocation)
[1/3] Emitting module TestUtils
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:13:59: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    static var testURLs = [URL?: [(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/TestUtils/URLProtocolMock.swift:16:47: error: cannot find type 'URLRequest' in scope
    override class func canInit(with request: URLRequest) -> Bool {
                                              ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:16:25: error: method does not override any method from its superclass
    override class func canInit(with request: URLRequest) -> Bool {
    ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:21:70: error: cannot find type 'URLRequest' in scope
    override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                     ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:21:55: error: cannot find type 'URLRequest' in scope
    override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:21:25: error: method does not override any method from its superclass
    override class func canonicalRequest(for request: URLRequest) -> URLRequest {
    ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:25:19: error: method does not override any method from its superclass
    override func startLoading() {
    ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:46:19: error: method does not override any method from its superclass
    override func stopLoading() { }
    ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:10:7: error: only protocols can inherit from 'AnyObject'
class URLProtocolMock: URLProtocol {
      ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:10:24: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
class URLProtocolMock: URLProtocol {
                       ^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TestUtils/URLSessionMock.swift:13:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public var urlSessionMock: URLSession {
                           ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
[2/3] Compiling TestUtils URLProtocolMock.swift
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:13:59: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    static var testURLs = [URL?: [(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/TestUtils/URLProtocolMock.swift:16:47: error: cannot find type 'URLRequest' in scope
    override class func canInit(with request: URLRequest) -> Bool {
                                              ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:16:25: error: method does not override any method from its superclass
    override class func canInit(with request: URLRequest) -> Bool {
    ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:21:70: error: cannot find type 'URLRequest' in scope
    override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                     ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:21:55: error: cannot find type 'URLRequest' in scope
    override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                      ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:21:25: error: method does not override any method from its superclass
    override class func canonicalRequest(for request: URLRequest) -> URLRequest {
    ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:25:19: error: method does not override any method from its superclass
    override func startLoading() {
    ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:46:19: error: method does not override any method from its superclass
    override func stopLoading() { }
    ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:10:7: error: only protocols can inherit from 'AnyObject'
class URLProtocolMock: URLProtocol {
      ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:10:24: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
class URLProtocolMock: URLProtocol {
                       ^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:27:18: error: value of type 'URLProtocolMock' has no member 'client'
            self.client?.urlProtocolDidFinishLoading(self)
            ~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:30:25: error: cannot find 'request' in scope
        guard let url = request.url,
                        ^~~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:37:18: error: value of type 'URLProtocolMock' has no member 'client'
            self.client?.urlProtocol(self, didFailWithError: error)
            ~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:39:18: error: value of type 'URLProtocolMock' has no member 'client'
            self.client?.urlProtocol(self, didLoad: data)
            ~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:42:14: error: value of type 'URLProtocolMock' has no member 'client'
        self.client?.urlProtocol(self, didReceive: urlResponse, cacheStoragePolicy: .allowed)
        ~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLProtocolMock.swift:42:86: error: cannot infer contextual base in reference to member 'allowed'
        self.client?.urlProtocol(self, didReceive: urlResponse, cacheStoragePolicy: .allowed)
                                                                                    ~^~~~~~~
[3/3] Compiling TestUtils URLSessionMock.swift
/host/spi-builder-workspace/Sources/TestUtils/URLSessionMock.swift:13:28: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public var urlSessionMock: URLSession {
                           ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TestUtils/URLSessionMock.swift:14:49: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
    let configuration = URLSessionConfiguration.ephemeral
                        ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~
/host/spi-builder-workspace/Sources/TestUtils/URLSessionMock.swift:16:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
    let session = URLSession(configuration: configuration)
                  ^~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1