The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build TestURLProtocol, reference 0.1.0 (979863), with Swift 6.0 for Linux on 29 Nov 2024 05:51:55 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.58.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:             6.0
Building package at path:  $PWD
https://github.com/mgopsill/TestURLProtocol.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
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
 5 | public final class TestURLProtocol: URLProtocol {
 6 | 	/// A type alias for a closure that takes in a `URLRequest` and returns a tuple containing a `Result` of `Data` or `Error`, and an optional `statusCode`.
 7 | 	public typealias MockResponse = (URLRequest) -> (
   |                                   `- error: cannot find type 'URLRequest' in scope
 8 | 		result: Result<Data, Error>, statusCode: Int?
 9 | 	)
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:11:20: warning: static property 'mockResponses' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 9 | 	)
10 | 	/// A dictionary storing the mock responses for specific URLs.
11 | 	public static var mockResponses: [URL: MockResponse] = [:]
   |                    |- warning: static property 'mockResponses' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                    |- note: convert 'mockResponses' to a 'let' constant to make 'Sendable' shared state immutable
   |                    |- note: annotate 'mockResponses' with '@MainActor' if property should only be accessed from the main actor
   |                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | 	public override class func canInit(with request: URLRequest) -> Bool {
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:51: error: cannot find type 'URLRequest' in scope
11 | 	public static var mockResponses: [URL: MockResponse] = [:]
12 |
13 | 	public override class func canInit(with request: URLRequest) -> Bool {
   |                                                   `- error: cannot find type 'URLRequest' in scope
14 | 		guard let url = request.url else { return false }
15 | 		return mockResponses.keys.contains(url.removingQueries)
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:29: error: method does not override any method from its superclass
11 | 	public static var mockResponses: [URL: MockResponse] = [:]
12 |
13 | 	public override class func canInit(with request: URLRequest) -> Bool {
   |                             `- error: method does not override any method from its superclass
14 | 		guard let url = request.url else { return false }
15 | 		return mockResponses.keys.contains(url.removingQueries)
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:74: error: cannot find type 'URLRequest' in scope
16 | 	}
17 |
18 | 	public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
   |                                                                          `- error: cannot find type 'URLRequest' in scope
19 | 		request
20 | 	}
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:59: error: cannot find type 'URLRequest' in scope
16 | 	}
17 |
18 | 	public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
   |                                                           `- error: cannot find type 'URLRequest' in scope
19 | 		request
20 | 	}
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:29: error: method does not override any method from its superclass
16 | 	}
17 |
18 | 	public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
   |                             `- error: method does not override any method from its superclass
19 | 		request
20 | 	}
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:22:23: error: method does not override any method from its superclass
20 | 	}
21 |
22 | 	public override func startLoading() {
   |                       `- error: method does not override any method from its superclass
23 | 		guard
24 | 			let responseBlock = TestURLProtocol.mockResponses[
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:54:23: error: method does not override any method from its superclass
52 | 	}
53 |
54 | 	public override func stopLoading() {}
   |                       `- error: method does not override any method from its superclass
55 | }
56 |
/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.
 3 | /// A `URLProtocol` subclass for testing purposes.
 4 | /// Allows for setting mock responses for specific URLs, which are returned instead of making a real network request.
 5 | public final class TestURLProtocol: URLProtocol {
   |                                     `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 6 | 	/// A type alias for a closure that takes in a `URLRequest` and returns a tuple containing a `Result` of `Data` or `Error`, and an optional `statusCode`.
 7 | 	public typealias MockResponse = (URLRequest) -> (
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLProtocol = AnyObject
  |                  `- note: 'URLProtocol' has been explicitly marked unavailable here
[4/4] Compiling TestURLProtocol TestURLProtocol.swift
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:7:35: error: cannot find type 'URLRequest' in scope
 5 | public final class TestURLProtocol: URLProtocol {
 6 | 	/// A type alias for a closure that takes in a `URLRequest` and returns a tuple containing a `Result` of `Data` or `Error`, and an optional `statusCode`.
 7 | 	public typealias MockResponse = (URLRequest) -> (
   |                                   `- error: cannot find type 'URLRequest' in scope
 8 | 		result: Result<Data, Error>, statusCode: Int?
 9 | 	)
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:11:20: warning: static property 'mockResponses' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 9 | 	)
10 | 	/// A dictionary storing the mock responses for specific URLs.
11 | 	public static var mockResponses: [URL: MockResponse] = [:]
   |                    |- warning: static property 'mockResponses' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                    |- note: convert 'mockResponses' to a 'let' constant to make 'Sendable' shared state immutable
   |                    |- note: annotate 'mockResponses' with '@MainActor' if property should only be accessed from the main actor
   |                    `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | 	public override class func canInit(with request: URLRequest) -> Bool {
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:51: error: cannot find type 'URLRequest' in scope
11 | 	public static var mockResponses: [URL: MockResponse] = [:]
12 |
13 | 	public override class func canInit(with request: URLRequest) -> Bool {
   |                                                   `- error: cannot find type 'URLRequest' in scope
14 | 		guard let url = request.url else { return false }
15 | 		return mockResponses.keys.contains(url.removingQueries)
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:13:29: error: method does not override any method from its superclass
11 | 	public static var mockResponses: [URL: MockResponse] = [:]
12 |
13 | 	public override class func canInit(with request: URLRequest) -> Bool {
   |                             `- error: method does not override any method from its superclass
14 | 		guard let url = request.url else { return false }
15 | 		return mockResponses.keys.contains(url.removingQueries)
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:74: error: cannot find type 'URLRequest' in scope
16 | 	}
17 |
18 | 	public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
   |                                                                          `- error: cannot find type 'URLRequest' in scope
19 | 		request
20 | 	}
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:59: error: cannot find type 'URLRequest' in scope
16 | 	}
17 |
18 | 	public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
   |                                                           `- error: cannot find type 'URLRequest' in scope
19 | 		request
20 | 	}
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:18:29: error: method does not override any method from its superclass
16 | 	}
17 |
18 | 	public override class func canonicalRequest(for request: URLRequest) -> URLRequest {
   |                             `- error: method does not override any method from its superclass
19 | 		request
20 | 	}
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:22:23: error: method does not override any method from its superclass
20 | 	}
21 |
22 | 	public override func startLoading() {
   |                       `- error: method does not override any method from its superclass
23 | 		guard
24 | 			let responseBlock = TestURLProtocol.mockResponses[
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:54:23: error: method does not override any method from its superclass
52 | 	}
53 |
54 | 	public override func stopLoading() {}
   |                       `- error: method does not override any method from its superclass
55 | }
56 |
/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.
 3 | /// A `URLProtocol` subclass for testing purposes.
 4 | /// Allows for setting mock responses for specific URLs, which are returned instead of making a real network request.
 5 | public final class TestURLProtocol: URLProtocol {
   |                                     `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 6 | 	/// A type alias for a closure that takes in a `URLRequest` and returns a tuple containing a `Result` of `Data` or `Error`, and an optional `statusCode`.
 7 | 	public typealias MockResponse = (URLRequest) -> (
Foundation.URLProtocol:2:18: note: 'URLProtocol' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLProtocol = AnyObject
  |                  `- note: 'URLProtocol' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:25:5: error: cannot find 'request' in scope
23 | 		guard
24 | 			let responseBlock = TestURLProtocol.mockResponses[
25 | 				request.url!.removingQueries
   |     `- error: cannot find 'request' in scope
26 | 			]
27 | 		else { fatalError("No mock response") }
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:28:32: error: cannot find 'request' in scope
26 | 			]
27 | 		else { fatalError("No mock response") }
28 | 		let response = responseBlock(request)
   |                                `- error: cannot find 'request' in scope
29 |
30 | 		if let statusCode = response.statusCode {
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:32:10: error: cannot find 'request' in scope
30 | 		if let statusCode = response.statusCode {
31 | 			let httpURLResponse = HTTPURLResponse(
32 | 				url: request.url!,
   |          `- error: cannot find 'request' in scope
33 | 				statusCode: statusCode,
34 | 				httpVersion: nil,
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:31:26: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 |
30 | 		if let statusCode = response.statusCode {
31 | 			let httpURLResponse = HTTPURLResponse(
   |                          `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
32 | 				url: request.url!,
33 | 				statusCode: statusCode,
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:34:18: error: 'nil' requires a contextual type
32 | 				url: request.url!,
33 | 				statusCode: statusCode,
34 | 				httpVersion: nil,
   |                  `- error: 'nil' requires a contextual type
35 | 				headerFields: nil
36 | 			)!
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:35:19: error: 'nil' requires a contextual type
33 | 				statusCode: statusCode,
34 | 				httpVersion: nil,
35 | 				headerFields: nil
   |                   `- error: 'nil' requires a contextual type
36 | 			)!
37 | 			self.client?.urlProtocol(
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:37:9: error: value of type 'TestURLProtocol' has no member 'client'
35 | 				headerFields: nil
36 | 			)!
37 | 			self.client?.urlProtocol(
   |         `- error: value of type 'TestURLProtocol' has no member 'client'
38 | 				self,
39 | 				didReceive: httpURLResponse,
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:40:26: error: cannot infer contextual base in reference to member 'notAllowed'
38 | 				self,
39 | 				didReceive: httpURLResponse,
40 | 				cacheStoragePolicy: .notAllowed
   |                          `- error: cannot infer contextual base in reference to member 'notAllowed'
41 | 			)
42 | 		}
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:46:4: error: cannot find 'client' in scope
44 | 		switch response.result {
45 | 		case let .success(data):
46 | 			client?.urlProtocol(self, didLoad: data)
   |    `- error: cannot find 'client' in scope
47 | 			client?.urlProtocolDidFinishLoading(self)
48 |
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:47:4: error: cannot find 'client' in scope
45 | 		case let .success(data):
46 | 			client?.urlProtocol(self, didLoad: data)
47 | 			client?.urlProtocolDidFinishLoading(self)
   |    `- error: cannot find 'client' in scope
48 |
49 | 		case let .failure(error):
/host/spi-builder-workspace/Sources/TestURLProtocol/TestURLProtocol.swift:50:4: error: cannot find 'client' in scope
48 |
49 | 		case let .failure(error):
50 | 			client?.urlProtocol(self, didFailWithError: error)
   |    `- error: cannot find 'client' in scope
51 | 		}
52 | 	}
BUILD FAILURE 6.0 linux