The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Recapi, reference 0.1.18 (a2c254), with Swift 6.1 for Wasm on 25 Nov 2026 04:14:14 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-54344847-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.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Blushedface/recapi-swift.git
Reference: 0.1.18
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/Blushedface/recapi-swift
 * tag               0.1.18     -> FETCH_HEAD
HEAD is now at a2c254d recapi-swift 0.1.18
Cloned https://github.com/Blushedface/recapi-swift.git
Revision (git rev-parse @):
a2c254d276f11f153e125aa58dbde176b12a02fc
SUCCESS checkout https://github.com/Blushedface/recapi-swift.git at 0.1.18
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/Blushedface/recapi-swift.git
https://github.com/Blushedface/recapi-swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344847-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.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:2b61812954062fe290d65f4aab0d63c7eac39321d28a5f7663250a895195bb8e
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/9] Compiling Recapi JSON.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[4/9] Compiling Recapi Transport.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:79:36: error: cannot find type 'URLSessionTaskDelegate' in scope
 77 | /// Refuses redirects: a 3xx (an http:// base URL sent on to https) fails like
 78 | /// a 4xx, or a DELETE would look done.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
    |                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:82:29: error: cannot find type 'URLRequest' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
    |                             `- error: cannot find type 'URLRequest' in scope
 83 |     ) {
 84 |         completionHandler(nil)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:82:81: error: cannot find type 'URLRequest' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
    |                                                                                 `- error: cannot find type 'URLRequest' in scope
 83 |     ) {
 84 |         completionHandler(nil)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:81:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
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/Recapi/Transport.swift:81:38: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
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/Recapi/Transport.swift:81:91: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                                                                                           `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:149:34: error: cannot find type 'URLRequest' in scope
147 |     /// Linux's URLSession ignores timeoutInterval, so the deadline is the
148 |     /// client's own: a timer races the request and cancels it.
149 |     private func send(_ request: URLRequest, timeout: Double) async throws(RecapiError) -> (Data, URLResponse) {
    |                                  `- error: cannot find type 'URLRequest' in scope
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:149:99: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
147 |     /// Linux's URLSession ignores timeoutInterval, so the deadline is the
148 |     /// client's own: a timer races the request and cancels it.
149 |     private func send(_ request: URLRequest, timeout: Double) async throws(RecapiError) -> (Data, URLResponse) {
    |                                                                                                   `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:190:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | }
189 |
190 | func httpError(_ response: HTTPURLResponse, _ data: Data) -> RecapiError {
    |                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
191 |     let payload = (try? JSONValue.parse(data))?["error"]
192 |     let status = response.statusCode
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:84:27: error: 'nil' requires a contextual type
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
 84 |         completionHandler(nil)
    |                           `- error: 'nil' requires a contextual type
 85 |     }
 86 | }
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:118:23: error: cannot find 'URLRequest' in scope
116 |             throw RecapiError(code: "invalid_request", message: "bad URL \(target)")
117 |         }
118 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: timeout)
    |                       `- error: cannot find 'URLRequest' in scope
119 |         request.httpMethod = method
120 |         for (name, value) in headers { request.setValue(value, forHTTPHeaderField: name) }
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:118:58: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
116 |             throw RecapiError(code: "invalid_request", message: "bad URL \(target)")
117 |         }
118 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: timeout)
    |                                                          `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
119 |         request.httpMethod = method
120 |         for (name, value) in headers { request.setValue(value, forHTTPHeaderField: name) }
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:161:13: error: cannot find 'DispatchQueue' in scope
159 |                 }
160 |             }
161 |             DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
    |             `- error: cannot find 'DispatchQueue' in scope
162 |                 if once.resume(.failure(RecapiError(code: "timeout", message: "no answer within \(timeout) s"))) {
163 |                     task.cancel()
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:152:32: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
152 |             let task = session.dataTask(with: request) { data, response, error in
    |                                `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
