The Swift Package Index logo.Swift Package Index

Build Information

Failed to build TestCommons, reference 0.4.2 (342059), with Swift 6.2 for Wasm on 24 Oct 2026 03:54:57 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 5.1.3
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/maniramezan/SwiftTestCommons.git
Reference: 0.4.2
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/maniramezan/SwiftTestCommons
 * tag               0.4.2      -> FETCH_HEAD
HEAD is now at 3420590 Merge pull request #13 from maniramezan/fix/dependabot-automation
Cloned https://github.com/maniramezan/SwiftTestCommons.git
Revision (git rev-parse @):
3420590635e3c3bf869116679177051406d3b3a8
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/maniramezan/SwiftTestCommons.git at 0.4.2
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.2
Building package at path:  $PWD
https://github.com/maniramezan/SwiftTestCommons.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-53886770-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1
wasm-6.2-latest: Pulling from saguaro1/spi-images
Digest: sha256:c2cc4df169d3c45015ced899e997f329be5fc90bdbfce388bd8981e1ea44d639
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.2-latest
Building for debugging...
[0/4] Write sources
[3/4] Write swift-version-24593BA9C3E375BF.txt
[5/33] Compiling TestCommonsUI HostedView.swift
[6/33] Emitting module TestCommonsUI
[7/33] Compiling TestCommonsUI StableFrameObservation.swift
[8/33] Compiling TestCommonsUI RenderableView.swift
[9/33] Compiling TestCommonsUI ViewRendering.swift
[11/34] Compiling TestCommons ReadingOrder.swift
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:19:51: error: @escaping attribute only applies to function types
17 |     init(capacity: Int) { routes = Array(repeating: nil, count: capacity) }
18 |
19 |     mutating func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                   `- error: @escaping attribute only applies to function types
20 |         guard let slot = routes.firstIndex(where: { $0 == nil }) else {
21 |             return nil
[12/34] Compiling TestCommons RouteTable.swift
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:19:51: error: @escaping attribute only applies to function types
17 |     init(capacity: Int) { routes = Array(repeating: nil, count: capacity) }
18 |
19 |     mutating func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                   `- error: @escaping attribute only applies to function types
20 |         guard let slot = routes.firstIndex(where: { $0 == nil }) else {
21 |             return nil
[13/34] Compiling TestCommons ScriptedResponder.swift
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:19:51: error: @escaping attribute only applies to function types
17 |     init(capacity: Int) { routes = Array(repeating: nil, count: capacity) }
18 |
19 |     mutating func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                   `- error: @escaping attribute only applies to function types
20 |         guard let slot = routes.firstIndex(where: { $0 == nil }) else {
21 |             return nil
[14/34] Compiling TestCommons StubbedURLSession.swift
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:53:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |
 52 |     /// The session to inject into the code under test.
 53 |     public let session: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:55:42: error: cannot find type 'URLRequest' in scope
 53 |     public let session: URLSession
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
    |                                          `- error: cannot find type 'URLRequest' in scope
 56 |
 57 |     private final class SessionDelegate: NSObject, URLSessionDelegate {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:57:52: error: cannot find type 'URLSessionDelegate' in scope
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
 56 |
 57 |     private final class SessionDelegate: NSObject, URLSessionDelegate {
    |                                                    `- error: cannot find type 'URLSessionDelegate' in scope
 58 |         private let slot: Int
 59 |         private let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:66:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 64 |         }
 65 |
 66 |         func urlSession(_ session: URLSession, didBecomeInvalidWithError error: (any Error)?) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 67 |             StubURLProtocol.release(slot, owner: owner)
 68 |         }
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:81:39: error: cannot find type 'URLRequest' in scope
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
    |                                       `- error: cannot find type 'URLRequest' in scope
 82 |     ) throws {
 83 |         let recorded = recorded
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:80:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                        `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
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/TestCommons/StubbedURLSession.swift:80:51: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                                                   `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:80:51: error: value of type '_' expected to be instance of class or class-constrained type
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:120:27: error: cannot find type 'URLRequest' in scope
118 |
119 |     /// The requests received so far in arrival order.
120 |     public var requests: [URLRequest] { recorded.get() }
    |                           `- error: cannot find type 'URLRequest' in scope
121 |
122 |     /// Cancels outstanding tasks and stops routing requests to the handler.
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:53:16: error: stored property 'session' of 'Sendable'-conforming class 'StubbedURLSession' has non-Sendable type 'URLSession' (aka 'AnyObject')
 51 |
 52 |     /// The session to inject into the code under test.
 53 |     public let session: URLSession
    |                `- error: stored property 'session' of 'Sendable'-conforming class 'StubbedURLSession' has non-Sendable type 'URLSession' (aka 'AnyObject')
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:34:49: error: @escaping attribute only applies to function types
32 |     class var slot: Int { -1 }
33 |
34 |     static func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                 `- error: @escaping attribute only applies to function types
35 |         routes.withLock { $0.acquire(owner: owner, handler) }
36 |     }
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:91:44: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
 89 |             throw PoolExhausted()
 90 |         }
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
    |                                            `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:91:84: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 89 |             throw PoolExhausted()
 90 |         }
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
    |                                                                                    `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:93:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
    |                   `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 94 |             configuration: configuration,
 95 |             delegate: SessionDelegate(slot: slot, owner: owner), delegateQueue: nil)
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:95:81: error: 'nil' requires a contextual type
 93 |         session = URLSession(
 94 |             configuration: configuration,
 95 |             delegate: SessionDelegate(slot: slot, owner: owner), delegateQueue: nil)
    |                                                                                 `- error: 'nil' requires a contextual type
 96 |     }
 97 |
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:106:23: error: trailing closure passed to parameter of type '[StubResponse]' that does not accept a closure
102 |     ///     requests with `URLError(.resourceUnavailable)`.
103 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
104 |     public convenience init(responses: [StubResponse], fallback: StubResponse? = nil) throws {
    |                        `- note: 'init(responses:fallback:)' declared here
105 |         let remaining = TestValueBox(responses[...])
106 |         try self.init { _ in
    |                       `- error: trailing closure passed to parameter of type '[StubResponse]' that does not accept a closure
107 |             if let next = remaining.withValue({ $0.popFirst() }) {
108 |                 return next
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:127:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
125 |     /// The route becomes reusable after session invalidation finishes.
126 |     public func invalidate() {
127 |         session.invalidateAndCancel()
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
128 |     }
129 | }
/host/spi-builder-workspace/Sources/TestCommons/TemporaryDirectory.swift:50:44: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
48 |         }
49 |         try FileManager.default.createDirectory(at: file.deletingLastPathComponent(), withIntermediateDirectories: true)
50 |         try data.write(to: file, options: .atomic)
   |                                            `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
51 |         return file
52 |     }
FoundationEssentials.Data.WritingOptions.atomic:4:23: note: 'atomic' has been explicitly marked unavailable here
2 |   struct WritingOptions {
3 | @available(*, unavailable, message: "atomic writing is unavailable in WASI because temporary files are not supported")
4 |     public static let atomic: Data.WritingOptions  }
  |                       `- note: 'atomic' has been explicitly marked unavailable here
5 | }
6 |
[15/34] Compiling TestCommons TemporaryDirectory.swift
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:53:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |
 52 |     /// The session to inject into the code under test.
 53 |     public let session: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:55:42: error: cannot find type 'URLRequest' in scope
 53 |     public let session: URLSession
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
    |                                          `- error: cannot find type 'URLRequest' in scope
 56 |
 57 |     private final class SessionDelegate: NSObject, URLSessionDelegate {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:57:52: error: cannot find type 'URLSessionDelegate' in scope
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
 56 |
 57 |     private final class SessionDelegate: NSObject, URLSessionDelegate {
    |                                                    `- error: cannot find type 'URLSessionDelegate' in scope
 58 |         private let slot: Int
 59 |         private let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:66:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 64 |         }
 65 |
 66 |         func urlSession(_ session: URLSession, didBecomeInvalidWithError error: (any Error)?) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 67 |             StubURLProtocol.release(slot, owner: owner)
 68 |         }
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:81:39: error: cannot find type 'URLRequest' in scope
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
    |                                       `- error: cannot find type 'URLRequest' in scope
 82 |     ) throws {
 83 |         let recorded = recorded
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:80:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                        `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
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/TestCommons/StubbedURLSession.swift:80:51: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                                                   `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:80:51: error: value of type '_' expected to be instance of class or class-constrained type
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:120:27: error: cannot find type 'URLRequest' in scope
118 |
119 |     /// The requests received so far in arrival order.
120 |     public var requests: [URLRequest] { recorded.get() }
    |                           `- error: cannot find type 'URLRequest' in scope
121 |
122 |     /// Cancels outstanding tasks and stops routing requests to the handler.
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:53:16: error: stored property 'session' of 'Sendable'-conforming class 'StubbedURLSession' has non-Sendable type 'URLSession' (aka 'AnyObject')
 51 |
 52 |     /// The session to inject into the code under test.
 53 |     public let session: URLSession
    |                `- error: stored property 'session' of 'Sendable'-conforming class 'StubbedURLSession' has non-Sendable type 'URLSession' (aka 'AnyObject')
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:34:49: error: @escaping attribute only applies to function types
32 |     class var slot: Int { -1 }
33 |
34 |     static func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                 `- error: @escaping attribute only applies to function types
35 |         routes.withLock { $0.acquire(owner: owner, handler) }
36 |     }
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:91:44: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
 89 |             throw PoolExhausted()
 90 |         }
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
    |                                            `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:91:84: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 89 |             throw PoolExhausted()
 90 |         }
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
    |                                                                                    `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:93:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
    |                   `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 94 |             configuration: configuration,
 95 |             delegate: SessionDelegate(slot: slot, owner: owner), delegateQueue: nil)
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:95:81: error: 'nil' requires a contextual type
 93 |         session = URLSession(
 94 |             configuration: configuration,
 95 |             delegate: SessionDelegate(slot: slot, owner: owner), delegateQueue: nil)
    |                                                                                 `- error: 'nil' requires a contextual type
 96 |     }
 97 |
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:106:23: error: trailing closure passed to parameter of type '[StubResponse]' that does not accept a closure
102 |     ///     requests with `URLError(.resourceUnavailable)`.
103 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
104 |     public convenience init(responses: [StubResponse], fallback: StubResponse? = nil) throws {
    |                        `- note: 'init(responses:fallback:)' declared here
105 |         let remaining = TestValueBox(responses[...])
106 |         try self.init { _ in
    |                       `- error: trailing closure passed to parameter of type '[StubResponse]' that does not accept a closure
107 |             if let next = remaining.withValue({ $0.popFirst() }) {
108 |                 return next
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:127:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
125 |     /// The route becomes reusable after session invalidation finishes.
126 |     public func invalidate() {
127 |         session.invalidateAndCancel()
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
128 |     }
129 | }
/host/spi-builder-workspace/Sources/TestCommons/TemporaryDirectory.swift:50:44: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
48 |         }
49 |         try FileManager.default.createDirectory(at: file.deletingLastPathComponent(), withIntermediateDirectories: true)
50 |         try data.write(to: file, options: .atomic)
   |                                            `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
51 |         return file
52 |     }
FoundationEssentials.Data.WritingOptions.atomic:4:23: note: 'atomic' has been explicitly marked unavailable here
2 |   struct WritingOptions {
3 | @available(*, unavailable, message: "atomic writing is unavailable in WASI because temporary files are not supported")
4 |     public static let atomic: Data.WritingOptions  }
  |                       `- note: 'atomic' has been explicitly marked unavailable here
5 | }
6 |
[16/34] Compiling TestCommons TemporaryUserDefaults.swift
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:53:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |
 52 |     /// The session to inject into the code under test.
 53 |     public let session: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:55:42: error: cannot find type 'URLRequest' in scope
 53 |     public let session: URLSession
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
    |                                          `- error: cannot find type 'URLRequest' in scope
 56 |
 57 |     private final class SessionDelegate: NSObject, URLSessionDelegate {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:57:52: error: cannot find type 'URLSessionDelegate' in scope
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
 56 |
 57 |     private final class SessionDelegate: NSObject, URLSessionDelegate {
    |                                                    `- error: cannot find type 'URLSessionDelegate' in scope
 58 |         private let slot: Int
 59 |         private let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:66:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 64 |         }
 65 |
 66 |         func urlSession(_ session: URLSession, didBecomeInvalidWithError error: (any Error)?) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 67 |             StubURLProtocol.release(slot, owner: owner)
 68 |         }
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:81:39: error: cannot find type 'URLRequest' in scope
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
    |                                       `- error: cannot find type 'URLRequest' in scope
 82 |     ) throws {
 83 |         let recorded = recorded
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:80:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                        `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
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/TestCommons/StubbedURLSession.swift:80:51: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                                                   `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:80:51: error: value of type '_' expected to be instance of class or class-constrained type
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:120:27: error: cannot find type 'URLRequest' in scope
118 |
119 |     /// The requests received so far in arrival order.
120 |     public var requests: [URLRequest] { recorded.get() }
    |                           `- error: cannot find type 'URLRequest' in scope
121 |
122 |     /// Cancels outstanding tasks and stops routing requests to the handler.
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:53:16: error: stored property 'session' of 'Sendable'-conforming class 'StubbedURLSession' has non-Sendable type 'URLSession' (aka 'AnyObject')
 51 |
 52 |     /// The session to inject into the code under test.
 53 |     public let session: URLSession
    |                `- error: stored property 'session' of 'Sendable'-conforming class 'StubbedURLSession' has non-Sendable type 'URLSession' (aka 'AnyObject')
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:34:49: error: @escaping attribute only applies to function types
32 |     class var slot: Int { -1 }
33 |
34 |     static func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                 `- error: @escaping attribute only applies to function types
35 |         routes.withLock { $0.acquire(owner: owner, handler) }
36 |     }
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:91:44: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
 89 |             throw PoolExhausted()
 90 |         }
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
    |                                            `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'copy'
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:91:84: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 89 |             throw PoolExhausted()
 90 |         }
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
    |                                                                                    `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:93:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 91 |         let configuration = (configuration.copy() as? URLSessionConfiguration) ?? .ephemeral
 92 |         configuration.protocolClasses = [StubURLProtocol.pool[slot]]
 93 |         session = URLSession(
    |                   `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 94 |             configuration: configuration,
 95 |             delegate: SessionDelegate(slot: slot, owner: owner), delegateQueue: nil)
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:95:81: error: 'nil' requires a contextual type
 93 |         session = URLSession(
 94 |             configuration: configuration,
 95 |             delegate: SessionDelegate(slot: slot, owner: owner), delegateQueue: nil)
    |                                                                                 `- error: 'nil' requires a contextual type
 96 |     }
 97 |
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:106:23: error: trailing closure passed to parameter of type '[StubResponse]' that does not accept a closure
102 |     ///     requests with `URLError(.resourceUnavailable)`.
103 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
104 |     public convenience init(responses: [StubResponse], fallback: StubResponse? = nil) throws {
    |                        `- note: 'init(responses:fallback:)' declared here
105 |         let remaining = TestValueBox(responses[...])
106 |         try self.init { _ in
    |                       `- error: trailing closure passed to parameter of type '[StubResponse]' that does not accept a closure
107 |             if let next = remaining.withValue({ $0.popFirst() }) {
108 |                 return next
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:127:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
125 |     /// The route becomes reusable after session invalidation finishes.
126 |     public func invalidate() {
127 |         session.invalidateAndCancel()
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
128 |     }
129 | }
/host/spi-builder-workspace/Sources/TestCommons/TemporaryDirectory.swift:50:44: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
48 |         }
49 |         try FileManager.default.createDirectory(at: file.deletingLastPathComponent(), withIntermediateDirectories: true)
50 |         try data.write(to: file, options: .atomic)
   |                                            `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
51 |         return file
52 |     }
FoundationEssentials.Data.WritingOptions.atomic:4:23: note: 'atomic' has been explicitly marked unavailable here
2 |   struct WritingOptions {
3 | @available(*, unavailable, message: "atomic writing is unavailable in WASI because temporary files are not supported")
4 |     public static let atomic: Data.WritingOptions  }
  |                       `- note: 'atomic' has been explicitly marked unavailable here
5 | }
6 |
[17/37] Compiling TestCommons ScriptedValues.swift
[18/37] Compiling TestCommons SnapshotReferenceDirectory.swift
[19/37] Compiling TestCommons StreamObservation.swift
[20/37] Compiling TestCommons StubResponse.swift
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:34:49: error: @escaping attribute only applies to function types
32 |     class var slot: Int { -1 }
33 |
34 |     static func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                 `- error: @escaping attribute only applies to function types
35 |         routes.withLock { $0.acquire(owner: owner, handler) }
36 |     }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:46:47: error: cannot find type 'URLRequest' in scope
44 |     }
45 |
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
   |                                               `- error: cannot find type 'URLRequest' in scope
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:48:70: error: cannot find type 'URLRequest' in scope
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
   |                                                                      `- error: cannot find type 'URLRequest' in scope
