The Swift Package Index logo.Swift Package Index

Build Information

Failed to build TestURLProtocol, reference 0.1.0 (979863), with Swift 6.1 for Wasm on 28 May 2025 12:34:49 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
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:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/mgopsill/TestURLProtocol.git
https://github.com/mgopsill/TestURLProtocol.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "TestURLProtocol",
  "name" : "TestURLProtocol",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "TestURLProtocol",
      "targets" : [
        "TestURLProtocol"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "TestURLProtocolTests",
      "module_type" : "SwiftTarget",
      "name" : "TestURLProtocolTests",
      "path" : "Tests/TestURLProtocolTests",
      "sources" : [
        "TestURLProtocolTests.swift"
      ],
      "target_dependencies" : [
        "TestURLProtocol"
      ],
      "type" : "test"
    },
    {
      "c99name" : "TestURLProtocol",
      "module_type" : "SwiftTarget",
      "name" : "TestURLProtocol",
      "path" : "Sources/TestURLProtocol",
      "product_memberships" : [
        "TestURLProtocol"
      ],
      "sources" : [
        "TestURLProtocol.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.7"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -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
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-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: add '@MainActor' to make static property 'mockResponses' part of global actor 'MainActor'
   |                    `- 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: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: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: add '@MainActor' to make static property 'mockResponses' part of global actor 'MainActor'
   |                    `- 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: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 | 	}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[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
 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
[3/3] 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.1 wasm