153 |                 if let response, error == nil {
154 |                     once.resume(.success((data ?? Data(), response)))
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:154:59: error: value of type '_' expected to be instance of class or class-constrained type
152 |             let task = session.dataTask(with: request) { data, response, error in
153 |                 if let response, error == nil {
154 |                     once.resume(.success((data ?? Data(), response)))
    |                                                           `- error: value of type '_' expected to be instance of class or class-constrained type
155 |                 } else if let error = error as? URLError, error.code == .timedOut {
156 |                     once.resume(.failure(RecapiError(code: "timeout", message: "no answer in time: \(error)")))
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:192:27: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
190 | func httpError(_ response: HTTPURLResponse, _ data: Data) -> RecapiError {
191 |     let payload = (try? JSONValue.parse(data))?["error"]
192 |     let status = response.statusCode
    |                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
193 |     var code = payload?["code"]?.stringValue ?? ""
194 |     if code.isEmpty { code = codeByStatus[status] ?? (status >= 500 ? "internal" : "http_error") }
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:198:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
196 |     if message.isEmpty { message = "HTTP \(status)" }
197 |     var retryAfter: Double?
198 |     if let header = response.value(forHTTPHeaderField: "Retry-After"),
    |                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
199 |         let seconds = Double(header.trimmingCharacters(in: .whitespaces)), seconds >= 0, seconds.isFinite
200 |     {
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:199:61: error: cannot infer contextual base in reference to member 'whitespaces'
197 |     var retryAfter: Double?
198 |     if let header = response.value(forHTTPHeaderField: "Retry-After"),
199 |         let seconds = Double(header.trimmingCharacters(in: .whitespaces)), seconds >= 0, seconds.isFinite
    |                                                             `- error: cannot infer contextual base in reference to member 'whitespaces'
200 |     {
201 |         retryAfter = seconds
[5/9] Compiling Recapi History.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/9] Compiling Recapi SHA256.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[7/9] Compiling Recapi Client.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/Recapi/Client.swift:192:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 |     let interval: Double
191 |     let prefix: String
192 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
193 |
194 |     /// Guards the store's read-modify-writes, the queue, failures and started.
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/Recapi/Client.swift:242:47: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |     init(
241 |         apiKey: String, baseURL: String, store: RecapiStore?, timeout: Double, maxBatch: Int?,
242 |         flushInterval: Double, configuration: URLSessionConfiguration, sender: Bool
    |                                               `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
243 |     ) throws(RecapiError) {
244 |         guard !apiKey.isEmpty else { throw .invalid("apiKey is required") }
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/Recapi/Client.swift:236:59: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
234 |         try self.init(
235 |             apiKey: apiKey, baseURL: baseURL, store: store, timeout: timeout, maxBatch: maxBatch,
236 |             flushInterval: flushInterval, configuration: .ephemeral, sender: true)
    |                                                           `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
237 |     }
238 |
/host/spi-builder-workspace/Sources/Recapi/Client.swift:260:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
258 |         // Two environments' keys may share one Redis: their users must not mix.
259 |         prefix = "recapi:" + sha256Hex(apiKey).prefix(12) + ":"
260 |         session = URLSession(configuration: configuration, delegate: NoRedirects(), delegateQueue: nil)
    |                   `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
261 |     }
262 |
/host/spi-builder-workspace/Sources/Recapi/Client.swift:260:100: error: 'nil' requires a contextual type
258 |         // Two environments' keys may share one Redis: their users must not mix.
259 |         prefix = "recapi:" + sha256Hex(apiKey).prefix(12) + ":"
260 |         session = URLSession(configuration: configuration, delegate: NoRedirects(), delegateQueue: nil)
    |                                                                                                    `- error: 'nil' requires a contextual type
261 |     }
262 |
/host/spi-builder-workspace/Sources/Recapi/Client.swift:263:22: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
261 |     }
262 |
263 |     deinit { session.finishTasksAndInvalidate() }
    |                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
264 |
265 |     static func sleeper(_ closed: Signal) -> @Sendable (Double, Bool) async -> Bool {
/host/spi-builder-workspace/Sources/Recapi/Client.swift:420:32: error: cannot find 'DispatchTime' in scope
418 |         Task.detached { [weak self] in
419 |             while let delay = self?.senderDelay() {
420 |                 let deadline = DispatchTime.now() + delay
    |                                `- error: cannot find 'DispatchTime' in scope
421 |                 var woken = await wake.wait(delay)
422 |                 // A full batch goes at once, except after a failure: then the
/host/spi-builder-workspace/Sources/Recapi/Client.swift:425:74: error: cannot find 'DispatchTime' in scope
423 |                 // backoff holds, or a down API would be hammered.
424 |                 while woken, !closed.isFired, self?.fullBatchReady() == false {
425 |                     let left = Int64(deadline.uptimeNanoseconds) - Int64(DispatchTime.now().uptimeNanoseconds)
    |                                                                          `- error: cannot find 'DispatchTime' in scope
426 |                     woken = await wake.wait(Double(left) / 1e9)
427 |                 }
/host/spi-builder-workspace/Sources/Recapi/Client.swift:580:24: error: cannot find 'DispatchTime' in scope
578 |         let limit = min(timeout, RecapiClient.recommendTimeout)
579 |         // The restore and the recommendation share one deadline.
580 |         let deadline = DispatchTime.now() + limit
    |                        `- error: cannot find 'DispatchTime' in scope
581 |         let left = { max(0, Double(Int64(deadline.uptimeNanoseconds) - Int64(DispatchTime.now().uptimeNanoseconds)) / 1e9) }
582 |         var rows = rows, shared = shared
/host/spi-builder-workspace/Sources/Recapi/Client.swift:581:78: error: cannot find 'DispatchTime' in scope
579 |         // The restore and the recommendation share one deadline.
580 |         let deadline = DispatchTime.now() + limit
581 |         let left = { max(0, Double(Int64(deadline.uptimeNanoseconds) - Int64(DispatchTime.now().uptimeNanoseconds)) / 1e9) }
    |                                                                              `- error: cannot find 'DispatchTime' in scope
582 |         var rows = rows, shared = shared
583 |         // One list sends its exclude as the call's.
/host/spi-builder-workspace/Sources/Recapi/Client.swift:921:13: error: cannot find 'DispatchQueue' in scope
919 |             }
920 |             guard let id else { return c.resume(returning: true) }
921 |             DispatchQueue.global().asyncAfter(deadline: .now() + max(0, seconds)) {
    |             `- error: cannot find 'DispatchQueue' in scope
922 |                 self.lock.locked { self.waiters.removeValue(forKey: id) }?.resume(returning: false)
923 |             }
/host/spi-builder-workspace/Sources/Recapi/Client.swift:921:58: error: cannot call value of non-function type 'Date'
919 |             }
920 |             guard let id else { return c.resume(returning: true) }
921 |             DispatchQueue.global().asyncAfter(deadline: .now() + max(0, seconds)) {
    |                                                          `- error: cannot call value of non-function type 'Date'
922 |                 self.lock.locked { self.waiters.removeValue(forKey: id) }?.resume(returning: false)
923 |             }
[8/9] Compiling Recapi Store.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/Recapi/Store.swift:69:25: error: cannot find 'DispatchQueue' in scope
 67 |     private let max: Int
 68 |     private let lock = NSLock()
 69 |     private let queue = DispatchQueue(label: "io.recapi.store")
    |                         `- error: cannot find 'DispatchQueue' in scope
 70 |     // By file name. Each value's sequence number is stored with it: the
 71 |     // eviction order survives a restart without reading file dates.
[9/9] Emitting module Recapi
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/Recapi/Client.swift:192:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 |     let interval: Double
191 |     let prefix: String
192 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
193 |
194 |     /// Guards the store's read-modify-writes, the queue, failures and started.
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/Recapi/Client.swift:242:47: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |     init(
241 |         apiKey: String, baseURL: String, store: RecapiStore?, timeout: Double, maxBatch: Int?,
242 |         flushInterval: Double, configuration: URLSessionConfiguration, sender: Bool
    |                                               `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
243 |     ) throws(RecapiError) {
244 |         guard !apiKey.isEmpty else { throw .invalid("apiKey is required") }
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/Recapi/Store.swift:69:25: error: cannot find 'DispatchQueue' in scope
 67 |     private let max: Int
 68 |     private let lock = NSLock()
 69 |     private let queue = DispatchQueue(label: "io.recapi.store")
    |                         `- error: cannot find 'DispatchQueue' in scope
 70 |     // By file name. Each value's sequence number is stored with it: the
 71 |     // eviction order survives a restart without reading file dates.
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:79:36: error: cannot find type 'URLSessionTaskDelegate' in scope
 77 | /// Refuses redirects: a 3xx (an http:// base URL sent on to https) fails like
 78 | /// a 4xx, or a DELETE would look done.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
    |                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:82:29: error: cannot find type 'URLRequest' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
    |                             `- error: cannot find type 'URLRequest' in scope
 83 |     ) {
 84 |         completionHandler(nil)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:82:81: error: cannot find type 'URLRequest' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
    |                                                                                 `- error: cannot find type 'URLRequest' in scope
 83 |     ) {
 84 |         completionHandler(nil)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:81:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
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/Recapi/Transport.swift:81:38: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
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/Recapi/Transport.swift:81:91: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                                                                                           `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:149:34: error: cannot find type 'URLRequest' in scope
147 |     /// Linux's URLSession ignores timeoutInterval, so the deadline is the
148 |     /// client's own: a timer races the request and cancels it.
149 |     private func send(_ request: URLRequest, timeout: Double) async throws(RecapiError) -> (Data, URLResponse) {
    |                                  `- error: cannot find type 'URLRequest' in scope
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:149:99: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
147 |     /// Linux's URLSession ignores timeoutInterval, so the deadline is the
148 |     /// client's own: a timer races the request and cancels it.
149 |     private func send(_ request: URLRequest, timeout: Double) async throws(RecapiError) -> (Data, URLResponse) {
    |                                                                                                   `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:190:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | }
189 |
190 | func httpError(_ response: HTTPURLResponse, _ data: Data) -> RecapiError {
    |                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
191 |     let payload = (try? JSONValue.parse(data))?["error"]
192 |     let status = response.statusCode
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344847-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.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:2b61812954062fe290d65f4aab0d63c7eac39321d28a5f7663250a895195bb8e
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/8] Emitting module Recapi
/host/spi-builder-workspace/Sources/Recapi/Client.swift:192:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 |     let interval: Double
191 |     let prefix: String
192 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
193 |
194 |     /// Guards the store's read-modify-writes, the queue, failures and started.
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/Recapi/Client.swift:242:47: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |     init(
241 |         apiKey: String, baseURL: String, store: RecapiStore?, timeout: Double, maxBatch: Int?,
242 |         flushInterval: Double, configuration: URLSessionConfiguration, sender: Bool
    |                                               `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
243 |     ) throws(RecapiError) {
244 |         guard !apiKey.isEmpty else { throw .invalid("apiKey is required") }
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/Recapi/Store.swift:69:25: error: cannot find 'DispatchQueue' in scope
 67 |     private let max: Int
 68 |     private let lock = NSLock()
 69 |     private let queue = DispatchQueue(label: "io.recapi.store")
    |                         `- error: cannot find 'DispatchQueue' in scope
 70 |     // By file name. Each value's sequence number is stored with it: the
 71 |     // eviction order survives a restart without reading file dates.
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:79:36: error: cannot find type 'URLSessionTaskDelegate' in scope
 77 | /// Refuses redirects: a 3xx (an http:// base URL sent on to https) fails like
 78 | /// a 4xx, or a DELETE would look done.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
    |                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:82:29: error: cannot find type 'URLRequest' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
    |                             `- error: cannot find type 'URLRequest' in scope
 83 |     ) {
 84 |         completionHandler(nil)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:82:81: error: cannot find type 'URLRequest' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
    |                                                                                 `- error: cannot find type 'URLRequest' in scope
 83 |     ) {
 84 |         completionHandler(nil)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:81:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
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/Recapi/Transport.swift:81:38: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
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/Recapi/Transport.swift:81:91: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                                                                                           `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:149:34: error: cannot find type 'URLRequest' in scope
147 |     /// Linux's URLSession ignores timeoutInterval, so the deadline is the
148 |     /// client's own: a timer races the request and cancels it.
149 |     private func send(_ request: URLRequest, timeout: Double) async throws(RecapiError) -> (Data, URLResponse) {
    |                                  `- error: cannot find type 'URLRequest' in scope
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:149:99: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
147 |     /// Linux's URLSession ignores timeoutInterval, so the deadline is the
148 |     /// client's own: a timer races the request and cancels it.
149 |     private func send(_ request: URLRequest, timeout: Double) async throws(RecapiError) -> (Data, URLResponse) {
    |                                                                                                   `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:190:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | }
189 |
190 | func httpError(_ response: HTTPURLResponse, _ data: Data) -> RecapiError {
    |                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
191 |     let payload = (try? JSONValue.parse(data))?["error"]
192 |     let status = response.statusCode
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
[3/8] Compiling Recapi Transport.swift
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:79:36: error: cannot find type 'URLSessionTaskDelegate' in scope
 77 | /// Refuses redirects: a 3xx (an http:// base URL sent on to https) fails like
 78 | /// a 4xx, or a DELETE would look done.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
    |                                    `- error: cannot find type 'URLSessionTaskDelegate' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:82:29: error: cannot find type 'URLRequest' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
    |                             `- error: cannot find type 'URLRequest' in scope
 83 |     ) {
 84 |         completionHandler(nil)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:82:81: error: cannot find type 'URLRequest' in scope
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
    |                                                                                 `- error: cannot find type 'URLRequest' in scope
 83 |     ) {
 84 |         completionHandler(nil)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:81:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
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/Recapi/Transport.swift:81:38: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
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/Recapi/Transport.swift:81:91: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 79 | final class NoRedirects: NSObject, URLSessionTaskDelegate, Sendable {
 80 |     func urlSession(
 81 |         _ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse,
    |                                                                                           `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:149:34: error: cannot find type 'URLRequest' in scope
147 |     /// Linux's URLSession ignores timeoutInterval, so the deadline is the
148 |     /// client's own: a timer races the request and cancels it.
149 |     private func send(_ request: URLRequest, timeout: Double) async throws(RecapiError) -> (Data, URLResponse) {
    |                                  `- error: cannot find type 'URLRequest' in scope
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:149:99: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
147 |     /// Linux's URLSession ignores timeoutInterval, so the deadline is the
148 |     /// client's own: a timer races the request and cancels it.
149 |     private func send(_ request: URLRequest, timeout: Double) async throws(RecapiError) -> (Data, URLResponse) {
    |                                                                                                   `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
Foundation.URLResponse:2:18: note: 'URLResponse' 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 URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:190:28: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | }
189 |
190 | func httpError(_ response: HTTPURLResponse, _ data: Data) -> RecapiError {
    |                            `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
191 |     let payload = (try? JSONValue.parse(data))?["error"]
192 |     let status = response.statusCode
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:84:27: error: 'nil' requires a contextual type
 82 |         newRequest request: URLRequest, completionHandler: @escaping @Sendable (URLRequest?) -> Void
 83 |     ) {
 84 |         completionHandler(nil)
    |                           `- error: 'nil' requires a contextual type
 85 |     }
 86 | }
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:118:23: error: cannot find 'URLRequest' in scope
116 |             throw RecapiError(code: "invalid_request", message: "bad URL \(target)")
117 |         }
118 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: timeout)
    |                       `- error: cannot find 'URLRequest' in scope
119 |         request.httpMethod = method
120 |         for (name, value) in headers { request.setValue(value, forHTTPHeaderField: name) }
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:118:58: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
116 |             throw RecapiError(code: "invalid_request", message: "bad URL \(target)")
117 |         }
118 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: timeout)
    |                                                          `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
119 |         request.httpMethod = method
120 |         for (name, value) in headers { request.setValue(value, forHTTPHeaderField: name) }
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:161:13: error: cannot find 'DispatchQueue' in scope
159 |                 }
160 |             }
161 |             DispatchQueue.global().asyncAfter(deadline: .now() + timeout) {
    |             `- error: cannot find 'DispatchQueue' in scope
162 |                 if once.resume(.failure(RecapiError(code: "timeout", message: "no answer within \(timeout) s"))) {
163 |                     task.cancel()
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:152:32: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
150 |         let result = await withCheckedContinuation { (c: CheckedContinuation<Result<(Data, URLResponse), RecapiError>, Never>) in
151 |             let once = Once(c)
152 |             let task = session.dataTask(with: request) { data, response, error in
    |                                `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
153 |                 if let response, error == nil {
154 |                     once.resume(.success((data ?? Data(), response)))
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:154:59: error: value of type '_' expected to be instance of class or class-constrained type
152 |             let task = session.dataTask(with: request) { data, response, error in
153 |                 if let response, error == nil {
154 |                     once.resume(.success((data ?? Data(), response)))
    |                                                           `- error: value of type '_' expected to be instance of class or class-constrained type
155 |                 } else if let error = error as? URLError, error.code == .timedOut {
156 |                     once.resume(.failure(RecapiError(code: "timeout", message: "no answer in time: \(error)")))
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:192:27: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
190 | func httpError(_ response: HTTPURLResponse, _ data: Data) -> RecapiError {
191 |     let payload = (try? JSONValue.parse(data))?["error"]
192 |     let status = response.statusCode
    |                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
193 |     var code = payload?["code"]?.stringValue ?? ""
194 |     if code.isEmpty { code = codeByStatus[status] ?? (status >= 500 ? "internal" : "http_error") }
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:198:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
196 |     if message.isEmpty { message = "HTTP \(status)" }
197 |     var retryAfter: Double?
198 |     if let header = response.value(forHTTPHeaderField: "Retry-After"),
    |                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
199 |         let seconds = Double(header.trimmingCharacters(in: .whitespaces)), seconds >= 0, seconds.isFinite
200 |     {
/host/spi-builder-workspace/Sources/Recapi/Transport.swift:199:61: error: cannot infer contextual base in reference to member 'whitespaces'
197 |     var retryAfter: Double?
198 |     if let header = response.value(forHTTPHeaderField: "Retry-After"),
199 |         let seconds = Double(header.trimmingCharacters(in: .whitespaces)), seconds >= 0, seconds.isFinite
    |                                                             `- error: cannot infer contextual base in reference to member 'whitespaces'
200 |     {
201 |         retryAfter = seconds
[4/8] Compiling Recapi Store.swift
/host/spi-builder-workspace/Sources/Recapi/Store.swift:69:25: error: cannot find 'DispatchQueue' in scope
 67 |     private let max: Int
 68 |     private let lock = NSLock()
 69 |     private let queue = DispatchQueue(label: "io.recapi.store")
    |                         `- error: cannot find 'DispatchQueue' in scope
 70 |     // By file name. Each value's sequence number is stored with it: the
 71 |     // eviction order survives a restart without reading file dates.
[5/8] Compiling Recapi SHA256.swift
[6/8] Compiling Recapi JSON.swift
[7/8] Compiling Recapi History.swift
[8/8] Compiling Recapi Client.swift
/host/spi-builder-workspace/Sources/Recapi/Client.swift:192:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 |     let interval: Double
191 |     let prefix: String
192 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
193 |
194 |     /// Guards the store's read-modify-writes, the queue, failures and started.
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/Recapi/Client.swift:242:47: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
240 |     init(
241 |         apiKey: String, baseURL: String, store: RecapiStore?, timeout: Double, maxBatch: Int?,
242 |         flushInterval: Double, configuration: URLSessionConfiguration, sender: Bool
    |                                               `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
243 |     ) throws(RecapiError) {
244 |         guard !apiKey.isEmpty else { throw .invalid("apiKey is required") }
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/Recapi/Client.swift:236:59: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
234 |         try self.init(
235 |             apiKey: apiKey, baseURL: baseURL, store: store, timeout: timeout, maxBatch: maxBatch,
236 |             flushInterval: flushInterval, configuration: .ephemeral, sender: true)
    |                                                           `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
237 |     }
238 |
/host/spi-builder-workspace/Sources/Recapi/Client.swift:260:19: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
258 |         // Two environments' keys may share one Redis: their users must not mix.
259 |         prefix = "recapi:" + sha256Hex(apiKey).prefix(12) + ":"
260 |         session = URLSession(configuration: configuration, delegate: NoRedirects(), delegateQueue: nil)
    |                   `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
261 |     }
262 |
/host/spi-builder-workspace/Sources/Recapi/Client.swift:260:100: error: 'nil' requires a contextual type
258 |         // Two environments' keys may share one Redis: their users must not mix.
259 |         prefix = "recapi:" + sha256Hex(apiKey).prefix(12) + ":"
260 |         session = URLSession(configuration: configuration, delegate: NoRedirects(), delegateQueue: nil)
    |                                                                                                    `- error: 'nil' requires a contextual type
261 |     }
262 |
/host/spi-builder-workspace/Sources/Recapi/Client.swift:263:22: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
261 |     }
262 |
263 |     deinit { session.finishTasksAndInvalidate() }
    |                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
264 |
265 |     static func sleeper(_ closed: Signal) -> @Sendable (Double, Bool) async -> Bool {
/host/spi-builder-workspace/Sources/Recapi/Client.swift:420:32: error: cannot find 'DispatchTime' in scope
418 |         Task.detached { [weak self] in
419 |             while let delay = self?.senderDelay() {
420 |                 let deadline = DispatchTime.now() + delay
    |                                `- error: cannot find 'DispatchTime' in scope
421 |                 var woken = await wake.wait(delay)
422 |                 // A full batch goes at once, except after a failure: then the
/host/spi-builder-workspace/Sources/Recapi/Client.swift:425:74: error: cannot find 'DispatchTime' in scope
423 |                 // backoff holds, or a down API would be hammered.
424 |                 while woken, !closed.isFired, self?.fullBatchReady() == false {
425 |                     let left = Int64(deadline.uptimeNanoseconds) - Int64(DispatchTime.now().uptimeNanoseconds)
    |                                                                          `- error: cannot find 'DispatchTime' in scope
426 |                     woken = await wake.wait(Double(left) / 1e9)
427 |                 }
/host/spi-builder-workspace/Sources/Recapi/Client.swift:580:24: error: cannot find 'DispatchTime' in scope
578 |         let limit = min(timeout, RecapiClient.recommendTimeout)
579 |         // The restore and the recommendation share one deadline.
580 |         let deadline = DispatchTime.now() + limit
    |                        `- error: cannot find 'DispatchTime' in scope
581 |         let left = { max(0, Double(Int64(deadline.uptimeNanoseconds) - Int64(DispatchTime.now().uptimeNanoseconds)) / 1e9) }
582 |         var rows = rows, shared = shared
/host/spi-builder-workspace/Sources/Recapi/Client.swift:581:78: error: cannot find 'DispatchTime' in scope
579 |         // The restore and the recommendation share one deadline.
580 |         let deadline = DispatchTime.now() + limit
581 |         let left = { max(0, Double(Int64(deadline.uptimeNanoseconds) - Int64(DispatchTime.now().uptimeNanoseconds)) / 1e9) }
    |                                                                              `- error: cannot find 'DispatchTime' in scope
582 |         var rows = rows, shared = shared
583 |         // One list sends its exclude as the call's.
/host/spi-builder-workspace/Sources/Recapi/Client.swift:921:13: error: cannot find 'DispatchQueue' in scope
919 |             }
920 |             guard let id else { return c.resume(returning: true) }
921 |             DispatchQueue.global().asyncAfter(deadline: .now() + max(0, seconds)) {
    |             `- error: cannot find 'DispatchQueue' in scope
922 |                 self.lock.locked { self.waiters.removeValue(forKey: id) }?.resume(returning: false)
923 |             }
/host/spi-builder-workspace/Sources/Recapi/Client.swift:921:58: error: cannot call value of non-function type 'Date'
919 |             }
920 |             guard let id else { return c.resume(returning: true) }
921 |             DispatchQueue.global().asyncAfter(deadline: .now() + max(0, seconds)) {
    |                                                          `- error: cannot call value of non-function type 'Date'
922 |                 self.lock.locked { self.waiters.removeValue(forKey: id) }?.resume(returning: false)
923 |             }
BUILD FAILURE 6.1 wasm