The Swift Package Index logo.Swift Package Index

Build Information

Failed to build TestURLProtocol with Swift 5.10 for Linux.

Build Command

bash -c docker run --rm -v "checkouts-4609320-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.29.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mgopsill/TestURLProtocol.git
Reference: 0.1.0
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/mgopsill/TestURLProtocol
 * tag               0.1.0      -> FETCH_HEAD
HEAD is now at 9798638 🕸 TestURLProtocol
Cloned https://github.com/mgopsill/TestURLProtocol.git
Revision (git rev-parse @):
97986386f569b706e81e86713edaeafb0caadc2e
SUCCESS checkout https://github.com/mgopsill/TestURLProtocol.git at 0.1.0
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.10
Building package at path:  $workDir
https://github.com/mgopsill/TestURLProtocol.git
Running build ...
bash -c docker run --rm -v "checkouts-4609320-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Emitting module TestURLProtocol
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:7:35: error: cannot find type 'URLRequest' in scope
        public typealias MockResponse = (URLRequest) -> (
                                         ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:51: error: cannot find type 'URLRequest' in scope
        public override class func canInit(with request: URLRequest) -> Bool {
                                                         ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:29: error: method does not override any method from its superclass
        public override class func canInit(with request: URLRequest) -> Bool {
               ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:74: error: cannot find type 'URLRequest' in scope
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:59: error: cannot find type 'URLRequest' in scope
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                 ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:29: error: method does not override any method from its superclass
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
               ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:22:23: error: method does not override any method from its superclass
        public override func startLoading() {
               ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:54:23: error: method does not override any method from its superclass
        public override func stopLoading() {}
               ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:5:20: error: only protocols can inherit from 'AnyObject'
public final class TestURLProtocol: URLProtocol {
                   ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:5:37: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public final class TestURLProtocol: URLProtocol {
                                    ^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
                 ^
[4/4] Compiling TestURLProtocol TestURLProtocol.swift
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:7:35: error: cannot find type 'URLRequest' in scope
        public typealias MockResponse = (URLRequest) -> (
                                         ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:51: error: cannot find type 'URLRequest' in scope
        public override class func canInit(with request: URLRequest) -> Bool {
                                                         ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:29: error: method does not override any method from its superclass
        public override class func canInit(with request: URLRequest) -> Bool {
               ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:74: error: cannot find type 'URLRequest' in scope
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:59: error: cannot find type 'URLRequest' in scope
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                 ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:29: error: method does not override any method from its superclass
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
               ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:22:23: error: method does not override any method from its superclass
        public override func startLoading() {
               ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:54:23: error: method does not override any method from its superclass
        public override func stopLoading() {}
               ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:5:20: error: only protocols can inherit from 'AnyObject'
public final class TestURLProtocol: URLProtocol {
                   ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:5:37: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public final class TestURLProtocol: URLProtocol {
                                    ^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:25:5: error: cannot find 'request' in scope
                                request.url!.removingQueries
                                ^~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:28:32: error: cannot find 'request' in scope
                let response = responseBlock(request)
                                             ^~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:32:10: error: cannot find 'request' in scope
                                url: request.url!,
                                     ^~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:31:26: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
                        let httpURLResponse = HTTPURLResponse(
                                              ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:34:18: error: 'nil' requires a contextual type
                                httpVersion: nil,
                                             ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:35:19: error: 'nil' requires a contextual type
                                headerFields: nil
                                              ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:37:9: error: value of type 'TestURLProtocol' has no member 'client'
                        self.client?.urlProtocol(
                        ~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:40:26: error: cannot infer contextual base in reference to member 'notAllowed'
                                cacheStoragePolicy: .notAllowed
                                                    ~^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:46:4: error: cannot find 'client' in scope
                        client?.urlProtocol(self, didLoad: data)
                        ^~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:47:4: error: cannot find 'client' in scope
                        client?.urlProtocolDidFinishLoading(self)
                        ^~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:50:4: error: cannot find 'client' in scope
                        client?.urlProtocol(self, didFailWithError: error)
                        ^~~~~~
error: fatalError
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/3] Emitting module TestURLProtocol
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:7:35: error: cannot find type 'URLRequest' in scope
        public typealias MockResponse = (URLRequest) -> (
                                         ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:51: error: cannot find type 'URLRequest' in scope
        public override class func canInit(with request: URLRequest) -> Bool {
                                                         ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:29: error: method does not override any method from its superclass
        public override class func canInit(with request: URLRequest) -> Bool {
               ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:74: error: cannot find type 'URLRequest' in scope
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:59: error: cannot find type 'URLRequest' in scope
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                 ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:29: error: method does not override any method from its superclass
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
               ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:22:23: error: method does not override any method from its superclass
        public override func startLoading() {
               ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:54:23: error: method does not override any method from its superclass
        public override func stopLoading() {}
               ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:5:20: error: only protocols can inherit from 'AnyObject'
public final class TestURLProtocol: URLProtocol {
                   ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:5:37: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public final class TestURLProtocol: URLProtocol {
                                    ^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
                 ^
[3/3] Compiling TestURLProtocol TestURLProtocol.swift
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:7:35: error: cannot find type 'URLRequest' in scope
        public typealias MockResponse = (URLRequest) -> (
                                         ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:51: error: cannot find type 'URLRequest' in scope
        public override class func canInit(with request: URLRequest) -> Bool {
                                                         ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:29: error: method does not override any method from its superclass
        public override class func canInit(with request: URLRequest) -> Bool {
               ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:74: error: cannot find type 'URLRequest' in scope
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                                ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:59: error: cannot find type 'URLRequest' in scope
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
                                                                 ^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:29: error: method does not override any method from its superclass
        public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
               ~~~~~~~~            ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:22:23: error: method does not override any method from its superclass
        public override func startLoading() {
               ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:54:23: error: method does not override any method from its superclass
        public override func stopLoading() {}
               ~~~~~~~~      ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:5:20: error: only protocols can inherit from 'AnyObject'
public final class TestURLProtocol: URLProtocol {
                   ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:5:37: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
public final class TestURLProtocol: URLProtocol {
                                    ^~~~~~~~~~~
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
public typealias URLProtocol = AnyObject
                 ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:25:5: error: cannot find 'request' in scope
                                request.url!.removingQueries
                                ^~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:28:32: error: cannot find 'request' in scope
                let response = responseBlock(request)
                                             ^~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:32:10: error: cannot find 'request' in scope
                                url: request.url!,
                                     ^~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:31:26: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
                        let httpURLResponse = HTTPURLResponse(
                                              ^~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:34:18: error: 'nil' requires a contextual type
                                httpVersion: nil,
                                             ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:35:19: error: 'nil' requires a contextual type
                                headerFields: nil
                                              ^
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:37:9: error: value of type 'TestURLProtocol' has no member 'client'
                        self.client?.urlProtocol(
                        ~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:40:26: error: cannot infer contextual base in reference to member 'notAllowed'
                                cacheStoragePolicy: .notAllowed
                                                    ~^~~~~~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:46:4: error: cannot find 'client' in scope
                        client?.urlProtocol(self, didLoad: data)
                        ^~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:47:4: error: cannot find 'client' in scope
                        client?.urlProtocolDidFinishLoading(self)
                        ^~~~~~
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:50:4: error: cannot find 'client' in scope
                        client?.urlProtocol(self, didFailWithError: error)
                        ^~~~~~
error: fatalError
BUILD FAILURE 5.10 linux

Build Machine: Linux 2