49 |
50 |     override func startLoading() {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:48:55: error: cannot find type 'URLRequest' in scope
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
   |                                                       `- error: cannot find type 'URLRequest' in scope
49 |
50 |     override func startLoading() {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:50:19: error: method does not override any method from its superclass
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
49 |
50 |     override func startLoading() {
   |                   `- error: method does not override any method from its superclass
51 |         guard let handler = Self.handler(for: type(of: self).slot) else {
52 |             client?.urlProtocol(self, didFailWithError: URLError(.unsupportedURL))
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:75:19: error: method does not override any method from its superclass
73 |     }
74 |
75 |     override func stopLoading() {}
   |                   `- error: method does not override any method from its superclass
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:77:54: error: cannot find type 'URLRequest' in scope
75 |     override func stopLoading() {}
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
   |                                                      `- error: cannot find type 'URLRequest' in scope
78 |         var copy = request
79 |         if copy.httpBody == nil, let stream = copy.httpBodyStream {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:77:39: error: cannot find type 'URLRequest' in scope
75 |     override func stopLoading() {}
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
   |                                       `- error: cannot find type 'URLRequest' in scope
78 |         var copy = request
79 |         if copy.httpBody == nil, let stream = copy.httpBodyStream {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:10:24: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 | // FoundationNetworking gives custom protocols neither the session's headers nor its task,
 9 | // so each live stub owns a distinct protocol class; the class identifies the route.
10 | class StubURLProtocol: URLProtocol {
   |                        `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |     typealias Handler = RouteTable.Handler
12 |     static let pool: [StubURLProtocol.Type] = [
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/TestCommons/RouteTable.swift:19:51: error: @escaping attribute only applies to function types
17 |     init(capacity: Int) { routes = Array(repeating: nil, count: capacity) }
18 |
19 |     mutating func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                   `- error: @escaping attribute only applies to function types
20 |         guard let slot = routes.firstIndex(where: { $0 == nil }) else {
21 |             return nil
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:52:13: error: cannot find 'client' in scope
50 |     override func startLoading() {
51 |         guard let handler = Self.handler(for: type(of: self).slot) else {
52 |             client?.urlProtocol(self, didFailWithError: URLError(.unsupportedURL))
   |             `- error: cannot find 'client' in scope
53 |             return
54 |         }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:56:52: error: cannot find 'request' in scope
54 |         }
55 |         do {
56 |             let stub = try handler(Self.recordable(request))
   |                                                    `- error: cannot find 'request' in scope
57 |             guard
58 |                 let url = request.url,
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:58:27: error: cannot find 'request' in scope
56 |             let stub = try handler(Self.recordable(request))
57 |             guard
58 |                 let url = request.url,
   |                           `- error: cannot find 'request' in scope
59 |                 let response = HTTPURLResponse(
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:59:32: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
57 |             guard
58 |                 let url = request.url,
59 |                 let response = HTTPURLResponse(
   |                                `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
61 |             else {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:62:17: error: cannot find 'client' in scope
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
61 |             else {
62 |                 client?.urlProtocol(self, didFailWithError: URLError(.badServerResponse))
   |                 `- error: cannot find 'client' in scope
63 |                 return
64 |             }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:65:13: error: cannot find 'client' in scope
63 |                 return
64 |             }
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
   |             `- error: cannot find 'client' in scope
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:65:82: error: cannot infer contextual base in reference to member 'notAllowed'
63 |                 return
64 |             }
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
   |                                                                                  `- error: cannot infer contextual base in reference to member 'notAllowed'
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:67:17: error: cannot find 'client' in scope
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
   |                 `- error: cannot find 'client' in scope
68 |             }
69 |             client?.urlProtocolDidFinishLoading(self)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:69:13: error: cannot find 'client' in scope
67 |                 client?.urlProtocol(self, didLoad: stub.body)
68 |             }
69 |             client?.urlProtocolDidFinishLoading(self)
   |             `- error: cannot find 'client' in scope
70 |         } catch {
71 |             client?.urlProtocol(self, didFailWithError: error)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:71:13: error: cannot find 'client' in scope
69 |             client?.urlProtocolDidFinishLoading(self)
70 |         } catch {
71 |             client?.urlProtocol(self, didFailWithError: error)
   |             `- error: cannot find 'client' in scope
72 |         }
73 |     }
[21/37] Compiling TestCommons StubURLProtocol.swift
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:34:49: error: @escaping attribute only applies to function types
32 |     class var slot: Int { -1 }
33 |
34 |     static func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                 `- error: @escaping attribute only applies to function types
35 |         routes.withLock { $0.acquire(owner: owner, handler) }
36 |     }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:46:47: error: cannot find type 'URLRequest' in scope
44 |     }
45 |
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
   |                                               `- error: cannot find type 'URLRequest' in scope
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:48:70: error: cannot find type 'URLRequest' in scope
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
   |                                                                      `- error: cannot find type 'URLRequest' in scope
