Build Information
Failed to build NetworkSpyKit, reference 1.1.0 (6ece9d), with Swift 6.2 for Android on 29 Oct 2025 18:52:04 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:android-6.2-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/angu-software/NetworkSpyKit.git
Reference: 1.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/angu-software/NetworkSpyKit
* tag 1.1.0 -> FETCH_HEAD
HEAD is now at 6ece9d1 Add convenient StubbedResponses containing some standard responses like 200 OK or 404 NOT FOUND as well as responses that contain JSON payload
Cloned https://github.com/angu-software/NetworkSpyKit.git
Revision (git rev-parse @):
6ece9d1c252ce6ea96f75ee6fc1e2713ee42c0d9
SUCCESS checkout https://github.com/angu-software/NetworkSpyKit.git at 1.1.0
========================================
Build
========================================
Selected platform: android
Swift version: 6.2
Building package at path: $PWD
https://github.com/angu-software/NetworkSpyKit.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:android-6.2-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1
android-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:d70d83f328e9f1ae04a4e17e63e2d335ae10639f90ee796a5fe3bfb139eab948
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--11D90AFD9DD3AB2.txt
[3/19] Compiling NetworkSpyKit NetworkSpyKit.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:12:11: error: cannot find type 'URLRequest' in scope
10 | public typealias Request = URLRequest
11 |
12 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
13 |
14 | public init(url: URL,
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/URLRequest+ResolveHTTPBodyStream.swift:10:11: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Returns the resolved HTTP body data of the request.
[4/19] Compiling NetworkSpyKit Request.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:12:11: error: cannot find type 'URLRequest' in scope
10 | public typealias Request = URLRequest
11 |
12 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
13 |
14 | public init(url: URL,
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/URLRequest+ResolveHTTPBodyStream.swift:10:11: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Returns the resolved HTTP body data of the request.
[5/19] Compiling NetworkSpyKit URLRequest+ResolveHTTPBodyStream.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:12:11: error: cannot find type 'URLRequest' in scope
10 | public typealias Request = URLRequest
11 |
12 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
13 |
14 | public init(url: URL,
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/URLRequest+ResolveHTTPBodyStream.swift:10:11: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Returns the resolved HTTP body data of the request.
[6/21] Compiling NetworkSpyKit StubbedResponse+2xx.swift
[7/21] Compiling NetworkSpyKit StubbedResponse+4xx.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/21] Emitting module NetworkSpyKit
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:19:40: error: cannot find type 'URLRequest' in scope
17 | var spyRegistry: SpyRegistry = .shared
18 |
19 | private func response(for request: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: cannot find type 'URLRequest' in scope
20 | let spy = try spy(for: request)
21 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:19:73: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | var spyRegistry: SpyRegistry = .shared
18 |
19 | private func response(for request: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | let spy = try spy(for: request)
21 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:28:35: error: cannot find type 'URLRequest' in scope
26 | }
27 |
28 | private func spy(for request: URLRequest) throws -> NetworkSpy {
| `- error: cannot find type 'URLRequest' in scope
29 | guard let spy = spyRegistry.spy(for: request) else {
30 | throw Error.spyNotFoundForRequest
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:36:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | }
35 |
36 | private func respond(with response: (response: HTTPURLResponse, data: Data?)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | respond(with: response.response)
38 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:49:41: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
47 | }
48 |
49 | private func respond(with response: HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
50 | client?.urlProtocol(self,
51 | didReceive: response,
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:65:47: error: cannot find type 'URLRequest' in scope
63 | // MARK: - URLProtocol
64 |
65 | override class func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
66 | true
67 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:69:70: error: cannot find type 'URLRequest' in scope
67 | }
68 |
69 | override class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
70 | return request
71 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:69:55: error: cannot find type 'URLRequest' in scope
67 | }
68 |
69 | override class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
70 | return request
71 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:73:19: error: method does not override any method from its superclass
71 | }
72 |
73 | override func startLoading() {
| `- error: method does not override any method from its superclass
74 | do {
75 | respond(with: try response(for: request))
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:83:19: error: method does not override any method from its superclass
81 | }
82 |
83 | override func stopLoading() {
| `- error: method does not override any method from its superclass
84 | // No-op
85 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:10:37: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
8 | import Foundation
9 |
10 | final class InterceptorURLProtocol: URLProtocol {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |
12 | enum Error: Swift.Error {
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/NetworkSpyKit/InterceptorURLProtocol.swift:89:11: error: cannot find type 'URLRequest' in scope
87 |
88 |
89 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
90 |
91 | fileprivate func removedSpyIDHeader() -> Self {
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:14:35: error: cannot find type 'URLRequest' in scope
12 | typealias Error = InterceptorURLProtocol.Error
13 |
14 | func response(for urlRequest: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: cannot find type 'URLRequest' in scope
15 | guard urlRequest.url != nil else {
16 | throw Error.invalidRequestURLMissing
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:14:68: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | typealias Error = InterceptorURLProtocol.Error
13 |
14 | func response(for urlRequest: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | guard urlRequest.url != nil else {
16 | throw Error.invalidRequestURLMissing
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:26:93: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | }
25 |
26 | private func makeHTTPURLResponse(requestURL: URL?, stubbedResponse: StubbedResponse) -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | guard let requestURL,
28 | let httpResponse = HTTPURLResponse(url: requestURL,
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:34:38: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | /// augmented with the required interceptor and identification headers.
33 | /// Use this to construct a `URLSession` that is intercepted by the spy.
34 | public let sessionConfiguration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// The currently assigned response provider.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:69:47: error: @escaping attribute only applies to function types
67 | /// - responseProvider: A closure that returns a stubbed response for intercepted requests. Defaults to `.teaPot`.
68 | public convenience init(sessionConfiguration: URLSessionConfiguration,
69 | responseProvider: @escaping ResponseProvider = defaultResponse) {
| `- error: @escaping attribute only applies to function types
70 | self.init(sessionConfiguration: sessionConfiguration,
71 | responseProvider: responseProvider,
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:68:51: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | /// - sessionConfiguration: A template configuration. It will be copied and modified.
67 | /// - responseProvider: A closure that returns a stubbed response for intercepted requests. Defaults to `.teaPot`.
68 | public convenience init(sessionConfiguration: URLSessionConfiguration,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 | responseProvider: @escaping ResponseProvider = defaultResponse) {
70 | self.init(sessionConfiguration: sessionConfiguration,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:76:28: error: @escaping attribute only applies to function types
74 |
75 | init(sessionConfiguration: URLSessionConfiguration,
76 | responseProvider: @escaping ResponseProvider = defaultResponse,
| `- error: @escaping attribute only applies to function types
77 | spyRegistry: SpyRegistry) {
78 | self.sessionConfiguration = Self.copyConfiguration(sessionConfiguration)
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:75:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | }
74 |
75 | init(sessionConfiguration: URLSessionConfiguration,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | responseProvider: @escaping ResponseProvider = defaultResponse,
77 | spyRegistry: SpyRegistry) {
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:90:28: error: cannot find type 'URLRequest' in scope
88 | }
89 |
90 | func record(_ request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
91 | requestRecorder.record(request)
92 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:94:60: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | return configuration.copy() as! URLSessionConfiguration
96 | }
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:94:88: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | return configuration.copy() as! URLSessionConfiguration
96 | }
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:34:16: error: stored property 'sessionConfiguration' of 'Sendable'-conforming class 'NetworkSpy' has non-Sendable type 'URLSessionConfiguration' (aka 'AnyObject')
32 | /// augmented with the required interceptor and identification headers.
33 | /// Use this to construct a `URLSession` that is intercepted by the spy.
34 | public let sessionConfiguration: URLSessionConfiguration
| `- error: stored property 'sessionConfiguration' of 'Sendable'-conforming class 'NetworkSpy' has non-Sendable type 'URLSessionConfiguration' (aka 'AnyObject')
35 |
36 | /// The currently assigned response provider.
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:12:11: error: cannot find type 'URLRequest' in scope
10 | public typealias Request = URLRequest
11 |
12 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
13 |
14 | public init(url: URL,
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/URLRequest+ResolveHTTPBodyStream.swift:10:11: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | /// Returns the resolved HTTP body data of the request.
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:12:27: error: cannot find type 'URLRequest' in scope
10 | extension SpyRegistry {
11 |
12 | func spy(for request: URLRequest) -> NetworkSpy? {
| `- error: cannot find type 'URLRequest' in scope
13 | guard let sypId = spyId(for: request) else {
14 | return nil
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:20:37: error: cannot find type 'URLRequest' in scope
18 | }
19 |
20 | private func spyId(for request: URLRequest) -> String? {
| `- error: cannot find type 'URLRequest' in scope
21 | return request.allHTTPHeaderFields?[NetworkSpy.headerKey]
22 | }
[9/21] Compiling NetworkSpyKit InterceptorURLProtocol.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:19:40: error: cannot find type 'URLRequest' in scope
17 | var spyRegistry: SpyRegistry = .shared
18 |
19 | private func response(for request: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: cannot find type 'URLRequest' in scope
20 | let spy = try spy(for: request)
21 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:19:73: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | var spyRegistry: SpyRegistry = .shared
18 |
19 | private func response(for request: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | let spy = try spy(for: request)
21 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:28:35: error: cannot find type 'URLRequest' in scope
26 | }
27 |
28 | private func spy(for request: URLRequest) throws -> NetworkSpy {
| `- error: cannot find type 'URLRequest' in scope
29 | guard let spy = spyRegistry.spy(for: request) else {
30 | throw Error.spyNotFoundForRequest
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:36:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | }
35 |
36 | private func respond(with response: (response: HTTPURLResponse, data: Data?)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | respond(with: response.response)
38 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:49:41: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
47 | }
48 |
49 | private func respond(with response: HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
50 | client?.urlProtocol(self,
51 | didReceive: response,
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:65:47: error: cannot find type 'URLRequest' in scope
63 | // MARK: - URLProtocol
64 |
65 | override class func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
66 | true
67 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:69:70: error: cannot find type 'URLRequest' in scope
67 | }
68 |
69 | override class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
70 | return request
71 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:69:55: error: cannot find type 'URLRequest' in scope
67 | }
68 |
69 | override class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
70 | return request
71 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:73:19: error: method does not override any method from its superclass
71 | }
72 |
73 | override func startLoading() {
| `- error: method does not override any method from its superclass
74 | do {
75 | respond(with: try response(for: request))
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:83:19: error: method does not override any method from its superclass
81 | }
82 |
83 | override func stopLoading() {
| `- error: method does not override any method from its superclass
84 | // No-op
85 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:10:37: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
8 | import Foundation
9 |
10 | final class InterceptorURLProtocol: URLProtocol {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |
12 | enum Error: Swift.Error {
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/NetworkSpyKit/InterceptorURLProtocol.swift:89:11: error: cannot find type 'URLRequest' in scope
87 |
88 |
89 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
90 |
91 | fileprivate func removedSpyIDHeader() -> Self {
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:12:27: error: cannot find type 'URLRequest' in scope
10 | extension SpyRegistry {
11 |
12 | func spy(for request: URLRequest) -> NetworkSpy? {
| `- error: cannot find type 'URLRequest' in scope
13 | guard let sypId = spyId(for: request) else {
14 | return nil
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:29:40: error: incorrect argument label in call (have 'for:', expected 'byId:')
27 |
28 | private func spy(for request: URLRequest) throws -> NetworkSpy {
29 | guard let spy = spyRegistry.spy(for: request) else {
| `- error: incorrect argument label in call (have 'for:', expected 'byId:')
30 | throw Error.spyNotFoundForRequest
31 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:45:9: error: cannot find 'client' in scope
43 |
44 | private func respond(with responseData: Data) {
45 | client?.urlProtocol(self,
| `- error: cannot find 'client' in scope
46 | didLoad: responseData)
47 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:50:9: error: cannot find 'client' in scope
48 |
49 | private func respond(with response: HTTPURLResponse) {
50 | client?.urlProtocol(self,
| `- error: cannot find 'client' in scope
51 | didReceive: response,
52 | cacheStoragePolicy: .notAllowed)
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:52:50: error: cannot infer contextual base in reference to member 'notAllowed'
50 | client?.urlProtocol(self,
51 | didReceive: response,
52 | cacheStoragePolicy: .notAllowed)
| `- error: cannot infer contextual base in reference to member 'notAllowed'
53 | }
54 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:56:9: error: cannot find 'client' in scope
54 |
55 | private func respond(with error: any Swift.Error) {
56 | client?.urlProtocol(self, didFailWithError: error)
| `- error: cannot find 'client' in scope
57 | }
58 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:60:9: error: cannot find 'client' in scope
58 |
59 | private func finishLoading() {
60 | client?.urlProtocolDidFinishLoading(self)
| `- error: cannot find 'client' in scope
61 | }
62 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:75:45: error: cannot find 'request' in scope
73 | override func startLoading() {
74 | do {
75 | respond(with: try response(for: request))
| `- error: cannot find 'request' in scope
76 | } catch {
77 | respond(with: error)
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:14:35: error: cannot find type 'URLRequest' in scope
12 | typealias Error = InterceptorURLProtocol.Error
13 |
14 | func response(for urlRequest: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: cannot find type 'URLRequest' in scope
15 | guard urlRequest.url != nil else {
16 | throw Error.invalidRequestURLMissing
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:14:68: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | typealias Error = InterceptorURLProtocol.Error
13 |
14 | func response(for urlRequest: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | guard urlRequest.url != nil else {
16 | throw Error.invalidRequestURLMissing
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:26:93: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | }
25 |
26 | private func makeHTTPURLResponse(requestURL: URL?, stubbedResponse: StubbedResponse) -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | guard let requestURL,
28 | let httpResponse = HTTPURLResponse(url: requestURL,
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:28:34: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | private func makeHTTPURLResponse(requestURL: URL?, stubbedResponse: StubbedResponse) -> HTTPURLResponse {
27 | guard let requestURL,
28 | let httpResponse = HTTPURLResponse(url: requestURL,
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | statusCode: stubbedResponse.statusCode,
30 | httpVersion: nil,
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:30:63: error: 'nil' requires a contextual type
28 | let httpResponse = HTTPURLResponse(url: requestURL,
29 | statusCode: stubbedResponse.statusCode,
30 | httpVersion: nil,
| `- error: 'nil' requires a contextual type
31 | headerFields: stubbedResponse.headers) else {
32 | // We expect HTTPURLResponse.init to actually never fail.
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:34:38: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | /// augmented with the required interceptor and identification headers.
33 | /// Use this to construct a `URLSession` that is intercepted by the spy.
34 | public let sessionConfiguration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// The currently assigned response provider.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:69:47: error: @escaping attribute only applies to function types
67 | /// - responseProvider: A closure that returns a stubbed response for intercepted requests. Defaults to `.teaPot`.
68 | public convenience init(sessionConfiguration: URLSessionConfiguration,
69 | responseProvider: @escaping ResponseProvider = defaultResponse) {
| `- error: @escaping attribute only applies to function types
70 | self.init(sessionConfiguration: sessionConfiguration,
71 | responseProvider: responseProvider,
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:68:51: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | /// - sessionConfiguration: A template configuration. It will be copied and modified.
67 | /// - responseProvider: A closure that returns a stubbed response for intercepted requests. Defaults to `.teaPot`.
68 | public convenience init(sessionConfiguration: URLSessionConfiguration,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 | responseProvider: @escaping ResponseProvider = defaultResponse) {
70 | self.init(sessionConfiguration: sessionConfiguration,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:76:28: error: @escaping attribute only applies to function types
74 |
75 | init(sessionConfiguration: URLSessionConfiguration,
76 | responseProvider: @escaping ResponseProvider = defaultResponse,
| `- error: @escaping attribute only applies to function types
77 | spyRegistry: SpyRegistry) {
78 | self.sessionConfiguration = Self.copyConfiguration(sessionConfiguration)
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:75:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | }
74 |
75 | init(sessionConfiguration: URLSessionConfiguration,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | responseProvider: @escaping ResponseProvider = defaultResponse,
77 | spyRegistry: SpyRegistry) {
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:90:28: error: cannot find type 'URLRequest' in scope
88 | }
89 |
90 | func record(_ request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
91 | requestRecorder.record(request)
92 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:94:60: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | return configuration.copy() as! URLSessionConfiguration
96 | }
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:94:88: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | return configuration.copy() as! URLSessionConfiguration
96 | }
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:34:16: error: stored property 'sessionConfiguration' of 'Sendable'-conforming class 'NetworkSpy' has non-Sendable type 'URLSessionConfiguration' (aka 'AnyObject')
32 | /// augmented with the required interceptor and identification headers.
33 | /// Use this to construct a `URLSession` that is intercepted by the spy.
34 | public let sessionConfiguration: URLSessionConfiguration
| `- error: stored property 'sessionConfiguration' of 'Sendable'-conforming class 'NetworkSpy' has non-Sendable type 'URLSessionConfiguration' (aka 'AnyObject')
35 |
36 | /// The currently assigned response provider.
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:72:33: error: cannot infer contextual base in reference to member 'shared'
70 | self.init(sessionConfiguration: sessionConfiguration,
71 | responseProvider: responseProvider,
72 | spyRegistry: .shared)
| `- error: cannot infer contextual base in reference to member 'shared'
73 | }
74 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:95:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
95 | return configuration.copy() as! URLSessionConfiguration
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
96 | }
97 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:113:51: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
111 |
112 | private func bindConfigurationToSpy() {
113 | var sessionHeaders = sessionConfiguration.httpAdditionalHeaders ?? [:]
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
114 | sessionHeaders[Self.headerKey] = id
115 | sessionConfiguration.httpAdditionalHeaders = sessionHeaders
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:115:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
113 | var sessionHeaders = sessionConfiguration.httpAdditionalHeaders ?? [:]
114 | sessionHeaders[Self.headerKey] = id
115 | sessionConfiguration.httpAdditionalHeaders = sessionHeaders
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
116 | }
117 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:119:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
117 |
118 | private func installInterceptorOnConfiguration() {
119 | sessionConfiguration.protocolClasses = [InterceptorURLProtocol.self]
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
120 | }
121 | }
[10/21] Compiling NetworkSpyKit NetworkSpy+HTTPURLResponse.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:19:40: error: cannot find type 'URLRequest' in scope
17 | var spyRegistry: SpyRegistry = .shared
18 |
19 | private func response(for request: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: cannot find type 'URLRequest' in scope
20 | let spy = try spy(for: request)
21 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:19:73: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | var spyRegistry: SpyRegistry = .shared
18 |
19 | private func response(for request: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | let spy = try spy(for: request)
21 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:28:35: error: cannot find type 'URLRequest' in scope
26 | }
27 |
28 | private func spy(for request: URLRequest) throws -> NetworkSpy {
| `- error: cannot find type 'URLRequest' in scope
29 | guard let spy = spyRegistry.spy(for: request) else {
30 | throw Error.spyNotFoundForRequest
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:36:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | }
35 |
36 | private func respond(with response: (response: HTTPURLResponse, data: Data?)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | respond(with: response.response)
38 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:49:41: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
47 | }
48 |
49 | private func respond(with response: HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
50 | client?.urlProtocol(self,
51 | didReceive: response,
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:65:47: error: cannot find type 'URLRequest' in scope
63 | // MARK: - URLProtocol
64 |
65 | override class func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
66 | true
67 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:69:70: error: cannot find type 'URLRequest' in scope
67 | }
68 |
69 | override class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
70 | return request
71 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:69:55: error: cannot find type 'URLRequest' in scope
67 | }
68 |
69 | override class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
70 | return request
71 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:73:19: error: method does not override any method from its superclass
71 | }
72 |
73 | override func startLoading() {
| `- error: method does not override any method from its superclass
74 | do {
75 | respond(with: try response(for: request))
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:83:19: error: method does not override any method from its superclass
81 | }
82 |
83 | override func stopLoading() {
| `- error: method does not override any method from its superclass
84 | // No-op
85 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:10:37: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
8 | import Foundation
9 |
10 | final class InterceptorURLProtocol: URLProtocol {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |
12 | enum Error: Swift.Error {
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/NetworkSpyKit/InterceptorURLProtocol.swift:89:11: error: cannot find type 'URLRequest' in scope
87 |
88 |
89 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
90 |
91 | fileprivate func removedSpyIDHeader() -> Self {
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:12:27: error: cannot find type 'URLRequest' in scope
10 | extension SpyRegistry {
11 |
12 | func spy(for request: URLRequest) -> NetworkSpy? {
| `- error: cannot find type 'URLRequest' in scope
13 | guard let sypId = spyId(for: request) else {
14 | return nil
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:29:40: error: incorrect argument label in call (have 'for:', expected 'byId:')
27 |
28 | private func spy(for request: URLRequest) throws -> NetworkSpy {
29 | guard let spy = spyRegistry.spy(for: request) else {
| `- error: incorrect argument label in call (have 'for:', expected 'byId:')
30 | throw Error.spyNotFoundForRequest
31 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:45:9: error: cannot find 'client' in scope
43 |
44 | private func respond(with responseData: Data) {
45 | client?.urlProtocol(self,
| `- error: cannot find 'client' in scope
46 | didLoad: responseData)
47 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:50:9: error: cannot find 'client' in scope
48 |
49 | private func respond(with response: HTTPURLResponse) {
50 | client?.urlProtocol(self,
| `- error: cannot find 'client' in scope
51 | didReceive: response,
52 | cacheStoragePolicy: .notAllowed)
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:52:50: error: cannot infer contextual base in reference to member 'notAllowed'
50 | client?.urlProtocol(self,
51 | didReceive: response,
52 | cacheStoragePolicy: .notAllowed)
| `- error: cannot infer contextual base in reference to member 'notAllowed'
53 | }
54 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:56:9: error: cannot find 'client' in scope
54 |
55 | private func respond(with error: any Swift.Error) {
56 | client?.urlProtocol(self, didFailWithError: error)
| `- error: cannot find 'client' in scope
57 | }
58 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:60:9: error: cannot find 'client' in scope
58 |
59 | private func finishLoading() {
60 | client?.urlProtocolDidFinishLoading(self)
| `- error: cannot find 'client' in scope
61 | }
62 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:75:45: error: cannot find 'request' in scope
73 | override func startLoading() {
74 | do {
75 | respond(with: try response(for: request))
| `- error: cannot find 'request' in scope
76 | } catch {
77 | respond(with: error)
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:14:35: error: cannot find type 'URLRequest' in scope
12 | typealias Error = InterceptorURLProtocol.Error
13 |
14 | func response(for urlRequest: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: cannot find type 'URLRequest' in scope
15 | guard urlRequest.url != nil else {
16 | throw Error.invalidRequestURLMissing
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:14:68: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | typealias Error = InterceptorURLProtocol.Error
13 |
14 | func response(for urlRequest: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | guard urlRequest.url != nil else {
16 | throw Error.invalidRequestURLMissing
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:26:93: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | }
25 |
26 | private func makeHTTPURLResponse(requestURL: URL?, stubbedResponse: StubbedResponse) -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | guard let requestURL,
28 | let httpResponse = HTTPURLResponse(url: requestURL,
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:28:34: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | private func makeHTTPURLResponse(requestURL: URL?, stubbedResponse: StubbedResponse) -> HTTPURLResponse {
27 | guard let requestURL,
28 | let httpResponse = HTTPURLResponse(url: requestURL,
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | statusCode: stubbedResponse.statusCode,
30 | httpVersion: nil,
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:30:63: error: 'nil' requires a contextual type
28 | let httpResponse = HTTPURLResponse(url: requestURL,
29 | statusCode: stubbedResponse.statusCode,
30 | httpVersion: nil,
| `- error: 'nil' requires a contextual type
31 | headerFields: stubbedResponse.headers) else {
32 | // We expect HTTPURLResponse.init to actually never fail.
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:34:38: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | /// augmented with the required interceptor and identification headers.
33 | /// Use this to construct a `URLSession` that is intercepted by the spy.
34 | public let sessionConfiguration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// The currently assigned response provider.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:69:47: error: @escaping attribute only applies to function types
67 | /// - responseProvider: A closure that returns a stubbed response for intercepted requests. Defaults to `.teaPot`.
68 | public convenience init(sessionConfiguration: URLSessionConfiguration,
69 | responseProvider: @escaping ResponseProvider = defaultResponse) {
| `- error: @escaping attribute only applies to function types
70 | self.init(sessionConfiguration: sessionConfiguration,
71 | responseProvider: responseProvider,
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:68:51: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | /// - sessionConfiguration: A template configuration. It will be copied and modified.
67 | /// - responseProvider: A closure that returns a stubbed response for intercepted requests. Defaults to `.teaPot`.
68 | public convenience init(sessionConfiguration: URLSessionConfiguration,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 | responseProvider: @escaping ResponseProvider = defaultResponse) {
70 | self.init(sessionConfiguration: sessionConfiguration,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:76:28: error: @escaping attribute only applies to function types
74 |
75 | init(sessionConfiguration: URLSessionConfiguration,
76 | responseProvider: @escaping ResponseProvider = defaultResponse,
| `- error: @escaping attribute only applies to function types
77 | spyRegistry: SpyRegistry) {
78 | self.sessionConfiguration = Self.copyConfiguration(sessionConfiguration)
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:75:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | }
74 |
75 | init(sessionConfiguration: URLSessionConfiguration,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | responseProvider: @escaping ResponseProvider = defaultResponse,
77 | spyRegistry: SpyRegistry) {
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:90:28: error: cannot find type 'URLRequest' in scope
88 | }
89 |
90 | func record(_ request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
91 | requestRecorder.record(request)
92 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:94:60: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | return configuration.copy() as! URLSessionConfiguration
96 | }
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:94:88: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | return configuration.copy() as! URLSessionConfiguration
96 | }
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:34:16: error: stored property 'sessionConfiguration' of 'Sendable'-conforming class 'NetworkSpy' has non-Sendable type 'URLSessionConfiguration' (aka 'AnyObject')
32 | /// augmented with the required interceptor and identification headers.
33 | /// Use this to construct a `URLSession` that is intercepted by the spy.
34 | public let sessionConfiguration: URLSessionConfiguration
| `- error: stored property 'sessionConfiguration' of 'Sendable'-conforming class 'NetworkSpy' has non-Sendable type 'URLSessionConfiguration' (aka 'AnyObject')
35 |
36 | /// The currently assigned response provider.
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:72:33: error: cannot infer contextual base in reference to member 'shared'
70 | self.init(sessionConfiguration: sessionConfiguration,
71 | responseProvider: responseProvider,
72 | spyRegistry: .shared)
| `- error: cannot infer contextual base in reference to member 'shared'
73 | }
74 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:95:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
95 | return configuration.copy() as! URLSessionConfiguration
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
96 | }
97 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:113:51: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
111 |
112 | private func bindConfigurationToSpy() {
113 | var sessionHeaders = sessionConfiguration.httpAdditionalHeaders ?? [:]
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
114 | sessionHeaders[Self.headerKey] = id
115 | sessionConfiguration.httpAdditionalHeaders = sessionHeaders
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:115:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
113 | var sessionHeaders = sessionConfiguration.httpAdditionalHeaders ?? [:]
114 | sessionHeaders[Self.headerKey] = id
115 | sessionConfiguration.httpAdditionalHeaders = sessionHeaders
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
116 | }
117 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:119:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
117 |
118 | private func installInterceptorOnConfiguration() {
119 | sessionConfiguration.protocolClasses = [InterceptorURLProtocol.self]
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
120 | }
121 | }
[11/21] Compiling NetworkSpyKit NetworkSpy.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:19:40: error: cannot find type 'URLRequest' in scope
17 | var spyRegistry: SpyRegistry = .shared
18 |
19 | private func response(for request: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: cannot find type 'URLRequest' in scope
20 | let spy = try spy(for: request)
21 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:19:73: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | var spyRegistry: SpyRegistry = .shared
18 |
19 | private func response(for request: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | let spy = try spy(for: request)
21 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:28:35: error: cannot find type 'URLRequest' in scope
26 | }
27 |
28 | private func spy(for request: URLRequest) throws -> NetworkSpy {
| `- error: cannot find type 'URLRequest' in scope
29 | guard let spy = spyRegistry.spy(for: request) else {
30 | throw Error.spyNotFoundForRequest
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:36:52: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | }
35 |
36 | private func respond(with response: (response: HTTPURLResponse, data: Data?)) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | respond(with: response.response)
38 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:49:41: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
47 | }
48 |
49 | private func respond(with response: HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
50 | client?.urlProtocol(self,
51 | didReceive: response,
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:65:47: error: cannot find type 'URLRequest' in scope
63 | // MARK: - URLProtocol
64 |
65 | override class func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
66 | true
67 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:69:70: error: cannot find type 'URLRequest' in scope
67 | }
68 |
69 | override class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
70 | return request
71 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:69:55: error: cannot find type 'URLRequest' in scope
67 | }
68 |
69 | override class func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
70 | return request
71 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:73:19: error: method does not override any method from its superclass
71 | }
72 |
73 | override func startLoading() {
| `- error: method does not override any method from its superclass
74 | do {
75 | respond(with: try response(for: request))
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:83:19: error: method does not override any method from its superclass
81 | }
82 |
83 | override func stopLoading() {
| `- error: method does not override any method from its superclass
84 | // No-op
85 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:10:37: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
8 | import Foundation
9 |
10 | final class InterceptorURLProtocol: URLProtocol {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |
12 | enum Error: Swift.Error {
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/NetworkSpyKit/InterceptorURLProtocol.swift:89:11: error: cannot find type 'URLRequest' in scope
87 |
88 |
89 | extension URLRequest {
| `- error: cannot find type 'URLRequest' in scope
90 |
91 | fileprivate func removedSpyIDHeader() -> Self {
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:12:27: error: cannot find type 'URLRequest' in scope
10 | extension SpyRegistry {
11 |
12 | func spy(for request: URLRequest) -> NetworkSpy? {
| `- error: cannot find type 'URLRequest' in scope
13 | guard let sypId = spyId(for: request) else {
14 | return nil
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:29:40: error: incorrect argument label in call (have 'for:', expected 'byId:')
27 |
28 | private func spy(for request: URLRequest) throws -> NetworkSpy {
29 | guard let spy = spyRegistry.spy(for: request) else {
| `- error: incorrect argument label in call (have 'for:', expected 'byId:')
30 | throw Error.spyNotFoundForRequest
31 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:45:9: error: cannot find 'client' in scope
43 |
44 | private func respond(with responseData: Data) {
45 | client?.urlProtocol(self,
| `- error: cannot find 'client' in scope
46 | didLoad: responseData)
47 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:50:9: error: cannot find 'client' in scope
48 |
49 | private func respond(with response: HTTPURLResponse) {
50 | client?.urlProtocol(self,
| `- error: cannot find 'client' in scope
51 | didReceive: response,
52 | cacheStoragePolicy: .notAllowed)
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:52:50: error: cannot infer contextual base in reference to member 'notAllowed'
50 | client?.urlProtocol(self,
51 | didReceive: response,
52 | cacheStoragePolicy: .notAllowed)
| `- error: cannot infer contextual base in reference to member 'notAllowed'
53 | }
54 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:56:9: error: cannot find 'client' in scope
54 |
55 | private func respond(with error: any Swift.Error) {
56 | client?.urlProtocol(self, didFailWithError: error)
| `- error: cannot find 'client' in scope
57 | }
58 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:60:9: error: cannot find 'client' in scope
58 |
59 | private func finishLoading() {
60 | client?.urlProtocolDidFinishLoading(self)
| `- error: cannot find 'client' in scope
61 | }
62 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/InterceptorURLProtocol.swift:75:45: error: cannot find 'request' in scope
73 | override func startLoading() {
74 | do {
75 | respond(with: try response(for: request))
| `- error: cannot find 'request' in scope
76 | } catch {
77 | respond(with: error)
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:14:35: error: cannot find type 'URLRequest' in scope
12 | typealias Error = InterceptorURLProtocol.Error
13 |
14 | func response(for urlRequest: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: cannot find type 'URLRequest' in scope
15 | guard urlRequest.url != nil else {
16 | throw Error.invalidRequestURLMissing
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:14:68: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | typealias Error = InterceptorURLProtocol.Error
13 |
14 | func response(for urlRequest: URLRequest) throws -> (response: HTTPURLResponse, data: Data?) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | guard urlRequest.url != nil else {
16 | throw Error.invalidRequestURLMissing
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:26:93: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | }
25 |
26 | private func makeHTTPURLResponse(requestURL: URL?, stubbedResponse: StubbedResponse) -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | guard let requestURL,
28 | let httpResponse = HTTPURLResponse(url: requestURL,
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:28:34: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
26 | private func makeHTTPURLResponse(requestURL: URL?, stubbedResponse: StubbedResponse) -> HTTPURLResponse {
27 | guard let requestURL,
28 | let httpResponse = HTTPURLResponse(url: requestURL,
| `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
29 | statusCode: stubbedResponse.statusCode,
30 | httpVersion: nil,
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy+HTTPURLResponse.swift:30:63: error: 'nil' requires a contextual type
28 | let httpResponse = HTTPURLResponse(url: requestURL,
29 | statusCode: stubbedResponse.statusCode,
30 | httpVersion: nil,
| `- error: 'nil' requires a contextual type
31 | headerFields: stubbedResponse.headers) else {
32 | // We expect HTTPURLResponse.init to actually never fail.
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:34:38: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
32 | /// augmented with the required interceptor and identification headers.
33 | /// Use this to construct a `URLSession` that is intercepted by the spy.
34 | public let sessionConfiguration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | /// The currently assigned response provider.
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:69:47: error: @escaping attribute only applies to function types
67 | /// - responseProvider: A closure that returns a stubbed response for intercepted requests. Defaults to `.teaPot`.
68 | public convenience init(sessionConfiguration: URLSessionConfiguration,
69 | responseProvider: @escaping ResponseProvider = defaultResponse) {
| `- error: @escaping attribute only applies to function types
70 | self.init(sessionConfiguration: sessionConfiguration,
71 | responseProvider: responseProvider,
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:68:51: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
66 | /// - sessionConfiguration: A template configuration. It will be copied and modified.
67 | /// - responseProvider: A closure that returns a stubbed response for intercepted requests. Defaults to `.teaPot`.
68 | public convenience init(sessionConfiguration: URLSessionConfiguration,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
69 | responseProvider: @escaping ResponseProvider = defaultResponse) {
70 | self.init(sessionConfiguration: sessionConfiguration,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:76:28: error: @escaping attribute only applies to function types
74 |
75 | init(sessionConfiguration: URLSessionConfiguration,
76 | responseProvider: @escaping ResponseProvider = defaultResponse,
| `- error: @escaping attribute only applies to function types
77 | spyRegistry: SpyRegistry) {
78 | self.sessionConfiguration = Self.copyConfiguration(sessionConfiguration)
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:75:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
73 | }
74 |
75 | init(sessionConfiguration: URLSessionConfiguration,
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
76 | responseProvider: @escaping ResponseProvider = defaultResponse,
77 | spyRegistry: SpyRegistry) {
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:90:28: error: cannot find type 'URLRequest' in scope
88 | }
89 |
90 | func record(_ request: URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
91 | requestRecorder.record(request)
92 | }
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:94:60: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | return configuration.copy() as! URLSessionConfiguration
96 | }
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:94:88: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 | }
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | return configuration.copy() as! URLSessionConfiguration
96 | }
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:34:16: error: stored property 'sessionConfiguration' of 'Sendable'-conforming class 'NetworkSpy' has non-Sendable type 'URLSessionConfiguration' (aka 'AnyObject')
32 | /// augmented with the required interceptor and identification headers.
33 | /// Use this to construct a `URLSession` that is intercepted by the spy.
34 | public let sessionConfiguration: URLSessionConfiguration
| `- error: stored property 'sessionConfiguration' of 'Sendable'-conforming class 'NetworkSpy' has non-Sendable type 'URLSessionConfiguration' (aka 'AnyObject')
35 |
36 | /// The currently assigned response provider.
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:72:33: error: cannot infer contextual base in reference to member 'shared'
70 | self.init(sessionConfiguration: sessionConfiguration,
71 | responseProvider: responseProvider,
72 | spyRegistry: .shared)
| `- error: cannot infer contextual base in reference to member 'shared'
73 | }
74 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:95:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
93 |
94 | private static func copyConfiguration(_ configuration: URLSessionConfiguration) -> URLSessionConfiguration {
95 | return configuration.copy() as! URLSessionConfiguration
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
96 | }
97 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:113:51: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
111 |
112 | private func bindConfigurationToSpy() {
113 | var sessionHeaders = sessionConfiguration.httpAdditionalHeaders ?? [:]
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
114 | sessionHeaders[Self.headerKey] = id
115 | sessionConfiguration.httpAdditionalHeaders = sessionHeaders
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:115:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
113 | var sessionHeaders = sessionConfiguration.httpAdditionalHeaders ?? [:]
114 | sessionHeaders[Self.headerKey] = id
115 | sessionConfiguration.httpAdditionalHeaders = sessionHeaders
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'httpAdditionalHeaders'
116 | }
117 |
/host/spi-builder-workspace/Sources/NetworkSpyKit/NetworkSpy/NetworkSpy.swift:119:30: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
117 |
118 | private func installInterceptorOnConfiguration() {
119 | sessionConfiguration.protocolClasses = [InterceptorURLProtocol.self]
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
120 | }
121 | }
[12/21] Compiling NetworkSpyKit RequestRecorder.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
[13/21] Compiling NetworkSpyKit StubResponse+JSON.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
[14/21] Compiling NetworkSpyKit StubbedResponse+5xx.swift
[15/21] Compiling NetworkSpyKit Response+TeaPot.swift
[16/21] Compiling NetworkSpyKit SafeValueStore.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:12:27: error: cannot find type 'URLRequest' in scope
10 | extension SpyRegistry {
11 |
12 | func spy(for request: URLRequest) -> NetworkSpy? {
| `- error: cannot find type 'URLRequest' in scope
13 | guard let sypId = spyId(for: request) else {
14 | return nil
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:20:37: error: cannot find type 'URLRequest' in scope
18 | }
19 |
20 | private func spyId(for request: URLRequest) -> String? {
| `- error: cannot find type 'URLRequest' in scope
21 | return request.allHTTPHeaderFields?[NetworkSpy.headerKey]
22 | }
[17/21] Compiling NetworkSpyKit SpyRegistry+URLRequest.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:12:27: error: cannot find type 'URLRequest' in scope
10 | extension SpyRegistry {
11 |
12 | func spy(for request: URLRequest) -> NetworkSpy? {
| `- error: cannot find type 'URLRequest' in scope
13 | guard let sypId = spyId(for: request) else {
14 | return nil
/host/spi-builder-workspace/Sources/NetworkSpyKit/SpyRegistry/SpyRegistry+URLRequest.swift:20:37: error: cannot find type 'URLRequest' in scope
18 | }
19 |
20 | private func spyId(for request: URLRequest) -> String? {
| `- error: cannot find type 'URLRequest' in scope
21 | return request.allHTTPHeaderFields?[NetworkSpy.headerKey]
22 | }
[18/21] Compiling NetworkSpyKit StubbedResponse.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
[19/21] Compiling NetworkSpyKit SafeResponseStore.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
[20/21] Compiling NetworkSpyKit SypRegistry.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
[21/21] Compiling NetworkSpyKit StreamReader.swift
/host/spi-builder-workspace/Sources/NetworkSpyKit/Request/Request.swift:10:28: error: cannot find type 'URLRequest' in scope
8 | import Foundation
9 |
10 | public typealias Request = URLRequest
| `- error: cannot find type 'URLRequest' in scope
11 |
12 | extension URLRequest {
BUILD FAILURE 6.2 android