Build Information
Failed to build Airgap, reference main (9d46a3), with Swift 6.2 for Wasm on 2 Mar 2026 01:35:12 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.2-latest swift build --swift-sdk wasm32-unknown-wasip1 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/garry-jeromson/swift-airgap.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/garry-jeromson/swift-airgap
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 9d46a34 Add concurrency control to CI workflow
Cloned https://github.com/garry-jeromson/swift-airgap.git
Revision (git rev-parse @):
9d46a34b4f97785e62e4b4839837c404b9f5a98d
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/garry-jeromson/swift-airgap.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.2
Building package at path: $PWD
https://github.com/garry-jeromson/swift-airgap.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.2-latest swift build --swift-sdk wasm32-unknown-wasip1 2>&1
wasm-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:c50555b47c4db0b0576f9f25702fbe2fdff28194c4a4f4c23a7dce4b3504c85e
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.2-latest
warning: multiple Swift SDKs match target triple `wasm32-unknown-wasip1` and host triple x86_64-unknown-linux-gnu, selected one at /root/.swiftpm/swift-sdks/swift-6.2-RELEASE_wasm.artifactbundle/swift-6.2-RELEASE_wasm/wasm32-unknown-wasip1/swift-sdk.json
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling Airgap AsyncMutex.swift
[4/10] Compiling Airgap AirgapTestCase.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/10] Emitting module Airgap
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:100:72: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
98 | // ```
99 | #if compiler(>=6.0)
100 | private nonisolated(unsafe) static var _passthroughProtocols: [URLProtocol.Type] = []
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 | #else
102 | private static var _passthroughProtocols: [URLProtocol.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/Airgap/Airgap.swift:104:46: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
102 | private static var _passthroughProtocols: [URLProtocol.Type] = []
103 | #endif
104 | public static var passthroughProtocols: [URLProtocol.Type] {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | get { lock.withLock { _passthroughProtocols } }
106 | set { lock.withLock { _passthroughProtocols = newValue } }
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/Airgap/Airgap.swift:399:110: error: cannot find type 'URLRequest' in scope
397 |
398 | /// Reports a network violation through the configured handler.
399 | static func reportViolation(method: String, url: String, callStack: [String], testName: String, request: URLRequest? = nil) {
| `- error: cannot find type 'URLRequest' in scope
400 | // Always collect violations for programmatic access via violations/violationSummary()
401 | let violation = Violation(
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:514:53: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
512 | }
513 |
514 | private static func injectProtocol(into config: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
515 | var protocols = config.protocolClasses ?? []
516 | if !protocols.contains(where: { $0 == AirgapURLProtocol.self }) {
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/Airgap/Airgap.swift:523:17: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
521 |
522 | private static func interceptWebSocketIfNeeded(
523 | _ task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
524 | url: URL?,
525 | urlString: String) -> Bool {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:561:71: error: cannot find type 'Selector' in scope
559 | }
560 |
561 | private static func swizzleConfigurationProperty(getter original: Selector, label _: String) {
| `- error: cannot find type 'Selector' in scope
562 | guard let method = class_getClassMethod(URLSessionConfiguration.self, original) else {
563 | return
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:562:28: error: cannot find 'class_getClassMethod' in scope
560 |
561 | private static func swizzleConfigurationProperty(getter original: Selector, label _: String) {
562 | guard let method = class_getClassMethod(URLSessionConfiguration.self, original) else {
| `- error: cannot find 'class_getClassMethod' in scope
563 | return
564 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:566:27: error: cannot find 'method_getImplementation' in scope
564 | }
565 |
566 | let originalIMP = method_getImplementation(method)
| `- error: cannot find 'method_getImplementation' in scope
567 |
568 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> URLSessionConfiguration
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:568:65: error: cannot find type 'Selector' in scope
566 | let originalIMP = method_getImplementation(method)
567 |
568 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> URLSessionConfiguration
| `- error: cannot find type 'Selector' in scope
569 |
570 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:570:32: error: generic parameter 'U' could not be inferred
568 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> URLSessionConfiguration
569 |
570 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
| `- error: generic parameter 'U' could not be inferred
571 |
572 | let swizzledBlock: @convention(block) (AnyObject) -> URLSessionConfiguration = { obj in
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
| `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:572:62: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
570 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
571 |
572 | let swizzledBlock: @convention(block) (AnyObject) -> URLSessionConfiguration = { obj in
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
573 | let config = originalFunction(obj, original)
574 | injectProtocol(into: config)
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/Airgap/Airgap.swift:578:27: error: cannot find 'imp_implementationWithBlock' in scope
576 | }
577 |
578 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
| `- error: cannot find 'imp_implementationWithBlock' in scope
579 | method_setImplementation(method, swizzledIMP)
580 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:579:9: error: cannot find 'method_setImplementation' in scope
577 |
578 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
579 | method_setImplementation(method, swizzledIMP)
| `- error: cannot find 'method_setImplementation' in scope
580 | }
581 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:590:24: error: cannot find 'NSSelectorFromString' in scope
588 | /// the property-getter swizzle, the protocol is injected when the session is created.
589 | private static func swizzleSessionInit() {
590 | let selector = NSSelectorFromString("sessionWithConfiguration:delegate:delegateQueue:")
| `- error: cannot find 'NSSelectorFromString' in scope
591 | guard let method = class_getClassMethod(URLSession.self, selector) else {
592 | return
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:591:28: error: cannot find 'class_getClassMethod' in scope
589 | private static func swizzleSessionInit() {
590 | let selector = NSSelectorFromString("sessionWithConfiguration:delegate:delegateQueue:")
591 | guard let method = class_getClassMethod(URLSession.self, selector) else {
| `- error: cannot find 'class_getClassMethod' in scope
592 | return
593 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:595:27: error: cannot find 'method_getImplementation' in scope
593 | }
594 |
595 | let originalIMP = method_getImplementation(method)
| `- error: cannot find 'method_getImplementation' in scope
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:596:65: error: cannot find type 'Selector' in scope
594 |
595 | let originalIMP = method_getImplementation(method)
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
| `- error: cannot find type 'Selector' in scope
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
598 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:596:100: error: cannot find type 'URLSessionDelegate' in scope
594 |
595 | let originalIMP = method_getImplementation(method)
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
| `- error: cannot find type 'URLSessionDelegate' in scope
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
598 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:596:121: error: cannot find type 'OperationQueue' in scope
594 |
595 | let originalIMP = method_getImplementation(method)
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
| `- error: cannot find type 'OperationQueue' in scope
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
598 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:597:32: error: generic parameter 'U' could not be inferred
595 | let originalIMP = method_getImplementation(method)
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
| `- error: generic parameter 'U' could not be inferred
598 |
599 | let swizzledBlock: @convention(block) (
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
| `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:600:49: error: cannot find type 'URLSessionDelegate' in scope
598 |
599 | let swizzledBlock: @convention(block) (
600 | AnyObject, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession = { obj, config, delegate, queue in
| `- error: cannot find type 'URLSessionDelegate' in scope
601 | injectProtocol(into: config)
602 | return originalFunction(obj, selector, config, delegate, queue)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:600:70: error: cannot find type 'OperationQueue' in scope
598 |
599 | let swizzledBlock: @convention(block) (
600 | AnyObject, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession = { obj, config, delegate, queue in
| `- error: cannot find type 'OperationQueue' in scope
601 | injectProtocol(into: config)
602 | return originalFunction(obj, selector, config, delegate, queue)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:605:27: error: cannot find 'imp_implementationWithBlock' in scope
603 | }
604 |
605 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
| `- error: cannot find 'imp_implementationWithBlock' in scope
606 | method_setImplementation(method, swizzledIMP)
607 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:606:9: error: cannot find 'method_setImplementation' in scope
604 |
605 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
606 | method_setImplementation(method, swizzledIMP)
| `- error: cannot find 'method_setImplementation' in scope
607 | }
608 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:614:24: error: '#selector' can only be used with the Objective-C runtime
612 | /// URL loading system internals, not the user's code that initiated the request.
613 | private static func swizzleTaskResume() {
614 | let selector = #selector(URLSessionTask.resume)
| `- error: '#selector' can only be used with the Objective-C runtime
615 | guard let method = class_getInstanceMethod(URLSessionTask.self, selector) else {
616 | return
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:615:28: error: cannot find 'class_getInstanceMethod' in scope
613 | private static func swizzleTaskResume() {
614 | let selector = #selector(URLSessionTask.resume)
615 | guard let method = class_getInstanceMethod(URLSessionTask.self, selector) else {
| `- error: cannot find 'class_getInstanceMethod' in scope
616 | return
617 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:619:27: error: cannot find 'method_getImplementation' in scope
617 | }
618 |
619 | let originalIMP = method_getImplementation(method)
| `- error: cannot find 'method_getImplementation' in scope
620 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> Void
621 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:620:65: error: cannot find type 'Selector' in scope
618 |
619 | let originalIMP = method_getImplementation(method)
620 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> Void
| `- error: cannot find type 'Selector' in scope
621 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
622 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:621:32: error: generic parameter 'U' could not be inferred
619 | let originalIMP = method_getImplementation(method)
620 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> Void
621 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
| `- error: generic parameter 'U' could not be inferred
622 |
623 | let swizzledBlock: @convention(block) (AnyObject) -> Void = { task in
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
| `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:634:54: error: cannot find 'Thread' in scope
632 | // Capture the call stack at the point where resume() is called —
633 | // this is the user's code, not the URL loading system internals.
634 | AirgapURLProtocol.storeCapturedCallStack(Thread.callStackSymbols, request: sessionTask.currentRequest, forURL: urlString)
| `- error: cannot find 'Thread' in scope
635 |
636 | // WebSocket tasks (URLSessionWebSocketTask) and ws:///wss:// schemes are not
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:624:42: warning: conditional cast from 'AnyObject' to 'URLSessionTask' (aka 'AnyObject') always succeeds
622 |
623 | let swizzledBlock: @convention(block) (AnyObject) -> Void = { task in
624 | guard let sessionTask = task as? URLSessionTask else {
| `- warning: conditional cast from 'AnyObject' to 'URLSessionTask' (aka 'AnyObject') always succeeds
625 | originalFunction(task, selector)
626 | return
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:645:27: error: cannot find 'imp_implementationWithBlock' in scope
643 | }
644 |
645 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
| `- error: cannot find 'imp_implementationWithBlock' in scope
646 | method_setImplementation(method, swizzledIMP)
647 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:646:9: error: cannot find 'method_setImplementation' in scope
644 |
645 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
646 | method_setImplementation(method, swizzledIMP)
| `- error: cannot find 'method_setImplementation' in scope
647 | }
648 | }
/host/spi-builder-workspace/Sources/Airgap/AirgapObserver.swift:29:2: error: Objective-C interoperability is disabled
27 | ///
28 | /// Individual tests that need real network access call `Airgap.allowNetworkAccess()`.
29 | @objc(AirgapObserver)
| `- error: Objective-C interoperability is disabled
30 | open class AirgapObserver: NSObject, XCTestObservation, @unchecked Sendable {
31 | override public init() {
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:57:76: error: cannot find type 'URLRequest' in scope
55 | // Captured request metadata keyed by URL string, for including body/header info in violations.
56 | #if compiler(>=6.0)
57 | private nonisolated(unsafe) static var _capturedRequests: [String: URLRequest] = [:]
| `- error: cannot find type 'URLRequest' in scope
58 | #else
59 | private static var _capturedRequests: [String: URLRequest] = [:]
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:64:55: error: cannot find type 'URLRequest' in scope
62 | // MARK: - URLProtocol overrides
63 |
64 | override public static func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
65 | guard isActive, !isAllowed else { return false }
66 |
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:101:78: error: cannot find type 'URLRequest' in scope
99 | }
100 |
101 | override public static func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
102 | request
103 | }
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:101:63: error: cannot find type 'URLRequest' in scope
99 | }
100 |
101 | override public static func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
102 | request
103 | }
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:105:26: error: method does not override any method from its superclass
103 | }
104 |
105 | override public func startLoading() {
| `- error: method does not override any method from its superclass
106 | let url = request.url?.absoluteString ?? "<unknown URL>"
107 | let method = request.httpMethod ?? "GET"
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:141:26: error: method does not override any method from its superclass
139 | }
140 |
141 | override public func stopLoading() {
| `- error: method does not override any method from its superclass
142 | // Nothing to clean up
143 | }
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:149:72: error: cannot find type 'URLRequest' in scope
147 | /// Called by the swizzled `URLSessionTask.resume()` to provide accurate caller attribution.
148 | /// These take priority over stacks captured in `canInit(with:)`.
149 | static func storeCapturedCallStack(_ callStack: [String], request: URLRequest?, forURL urlString: String) {
| `- error: cannot find type 'URLRequest' in scope
150 | lock.withLock {
151 | _capturedCallStacks[urlString] = callStack
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:8:39: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | /// and injected into `URLSessionConfiguration.default` and `.ephemeral` via swizzling to catch
7 | /// custom session configurations.
8 | public final class AirgapURLProtocol: URLProtocol, @unchecked Sendable {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | // MARK: - Thread-safe state
10 |
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
[6/10] Compiling Airgap AirgapURLProtocol.swift
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:57:76: error: cannot find type 'URLRequest' in scope
55 | // Captured request metadata keyed by URL string, for including body/header info in violations.
56 | #if compiler(>=6.0)
57 | private nonisolated(unsafe) static var _capturedRequests: [String: URLRequest] = [:]
| `- error: cannot find type 'URLRequest' in scope
58 | #else
59 | private static var _capturedRequests: [String: URLRequest] = [:]
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:64:55: error: cannot find type 'URLRequest' in scope
62 | // MARK: - URLProtocol overrides
63 |
64 | override public static func canInit(with request: URLRequest) -> Bool {
| `- error: cannot find type 'URLRequest' in scope
65 | guard isActive, !isAllowed else { return false }
66 |
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:101:78: error: cannot find type 'URLRequest' in scope
99 | }
100 |
101 | override public static func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
102 | request
103 | }
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:101:63: error: cannot find type 'URLRequest' in scope
99 | }
100 |
101 | override public static func canonicalRequest(for request: URLRequest) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
102 | request
103 | }
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:105:26: error: method does not override any method from its superclass
103 | }
104 |
105 | override public func startLoading() {
| `- error: method does not override any method from its superclass
106 | let url = request.url?.absoluteString ?? "<unknown URL>"
107 | let method = request.httpMethod ?? "GET"
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:141:26: error: method does not override any method from its superclass
139 | }
140 |
141 | override public func stopLoading() {
| `- error: method does not override any method from its superclass
142 | // Nothing to clean up
143 | }
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:149:72: error: cannot find type 'URLRequest' in scope
147 | /// Called by the swizzled `URLSessionTask.resume()` to provide accurate caller attribution.
148 | /// These take priority over stacks captured in `canInit(with:)`.
149 | static func storeCapturedCallStack(_ callStack: [String], request: URLRequest?, forURL urlString: String) {
| `- error: cannot find type 'URLRequest' in scope
150 | lock.withLock {
151 | _capturedCallStacks[urlString] = callStack
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:8:39: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
6 | /// and injected into `URLSessionConfiguration.default` and `.ephemeral` via swizzling to catch
7 | /// custom session configurations.
8 | public final class AirgapURLProtocol: URLProtocol, @unchecked Sendable {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
9 | // MARK: - Thread-safe state
10 |
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/Airgap/AirgapURLProtocol.swift:81:62: error: value of type 'any URLProtocol.Type' (aka 'any AnyObject.Type') has no member 'canInit'
79 | // Yield to passthrough protocols (e.g., mock URLProtocols like Mocker's MockingURLProtocol).
80 | // If any passthrough protocol can handle this request, let it through instead of blocking.
81 | for proto in Airgap.passthroughProtocols where proto.canInit(with: request) {
| `- error: value of type 'any URLProtocol.Type' (aka 'any AnyObject.Type') has no member 'canInit'
82 | return false
83 | }
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:90:54: error: cannot find 'Thread' in scope
88 | lock.withLock {
89 | if _capturedCallStacks[urlString] == nil {
90 | _capturedCallStacks[urlString] = Thread.callStackSymbols
| `- error: cannot find 'Thread' in scope
91 | }
92 | if _capturedRequests[urlString] == nil {
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:106:19: error: cannot find 'request' in scope
104 |
105 | override public func startLoading() {
106 | let url = request.url?.absoluteString ?? "<unknown URL>"
| `- error: cannot find 'request' in scope
107 | let method = request.httpMethod ?? "GET"
108 | let testName = Self.currentTestName
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:107:22: error: cannot find 'request' in scope
105 | override public func startLoading() {
106 | let url = request.url?.absoluteString ?? "<unknown URL>"
107 | let method = request.httpMethod ?? "GET"
| `- error: cannot find 'request' in scope
108 | let testName = Self.currentTestName
109 |
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:115:40: error: cannot find 'Thread' in scope
113 | Self._capturedRequests.removeValue(forKey: url))
114 | }
115 | let callStack = storedStack ?? Thread.callStackSymbols
| `- error: cannot find 'Thread' in scope
116 |
117 | Airgap.reportViolation(method: method, url: url, callStack: callStack, testName: testName, request: capturedRequest ?? request)
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:117:128: error: cannot find 'request' in scope
115 | let callStack = storedStack ?? Thread.callStackSymbols
116 |
117 | Airgap.reportViolation(method: method, url: url, callStack: callStack, testName: testName, request: capturedRequest ?? request)
| `- error: cannot find 'request' in scope
118 |
119 | // Deliver an error so the code under test receives a failure rather than hanging.
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:399:110: error: cannot find type 'URLRequest' in scope
397 |
398 | /// Reports a network violation through the configured handler.
399 | static func reportViolation(method: String, url: String, callStack: [String], testName: String, request: URLRequest? = nil) {
| `- error: cannot find type 'URLRequest' in scope
400 | // Always collect violations for programmatic access via violations/violationSummary()
401 | let violation = Violation(
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:131:18: error: value of type 'AirgapURLProtocol' has no member 'client'
129 | NSLocalizedDescriptionKey: "Airgap: Network access is not allowed during tests."
130 | ])
131 | self.client?.urlProtocol(self, didFailWithError: error)
| `- error: value of type 'AirgapURLProtocol' has no member 'client'
132 | }
133 |
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:135:13: error: cannot find 'DispatchQueue' in scope
133 |
134 | if delay > 0 {
135 | DispatchQueue.global().asyncAfter(deadline: .now() + delay, execute: deliverError)
| `- error: cannot find 'DispatchQueue' in scope
136 | } else {
137 | deliverError()
/host/spi-builder-workspace/Sources/Airgap/AirgapURLProtocol.swift:135:58: error: cannot call value of non-function type 'Date'
133 |
134 | if delay > 0 {
135 | DispatchQueue.global().asyncAfter(deadline: .now() + delay, execute: deliverError)
| `- error: cannot call value of non-function type 'Date'
136 | } else {
137 | deliverError()
[7/10] Compiling Airgap Violation.swift
[8/10] Compiling Airgap AirgapTrait.swift
[9/10] Compiling Airgap AirgapObserver.swift
/host/spi-builder-workspace/Sources/Airgap/AirgapObserver.swift:29:2: error: Objective-C interoperability is disabled
27 | ///
28 | /// Individual tests that need real network access call `Airgap.allowNetworkAccess()`.
29 | @objc(AirgapObserver)
| `- error: Objective-C interoperability is disabled
30 | open class AirgapObserver: NSObject, XCTestObservation, @unchecked Sendable {
31 | override public init() {
[10/10] Compiling Airgap Airgap.swift
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:100:72: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
98 | // ```
99 | #if compiler(>=6.0)
100 | private nonisolated(unsafe) static var _passthroughProtocols: [URLProtocol.Type] = []
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
101 | #else
102 | private static var _passthroughProtocols: [URLProtocol.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/Airgap/Airgap.swift:104:46: error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
102 | private static var _passthroughProtocols: [URLProtocol.Type] = []
103 | #endif
104 | public static var passthroughProtocols: [URLProtocol.Type] {
| `- error: 'URLProtocol' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
105 | get { lock.withLock { _passthroughProtocols } }
106 | set { lock.withLock { _passthroughProtocols = newValue } }
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/Airgap/Airgap.swift:399:110: error: cannot find type 'URLRequest' in scope
397 |
398 | /// Reports a network violation through the configured handler.
399 | static func reportViolation(method: String, url: String, callStack: [String], testName: String, request: URLRequest? = nil) {
| `- error: cannot find type 'URLRequest' in scope
400 | // Always collect violations for programmatic access via violations/violationSummary()
401 | let violation = Violation(
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:514:53: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
512 | }
513 |
514 | private static func injectProtocol(into config: URLSessionConfiguration) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
515 | var protocols = config.protocolClasses ?? []
516 | if !protocols.contains(where: { $0 == AirgapURLProtocol.self }) {
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/Airgap/Airgap.swift:523:17: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
521 |
522 | private static func interceptWebSocketIfNeeded(
523 | _ task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
524 | url: URL?,
525 | urlString: String) -> Bool {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' 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 URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:561:71: error: cannot find type 'Selector' in scope
559 | }
560 |
561 | private static func swizzleConfigurationProperty(getter original: Selector, label _: String) {
| `- error: cannot find type 'Selector' in scope
562 | guard let method = class_getClassMethod(URLSessionConfiguration.self, original) else {
563 | return
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:210:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
208 | AirgapURLProtocol.isActive = true
209 | AirgapURLProtocol.isAllowed = false
210 | URLProtocol.registerClass(AirgapURLProtocol.self)
| `- error: type 'URLProtocol' (aka 'AnyObject') has no member 'registerClass'
211 |
212 | lock.withLock {
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:225:21: error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
223 | public static func deactivate() {
224 | AirgapURLProtocol.isActive = false
225 | URLProtocol.unregisterClass(AirgapURLProtocol.self)
| `- error: type 'URLProtocol' (aka 'AnyObject') has no member 'unregisterClass'
226 | AirgapURLProtocol.clearCapturedData()
227 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:432:25: error: cannot find 'XCTExpectFailure' in scope
430 | if inXCTestContext {
431 | onMainThread {
432 | XCTExpectFailure("Airgap violation (warning mode)", strict: false) {
| `- error: cannot find 'XCTExpectFailure' in scope
433 | handler(message)
434 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:468:74: error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
466 | encoder.dateEncodingStrategy = .iso8601
467 | let data = try encoder.encode(currentViolations)
468 | try data.write(to: URL(fileURLWithPath: path), options: .atomic)
| `- error: 'atomic' is unavailable: atomic writing is unavailable in WASI because temporary files are not supported
469 | } else {
470 | let report = buildTextReport(currentViolations)
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 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:507:12: error: cannot find 'Thread' in scope
505 |
506 | private static func onMainThread(_ work: @escaping @Sendable () -> Void) {
507 | if Thread.isMainThread {
| `- error: cannot find 'Thread' in scope
508 | work()
509 | } else {
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:510:13: error: cannot find 'DispatchQueue' in scope
508 | work()
509 | } else {
510 | DispatchQueue.main.sync { work() }
| `- error: cannot find 'DispatchQueue' in scope
511 | }
512 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:515:32: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
513 |
514 | private static func injectProtocol(into config: URLSessionConfiguration) {
515 | var protocols = config.protocolClasses ?? []
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
516 | if !protocols.contains(where: { $0 == AirgapURLProtocol.self }) {
517 | protocols.insert(AirgapURLProtocol.self, at: 0)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:519:16: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
517 | protocols.insert(AirgapURLProtocol.self, at: 0)
518 | }
519 | config.protocolClasses = protocols
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'protocolClasses'
520 | }
521 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:527:35: error: cannot find type 'URLSessionWebSocketTask' in scope
525 | urlString: String) -> Bool {
526 | let scheme = url?.scheme?.lowercased()
527 | let isWebSocket = task is URLSessionWebSocketTask
| `- error: cannot find type 'URLSessionWebSocketTask' in scope
528 | || scheme == "ws" || scheme == "wss"
529 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:538:27: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'currentRequest'
536 | }
537 |
538 | let method = task.currentRequest?.httpMethod ?? "GET"
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'currentRequest'
539 | reportViolation(
540 | method: method, url: urlString,
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:541:24: error: cannot find 'Thread' in scope
539 | reportViolation(
540 | method: method, url: urlString,
541 | callStack: Thread.callStackSymbols,
| `- error: cannot find 'Thread' in scope
542 | testName: AirgapURLProtocol.currentTestName,
543 | request: task.currentRequest)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:543:27: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'currentRequest'
541 | callStack: Thread.callStackSymbols,
542 | testName: AirgapURLProtocol.currentTestName,
543 | request: task.currentRequest)
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'currentRequest'
544 | task.cancel()
545 | return true
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:544:14: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
542 | testName: AirgapURLProtocol.currentTestName,
543 | request: task.currentRequest)
544 | task.cancel()
| `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'cancel'
545 | return true
546 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:554:21: error: '#selector' can only be used with the Objective-C runtime
552 | private static func swizzleSessionConfigurations() {
553 | swizzleConfigurationProperty(
554 | getter: #selector(getter: URLSessionConfiguration.default),
| `- error: '#selector' can only be used with the Objective-C runtime
555 | label: "default")
556 | swizzleConfigurationProperty(
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:557:21: error: '#selector' can only be used with the Objective-C runtime
555 | label: "default")
556 | swizzleConfigurationProperty(
557 | getter: #selector(getter: URLSessionConfiguration.ephemeral),
| `- error: '#selector' can only be used with the Objective-C runtime
558 | label: "ephemeral")
559 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:562:28: error: cannot find 'class_getClassMethod' in scope
560 |
561 | private static func swizzleConfigurationProperty(getter original: Selector, label _: String) {
562 | guard let method = class_getClassMethod(URLSessionConfiguration.self, original) else {
| `- error: cannot find 'class_getClassMethod' in scope
563 | return
564 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:566:27: error: cannot find 'method_getImplementation' in scope
564 | }
565 |
566 | let originalIMP = method_getImplementation(method)
| `- error: cannot find 'method_getImplementation' in scope
567 |
568 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> URLSessionConfiguration
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:568:65: error: cannot find type 'Selector' in scope
566 | let originalIMP = method_getImplementation(method)
567 |
568 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> URLSessionConfiguration
| `- error: cannot find type 'Selector' in scope
569 |
570 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:570:32: error: generic parameter 'U' could not be inferred
568 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> URLSessionConfiguration
569 |
570 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
| `- error: generic parameter 'U' could not be inferred
571 |
572 | let swizzledBlock: @convention(block) (AnyObject) -> URLSessionConfiguration = { obj in
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
| `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:572:62: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
570 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
571 |
572 | let swizzledBlock: @convention(block) (AnyObject) -> URLSessionConfiguration = { obj in
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
573 | let config = originalFunction(obj, original)
574 | injectProtocol(into: config)
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/Airgap/Airgap.swift:578:27: error: cannot find 'imp_implementationWithBlock' in scope
576 | }
577 |
578 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
| `- error: cannot find 'imp_implementationWithBlock' in scope
579 | method_setImplementation(method, swizzledIMP)
580 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:579:9: error: cannot find 'method_setImplementation' in scope
577 |
578 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
579 | method_setImplementation(method, swizzledIMP)
| `- error: cannot find 'method_setImplementation' in scope
580 | }
581 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:590:24: error: cannot find 'NSSelectorFromString' in scope
588 | /// the property-getter swizzle, the protocol is injected when the session is created.
589 | private static func swizzleSessionInit() {
590 | let selector = NSSelectorFromString("sessionWithConfiguration:delegate:delegateQueue:")
| `- error: cannot find 'NSSelectorFromString' in scope
591 | guard let method = class_getClassMethod(URLSession.self, selector) else {
592 | return
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:591:28: error: cannot find 'class_getClassMethod' in scope
589 | private static func swizzleSessionInit() {
590 | let selector = NSSelectorFromString("sessionWithConfiguration:delegate:delegateQueue:")
591 | guard let method = class_getClassMethod(URLSession.self, selector) else {
| `- error: cannot find 'class_getClassMethod' in scope
592 | return
593 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:595:27: error: cannot find 'method_getImplementation' in scope
593 | }
594 |
595 | let originalIMP = method_getImplementation(method)
| `- error: cannot find 'method_getImplementation' in scope
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:596:65: error: cannot find type 'Selector' in scope
594 |
595 | let originalIMP = method_getImplementation(method)
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
| `- error: cannot find type 'Selector' in scope
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
598 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:596:100: error: cannot find type 'URLSessionDelegate' in scope
594 |
595 | let originalIMP = method_getImplementation(method)
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
| `- error: cannot find type 'URLSessionDelegate' in scope
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
598 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:596:121: error: cannot find type 'OperationQueue' in scope
594 |
595 | let originalIMP = method_getImplementation(method)
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
| `- error: cannot find type 'OperationQueue' in scope
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
598 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:597:32: error: generic parameter 'U' could not be inferred
595 | let originalIMP = method_getImplementation(method)
596 | typealias OriginalFunction = @convention(c) (AnyObject, Selector, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession
597 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
| `- error: generic parameter 'U' could not be inferred
598 |
599 | let swizzledBlock: @convention(block) (
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
| `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:600:49: error: cannot find type 'URLSessionDelegate' in scope
598 |
599 | let swizzledBlock: @convention(block) (
600 | AnyObject, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession = { obj, config, delegate, queue in
| `- error: cannot find type 'URLSessionDelegate' in scope
601 | injectProtocol(into: config)
602 | return originalFunction(obj, selector, config, delegate, queue)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:600:70: error: cannot find type 'OperationQueue' in scope
598 |
599 | let swizzledBlock: @convention(block) (
600 | AnyObject, URLSessionConfiguration, URLSessionDelegate?, OperationQueue?) -> URLSession = { obj, config, delegate, queue in
| `- error: cannot find type 'OperationQueue' in scope
601 | injectProtocol(into: config)
602 | return originalFunction(obj, selector, config, delegate, queue)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:605:27: error: cannot find 'imp_implementationWithBlock' in scope
603 | }
604 |
605 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
| `- error: cannot find 'imp_implementationWithBlock' in scope
606 | method_setImplementation(method, swizzledIMP)
607 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:606:9: error: cannot find 'method_setImplementation' in scope
604 |
605 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
606 | method_setImplementation(method, swizzledIMP)
| `- error: cannot find 'method_setImplementation' in scope
607 | }
608 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:614:24: error: '#selector' can only be used with the Objective-C runtime
612 | /// URL loading system internals, not the user's code that initiated the request.
613 | private static func swizzleTaskResume() {
614 | let selector = #selector(URLSessionTask.resume)
| `- error: '#selector' can only be used with the Objective-C runtime
615 | guard let method = class_getInstanceMethod(URLSessionTask.self, selector) else {
616 | return
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:615:28: error: cannot find 'class_getInstanceMethod' in scope
613 | private static func swizzleTaskResume() {
614 | let selector = #selector(URLSessionTask.resume)
615 | guard let method = class_getInstanceMethod(URLSessionTask.self, selector) else {
| `- error: cannot find 'class_getInstanceMethod' in scope
616 | return
617 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:619:27: error: cannot find 'method_getImplementation' in scope
617 | }
618 |
619 | let originalIMP = method_getImplementation(method)
| `- error: cannot find 'method_getImplementation' in scope
620 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> Void
621 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:620:65: error: cannot find type 'Selector' in scope
618 |
619 | let originalIMP = method_getImplementation(method)
620 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> Void
| `- error: cannot find type 'Selector' in scope
621 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
622 |
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:621:32: error: generic parameter 'U' could not be inferred
619 | let originalIMP = method_getImplementation(method)
620 | typealias OriginalFunction = @convention(c) (AnyObject, Selector) -> Void
621 | let originalFunction = unsafeBitCast(originalIMP, to: OriginalFunction.self)
| `- error: generic parameter 'U' could not be inferred
622 |
623 | let swizzledBlock: @convention(block) (AnyObject) -> Void = { task in
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
| `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:634:54: error: cannot find 'Thread' in scope
632 | // Capture the call stack at the point where resume() is called —
633 | // this is the user's code, not the URL loading system internals.
634 | AirgapURLProtocol.storeCapturedCallStack(Thread.callStackSymbols, request: sessionTask.currentRequest, forURL: urlString)
| `- error: cannot find 'Thread' in scope
635 |
636 | // WebSocket tasks (URLSessionWebSocketTask) and ws:///wss:// schemes are not
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:624:42: warning: conditional cast from 'AnyObject' to 'URLSessionTask' (aka 'AnyObject') always succeeds
622 |
623 | let swizzledBlock: @convention(block) (AnyObject) -> Void = { task in
624 | guard let sessionTask = task as? URLSessionTask else {
| `- warning: conditional cast from 'AnyObject' to 'URLSessionTask' (aka 'AnyObject') always succeeds
625 | originalFunction(task, selector)
626 | return
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:645:27: error: cannot find 'imp_implementationWithBlock' in scope
643 | }
644 |
645 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
| `- error: cannot find 'imp_implementationWithBlock' in scope
646 | method_setImplementation(method, swizzledIMP)
647 | }
/host/spi-builder-workspace/Sources/Airgap/Airgap.swift:646:9: error: cannot find 'method_setImplementation' in scope
644 |
645 | let swizzledIMP = imp_implementationWithBlock(swizzledBlock)
646 | method_setImplementation(method, swizzledIMP)
| `- error: cannot find 'method_setImplementation' in scope
647 | }
648 | }
BUILD FAILURE 6.2 wasm