49 |
50 |     override func startLoading() {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:48:55: error: cannot find type 'URLRequest' in scope
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
   |                                                       `- error: cannot find type 'URLRequest' in scope
49 |
50 |     override func startLoading() {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:50:19: error: method does not override any method from its superclass
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
49 |
50 |     override func startLoading() {
   |                   `- error: method does not override any method from its superclass
51 |         guard let handler = Self.handler(for: type(of: self).slot) else {
52 |             client?.urlProtocol(self, didFailWithError: URLError(.unsupportedURL))
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:75:19: error: method does not override any method from its superclass
73 |     }
74 |
75 |     override func stopLoading() {}
   |                   `- error: method does not override any method from its superclass
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:77:54: error: cannot find type 'URLRequest' in scope
75 |     override func stopLoading() {}
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
   |                                                      `- error: cannot find type 'URLRequest' in scope
78 |         var copy = request
79 |         if copy.httpBody == nil, let stream = copy.httpBodyStream {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:77:39: error: cannot find type 'URLRequest' in scope
75 |     override func stopLoading() {}
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
   |                                       `- error: cannot find type 'URLRequest' in scope
78 |         var copy = request
79 |         if copy.httpBody == nil, let stream = copy.httpBodyStream {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:10:24: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 | // FoundationNetworking gives custom protocols neither the session's headers nor its task,
 9 | // so each live stub owns a distinct protocol class; the class identifies the route.
10 | class StubURLProtocol: URLProtocol {
   |                        `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |     typealias Handler = RouteTable.Handler
12 |     static let pool: [StubURLProtocol.Type] = [
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/TestCommons/RouteTable.swift:19:51: error: @escaping attribute only applies to function types
17 |     init(capacity: Int) { routes = Array(repeating: nil, count: capacity) }
18 |
19 |     mutating func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                   `- error: @escaping attribute only applies to function types
20 |         guard let slot = routes.firstIndex(where: { $0 == nil }) else {
21 |             return nil
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:52:13: error: cannot find 'client' in scope
50 |     override func startLoading() {
51 |         guard let handler = Self.handler(for: type(of: self).slot) else {
52 |             client?.urlProtocol(self, didFailWithError: URLError(.unsupportedURL))
   |             `- error: cannot find 'client' in scope
53 |             return
54 |         }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:56:52: error: cannot find 'request' in scope
54 |         }
55 |         do {
56 |             let stub = try handler(Self.recordable(request))
   |                                                    `- error: cannot find 'request' in scope
57 |             guard
58 |                 let url = request.url,
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:58:27: error: cannot find 'request' in scope
56 |             let stub = try handler(Self.recordable(request))
57 |             guard
58 |                 let url = request.url,
   |                           `- error: cannot find 'request' in scope
59 |                 let response = HTTPURLResponse(
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:59:32: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
57 |             guard
58 |                 let url = request.url,
59 |                 let response = HTTPURLResponse(
   |                                `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
61 |             else {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:62:17: error: cannot find 'client' in scope
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
61 |             else {
62 |                 client?.urlProtocol(self, didFailWithError: URLError(.badServerResponse))
   |                 `- error: cannot find 'client' in scope
63 |                 return
64 |             }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:65:13: error: cannot find 'client' in scope
63 |                 return
64 |             }
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
   |             `- error: cannot find 'client' in scope
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:65:82: error: cannot infer contextual base in reference to member 'notAllowed'
63 |                 return
64 |             }
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
   |                                                                                  `- error: cannot infer contextual base in reference to member 'notAllowed'
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:67:17: error: cannot find 'client' in scope
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
   |                 `- error: cannot find 'client' in scope
68 |             }
69 |             client?.urlProtocolDidFinishLoading(self)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:69:13: error: cannot find 'client' in scope
67 |                 client?.urlProtocol(self, didLoad: stub.body)
68 |             }
69 |             client?.urlProtocolDidFinishLoading(self)
   |             `- error: cannot find 'client' in scope
70 |         } catch {
71 |             client?.urlProtocol(self, didFailWithError: error)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:71:13: error: cannot find 'client' in scope
69 |             client?.urlProtocolDidFinishLoading(self)
70 |         } catch {
71 |             client?.urlProtocol(self, didFailWithError: error)
   |             `- error: cannot find 'client' in scope
72 |         }
73 |     }
[22/37] Compiling TestCommons StubURLProtocolPool.swift
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:34:49: error: @escaping attribute only applies to function types
32 |     class var slot: Int { -1 }
33 |
34 |     static func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                 `- error: @escaping attribute only applies to function types
35 |         routes.withLock { $0.acquire(owner: owner, handler) }
36 |     }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:46:47: error: cannot find type 'URLRequest' in scope
44 |     }
45 |
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
   |                                               `- error: cannot find type 'URLRequest' in scope
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:48:70: error: cannot find type 'URLRequest' in scope
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
   |                                                                      `- error: cannot find type 'URLRequest' in scope
