The Swift Package Index logo.Swift Package Index

Build Information

Failed to build TestURLProtocol, reference main (1a7113), with Swift 6.3 for Wasm on 13 Apr 2026 12:14:46 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mgopsill/TestURLProtocol.git
Reference: main
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
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 1a71132 feat: add badges
Cloned https://github.com/mgopsill/TestURLProtocol.git
Revision (git rev-parse @):
1a711329da548c6953c513761f1e5a4cef91ccbf
SUCCESS checkout https://github.com/mgopsill/TestURLProtocol.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.3
Building package at path:  $PWD
https://github.com/mgopsill/TestURLProtocol.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1
wasm-6.3-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:d69f4e7582c319245442d62a08b2d7c7fd5a0c0c69f5d2ef11d1530cd8d3329b
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-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: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: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: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: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: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: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.3 wasm