49 |
50 |     override func startLoading() {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:48:55: error: cannot find type 'URLRequest' in scope
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
   |                                                       `- error: cannot find type 'URLRequest' in scope
49 |
50 |     override func startLoading() {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:50:19: error: method does not override any method from its superclass
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
49 |
50 |     override func startLoading() {
   |                   `- error: method does not override any method from its superclass
51 |         guard let handler = Self.handler(for: type(of: self).slot) else {
52 |             client?.urlProtocol(self, didFailWithError: URLError(.unsupportedURL))
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:75:19: error: method does not override any method from its superclass
73 |     }
74 |
75 |     override func stopLoading() {}
   |                   `- error: method does not override any method from its superclass
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:77:54: error: cannot find type 'URLRequest' in scope
75 |     override func stopLoading() {}
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
   |                                                      `- error: cannot find type 'URLRequest' in scope
78 |         var copy = request
79 |         if copy.httpBody == nil, let stream = copy.httpBodyStream {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:77:39: error: cannot find type 'URLRequest' in scope
75 |     override func stopLoading() {}
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
   |                                       `- error: cannot find type 'URLRequest' in scope
78 |         var copy = request
79 |         if copy.httpBody == nil, let stream = copy.httpBodyStream {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:10:24: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 | // FoundationNetworking gives custom protocols neither the session's headers nor its task,
 9 | // so each live stub owns a distinct protocol class; the class identifies the route.
10 | class StubURLProtocol: URLProtocol {
   |                        `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |     typealias Handler = RouteTable.Handler
12 |     static let pool: [StubURLProtocol.Type] = [
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/TestCommons/RouteTable.swift:19:51: error: @escaping attribute only applies to function types
17 |     init(capacity: Int) { routes = Array(repeating: nil, count: capacity) }
18 |
19 |     mutating func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                   `- error: @escaping attribute only applies to function types
20 |         guard let slot = routes.firstIndex(where: { $0 == nil }) else {
21 |             return nil
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:52:13: error: cannot find 'client' in scope
50 |     override func startLoading() {
51 |         guard let handler = Self.handler(for: type(of: self).slot) else {
52 |             client?.urlProtocol(self, didFailWithError: URLError(.unsupportedURL))
   |             `- error: cannot find 'client' in scope
53 |             return
54 |         }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:56:52: error: cannot find 'request' in scope
54 |         }
55 |         do {
56 |             let stub = try handler(Self.recordable(request))
   |                                                    `- error: cannot find 'request' in scope
57 |             guard
58 |                 let url = request.url,
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:58:27: error: cannot find 'request' in scope
56 |             let stub = try handler(Self.recordable(request))
57 |             guard
58 |                 let url = request.url,
   |                           `- error: cannot find 'request' in scope
59 |                 let response = HTTPURLResponse(
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:59:32: error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
57 |             guard
58 |                 let url = request.url,
59 |                 let response = HTTPURLResponse(
   |                                `- error: 'HTTPURLResponse' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
61 |             else {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:62:17: error: cannot find 'client' in scope
60 |                     url: url, statusCode: stub.statusCode, httpVersion: "HTTP/1.1", headerFields: stub.headers)
61 |             else {
62 |                 client?.urlProtocol(self, didFailWithError: URLError(.badServerResponse))
   |                 `- error: cannot find 'client' in scope
63 |                 return
64 |             }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:65:13: error: cannot find 'client' in scope
63 |                 return
64 |             }
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
   |             `- error: cannot find 'client' in scope
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:65:82: error: cannot infer contextual base in reference to member 'notAllowed'
63 |                 return
64 |             }
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
   |                                                                                  `- error: cannot infer contextual base in reference to member 'notAllowed'
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:67:17: error: cannot find 'client' in scope
65 |             client?.urlProtocol(self, didReceive: response, cacheStoragePolicy: .notAllowed)
66 |             if !stub.body.isEmpty {
67 |                 client?.urlProtocol(self, didLoad: stub.body)
   |                 `- error: cannot find 'client' in scope
68 |             }
69 |             client?.urlProtocolDidFinishLoading(self)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:69:13: error: cannot find 'client' in scope
67 |                 client?.urlProtocol(self, didLoad: stub.body)
68 |             }
69 |             client?.urlProtocolDidFinishLoading(self)
   |             `- error: cannot find 'client' in scope
70 |         } catch {
71 |             client?.urlProtocol(self, didFailWithError: error)
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:71:13: error: cannot find 'client' in scope
69 |             client?.urlProtocolDidFinishLoading(self)
70 |         } catch {
71 |             client?.urlProtocol(self, didFailWithError: error)
   |             `- error: cannot find 'client' in scope
72 |         }
73 |     }
[23/37] Compiling TestCommons AsyncGate.swift
[24/37] Compiling TestCommons CallRecorder.swift
[25/37] Compiling TestCommons ContainedFileURL.swift
[26/37] Compiling TestCommons FixtureDirectory.swift
[27/37] Compiling TestCommons TestError.swift
[28/37] Compiling TestCommons TestValueBox.swift
[29/37] Compiling TestCommons WaitUntil.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[30/37] Compiling TestCommons ObservationTimeout.swift
[31/37] Compiling TestCommons ObserveStream.swift
[32/37] Compiling TestCommons ReadingDirection.swift
[33/37] Compiling TestCommons FixtureEnvironment.swift
[34/37] Compiling TestCommons FrameGeometry.swift
[35/37] Compiling TestCommons JSONRoundTrip.swift
[36/37] Compiling TestCommons ManualClock.swift
[37/37] Emitting module TestCommons
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:9:36: error: cannot find type 'URLRequest' in scope
 7 | /// Slot bookkeeping for stubbed sessions, kept separate from the global pool for testing.
 8 | struct RouteTable {
 9 |     typealias Handler = @Sendable (URLRequest) throws -> StubResponse
   |                                    `- error: cannot find type 'URLRequest' in scope
10 |     private struct Route {
11 |         let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/RouteTable.swift:19:51: error: @escaping attribute only applies to function types
17 |     init(capacity: Int) { routes = Array(repeating: nil, count: capacity) }
18 |
19 |     mutating func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                   `- error: @escaping attribute only applies to function types
20 |         guard let slot = routes.firstIndex(where: { $0 == nil }) else {
21 |             return nil
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:34:49: error: @escaping attribute only applies to function types
32 |     class var slot: Int { -1 }
33 |
34 |     static func acquire(owner: UUID, _ handler: @escaping Handler) -> Int? {
   |                                                 `- error: @escaping attribute only applies to function types
35 |         routes.withLock { $0.acquire(owner: owner, handler) }
36 |     }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:46:47: error: cannot find type 'URLRequest' in scope
44 |     }
45 |
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
   |                                               `- error: cannot find type 'URLRequest' in scope
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:48:70: error: cannot find type 'URLRequest' in scope
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
   |                                                                      `- error: cannot find type 'URLRequest' in scope
49 |
50 |     override func startLoading() {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:48:55: error: cannot find type 'URLRequest' in scope
46 |     override class func canInit(with request: URLRequest) -> Bool { true }
47 |
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
   |                                                       `- error: cannot find type 'URLRequest' in scope
49 |
50 |     override func startLoading() {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:50:19: error: method does not override any method from its superclass
48 |     override class func canonicalRequest(for request: URLRequest) -> URLRequest { request }
49 |
50 |     override func startLoading() {
   |                   `- error: method does not override any method from its superclass
51 |         guard let handler = Self.handler(for: type(of: self).slot) else {
52 |             client?.urlProtocol(self, didFailWithError: URLError(.unsupportedURL))
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:75:19: error: method does not override any method from its superclass
73 |     }
74 |
75 |     override func stopLoading() {}
   |                   `- error: method does not override any method from its superclass
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:77:54: error: cannot find type 'URLRequest' in scope
75 |     override func stopLoading() {}
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
   |                                                      `- error: cannot find type 'URLRequest' in scope
78 |         var copy = request
79 |         if copy.httpBody == nil, let stream = copy.httpBodyStream {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:77:39: error: cannot find type 'URLRequest' in scope
75 |     override func stopLoading() {}
76 |
77 |     static func recordable(_ request: URLRequest) -> URLRequest {
   |                                       `- error: cannot find type 'URLRequest' in scope
78 |         var copy = request
79 |         if copy.httpBody == nil, let stream = copy.httpBodyStream {
/host/spi-builder-workspace/Sources/TestCommons/StubURLProtocol.swift:10:24: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 8 | // FoundationNetworking gives custom protocols neither the session's headers nor its task,
 9 | // so each live stub owns a distinct protocol class; the class identifies the route.
10 | class StubURLProtocol: URLProtocol {
   |                        `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |     typealias Handler = RouteTable.Handler
12 |     static let pool: [StubURLProtocol.Type] = [
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/TestCommons/StubbedURLSession.swift:53:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |
 52 |     /// The session to inject into the code under test.
 53 |     public let session: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:55:42: error: cannot find type 'URLRequest' in scope
 53 |     public let session: URLSession
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
    |                                          `- error: cannot find type 'URLRequest' in scope
 56 |
 57 |     private final class SessionDelegate: NSObject, URLSessionDelegate {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:57:52: error: cannot find type 'URLSessionDelegate' in scope
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
 56 |
 57 |     private final class SessionDelegate: NSObject, URLSessionDelegate {
    |                                                    `- error: cannot find type 'URLSessionDelegate' in scope
 58 |         private let slot: Int
 59 |         private let owner: UUID
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:66:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 64 |         }
 65 |
 66 |         func urlSession(_ session: URLSession, didBecomeInvalidWithError error: (any Error)?) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 67 |             StubURLProtocol.release(slot, owner: owner)
 68 |         }
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:81:39: error: cannot find type 'URLRequest' in scope
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
    |                                       `- error: cannot find type 'URLRequest' in scope
 82 |     ) throws {
 83 |         let recorded = recorded
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:80:24: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                        `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
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/TestCommons/StubbedURLSession.swift:80:51: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                                                   `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:80:51: error: value of type '_' expected to be instance of class or class-constrained type
 78 |     /// - Throws: ``PoolExhausted`` when too many stubbed sessions are alive.
 79 |     public init(
 80 |         configuration: URLSessionConfiguration = .ephemeral,
    |                                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 81 |         handler: @escaping @Sendable (URLRequest) throws -> StubResponse
 82 |     ) throws {
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:120:27: error: cannot find type 'URLRequest' in scope
118 |
119 |     /// The requests received so far in arrival order.
120 |     public var requests: [URLRequest] { recorded.get() }
    |                           `- error: cannot find type 'URLRequest' in scope
121 |
122 |     /// Cancels outstanding tasks and stops routing requests to the handler.
/host/spi-builder-workspace/Sources/TestCommons/StubbedURLSession.swift:53:16: error: stored property 'session' of 'Sendable'-conforming class 'StubbedURLSession' has non-Sendable type 'URLSession' (aka 'AnyObject')
 51 |
 52 |     /// The session to inject into the code under test.
 53 |     public let session: URLSession
    |                `- error: stored property 'session' of 'Sendable'-conforming class 'StubbedURLSession' has non-Sendable type 'URLSession' (aka 'AnyObject')
 54 |     private let owner = UUID()
 55 |     private let recorded = TestValueBox<[URLRequest]>([])
BUILD FAILURE 6.2 wasm