Build Information
Failed to build pocketbase, reference 0.2.0 (3e881b), with Swift 6.3 for Wasm on 28 Sep 2026 12:34:40 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344844-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.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1Build Log
========================================
RunAll
========================================
Builder version: 5.1.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/pastelcode/pocketbase.git
Reference: 0.2.0
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/pastelcode/pocketbase
* tag 0.2.0 -> FETCH_HEAD
HEAD is now at 3e881b5 chore: refresh the changelog and remove legacy aliases (#31)
Cloned https://github.com/pastelcode/pocketbase.git
Revision (git rev-parse @):
3e881b5babba8a87711f5da9fc8ade919b8c58a7
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/pastelcode/pocketbase.git at 0.2.0
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.3
Building package at path: $PWD
https://github.com/pastelcode/pocketbase.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344844-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.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1
wasm-6.3-latest: Pulling from saguaro1/spi-images
Digest: sha256:253aad7f5b11d25cf9eaef34120b94cd8a325782929c57fb304a7711494a3f9a
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/30] Emitting module pocketbase
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:88:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | /// continues through the pipeline. Called before error statuses are
87 | /// converted into ``ClientResponseError``.
88 | open var afterSend: (@Sendable (HTTPURLResponse, Data, SendOptions) async throws -> Data)?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
89 |
90 | private let lock = NSRecursiveLock()
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/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:30:61: error: cannot find type 'URLSessionDataDelegate' in scope
28 | /// A dedicated session with a delegate is required: `URLSession.shared` has no
29 | /// delegate, so any bytes sent to it (such as an SSE stream) are discarded.
30 | final class URLSessionSSETransport: NSObject, SSETransport, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
31 | /// Called for every frame parsed from the stream.
32 | var onEvent: (@Sendable (SSEEvent) -> Void)?
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:37:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | private let lock = NSRecursiveLock()
37 | private let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | private var session: URLSession?
39 | private var parser = SSEParser()
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/pocketbase/Tools/SSETransport.swift:38:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | private let lock = NSRecursiveLock()
37 | private let configuration: URLSessionConfiguration
38 | private var session: URLSession?
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | private var parser = SSEParser()
40 | private var task: URLSessionDataTask?
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/pocketbase/Tools/SSETransport.swift:40:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | private var session: URLSession?
39 | private var parser = SSEParser()
40 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | private var isCancelled = false
42 | private var didReportDisconnect = false
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:135:50: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:132:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter completionHandler: Receives the disposition for the response.
131 | func urlSession(
132 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
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/pocketbase/Tools/SSETransport.swift:133:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
131 | func urlSession(
132 | _ session: URLSession,
133 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 | didReceive response: URLResponse,
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:134:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
132 | _ session: URLSession,
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
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/pocketbase/Tools/SSETransport.swift:162:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
160 | /// - Parameter data: The newly received bytes.
161 | func urlSession(
162 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
163 | dataTask: URLSessionDataTask,
164 | didReceive data: Data
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/pocketbase/Tools/SSETransport.swift:163:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
161 | func urlSession(
162 | _ session: URLSession,
163 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
164 | didReceive data: Data
165 | ) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:182:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | /// - Parameter error: The failure, or `nil` for a clean end of stream.
181 | func urlSession(
182 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | task: URLSessionTask,
184 | didCompleteWithError error: Error?
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/pocketbase/Tools/SSETransport.swift:183:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | func urlSession(
182 | _ session: URLSession,
183 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | didCompleteWithError error: Error?
185 | ) {
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
[4/33] Compiling pocketbase BatchService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/BatchService.swift:155:25: error: cannot infer contextual base in reference to member 'data'
153 | opt.applyDefaultMethod("POST")
154 | if opt.body == nil {
155 | opt.body = .data(multipart.bodyData)
| `- error: cannot infer contextual base in reference to member 'data'
156 | if !hasHeader(opt.headers, name: "Content-Type") {
157 | opt.headers["Content-Type"] = multipart.contentTypeHeader
/host/spi-builder-workspace/Sources/pocketbase/Services/CollectionService.swift:35:31: error: cannot infer contextual base in reference to member 'json'
33 | var opt = options ?? SendOptions()
34 | opt.applyDefaultMethod("PUT")
35 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
36 | "collections": AnyCodable(collections),
37 | "deleteMissing": AnyCodable(deleteMissing)
/host/spi-builder-workspace/Sources/pocketbase/Services/CollectionService.swift:90:31: error: cannot infer contextual base in reference to member 'json'
88 | var opt = options ?? SendOptions()
89 | opt.applyDefaultMethod("POST")
90 | opt.applyDefaultBody(.json(["query": AnyCodable(query)]))
| `- error: cannot infer contextual base in reference to member 'json'
91 | return try await client.send(path: "\(baseCrudPath)/meta/dry-run-view", options: opt)
92 | }
[5/33] Compiling pocketbase CollectionService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/BatchService.swift:155:25: error: cannot infer contextual base in reference to member 'data'
153 | opt.applyDefaultMethod("POST")
154 | if opt.body == nil {
155 | opt.body = .data(multipart.bodyData)
| `- error: cannot infer contextual base in reference to member 'data'
156 | if !hasHeader(opt.headers, name: "Content-Type") {
157 | opt.headers["Content-Type"] = multipart.contentTypeHeader
/host/spi-builder-workspace/Sources/pocketbase/Services/CollectionService.swift:35:31: error: cannot infer contextual base in reference to member 'json'
33 | var opt = options ?? SendOptions()
34 | opt.applyDefaultMethod("PUT")
35 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
36 | "collections": AnyCodable(collections),
37 | "deleteMissing": AnyCodable(deleteMissing)
/host/spi-builder-workspace/Sources/pocketbase/Services/CollectionService.swift:90:31: error: cannot infer contextual base in reference to member 'json'
88 | var opt = options ?? SendOptions()
89 | opt.applyDefaultMethod("POST")
90 | opt.applyDefaultBody(.json(["query": AnyCodable(query)]))
| `- error: cannot infer contextual base in reference to member 'json'
91 | return try await client.send(path: "\(baseCrudPath)/meta/dry-run-view", options: opt)
92 | }
[6/33] Compiling pocketbase CronService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/BatchService.swift:155:25: error: cannot infer contextual base in reference to member 'data'
153 | opt.applyDefaultMethod("POST")
154 | if opt.body == nil {
155 | opt.body = .data(multipart.bodyData)
| `- error: cannot infer contextual base in reference to member 'data'
156 | if !hasHeader(opt.headers, name: "Content-Type") {
157 | opt.headers["Content-Type"] = multipart.contentTypeHeader
/host/spi-builder-workspace/Sources/pocketbase/Services/CollectionService.swift:35:31: error: cannot infer contextual base in reference to member 'json'
33 | var opt = options ?? SendOptions()
34 | opt.applyDefaultMethod("PUT")
35 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
36 | "collections": AnyCodable(collections),
37 | "deleteMissing": AnyCodable(deleteMissing)
/host/spi-builder-workspace/Sources/pocketbase/Services/CollectionService.swift:90:31: error: cannot infer contextual base in reference to member 'json'
88 | var opt = options ?? SendOptions()
89 | opt.applyDefaultMethod("POST")
90 | opt.applyDefaultBody(.json(["query": AnyCodable(query)]))
| `- error: cannot infer contextual base in reference to member 'json'
91 | return try await client.send(path: "\(baseCrudPath)/meta/dry-run-view", options: opt)
92 | }
[7/33] Compiling pocketbase CrudService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/BatchService.swift:155:25: error: cannot infer contextual base in reference to member 'data'
153 | opt.applyDefaultMethod("POST")
154 | if opt.body == nil {
155 | opt.body = .data(multipart.bodyData)
| `- error: cannot infer contextual base in reference to member 'data'
156 | if !hasHeader(opt.headers, name: "Content-Type") {
157 | opt.headers["Content-Type"] = multipart.contentTypeHeader
/host/spi-builder-workspace/Sources/pocketbase/Services/CollectionService.swift:35:31: error: cannot infer contextual base in reference to member 'json'
33 | var opt = options ?? SendOptions()
34 | opt.applyDefaultMethod("PUT")
35 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
36 | "collections": AnyCodable(collections),
37 | "deleteMissing": AnyCodable(deleteMissing)
/host/spi-builder-workspace/Sources/pocketbase/Services/CollectionService.swift:90:31: error: cannot infer contextual base in reference to member 'json'
88 | var opt = options ?? SendOptions()
89 | opt.applyDefaultMethod("POST")
90 | opt.applyDefaultBody(.json(["query": AnyCodable(query)]))
| `- error: cannot infer contextual base in reference to member 'json'
91 | return try await client.send(path: "\(baseCrudPath)/meta/dry-run-view", options: opt)
92 | }
[8/33] Compiling pocketbase BaseAuthStore.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
[9/33] Compiling pocketbase LocalAuthStore.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
[10/33] Compiling pocketbase AnyCodable.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
[11/33] Compiling pocketbase AutoRefresh.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
[12/33] Compiling pocketbase FileService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/RealtimeService.swift:736:25: error: cannot infer contextual base in reference to member 'json'
734 | var options = SendOptions()
735 | options.method = "POST"
736 | options.body = .json([
| `- error: cannot infer contextual base in reference to member 'json'
737 | "clientId": AnyCodable(currentClientId),
738 | "subscriptions": AnyCodable(keys)
[13/33] Compiling pocketbase HealthService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/RealtimeService.swift:736:25: error: cannot infer contextual base in reference to member 'json'
734 | var options = SendOptions()
735 | options.method = "POST"
736 | options.body = .json([
| `- error: cannot infer contextual base in reference to member 'json'
737 | "clientId": AnyCodable(currentClientId),
738 | "subscriptions": AnyCodable(keys)
[14/33] Compiling pocketbase LogService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/RealtimeService.swift:736:25: error: cannot infer contextual base in reference to member 'json'
734 | var options = SendOptions()
735 | options.method = "POST"
736 | options.body = .json([
| `- error: cannot infer contextual base in reference to member 'json'
737 | "clientId": AnyCodable(currentClientId),
738 | "subscriptions": AnyCodable(keys)
[15/33] Compiling pocketbase RealtimeService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/RealtimeService.swift:736:25: error: cannot infer contextual base in reference to member 'json'
734 | var options = SendOptions()
735 | options.method = "POST"
736 | options.body = .json([
| `- error: cannot infer contextual base in reference to member 'json'
737 | "clientId": AnyCodable(currentClientId),
738 | "subscriptions": AnyCodable(keys)
[16/33] Compiling pocketbase JSONUtils.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
[17/33] Compiling pocketbase JWTUtils.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
[18/33] Compiling pocketbase Options.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
[19/33] Compiling pocketbase SSEParser.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:30:61: error: cannot find type 'URLSessionDataDelegate' in scope
28 | /// A dedicated session with a delegate is required: `URLSession.shared` has no
29 | /// delegate, so any bytes sent to it (such as an SSE stream) are discarded.
30 | final class URLSessionSSETransport: NSObject, SSETransport, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
31 | /// Called for every frame parsed from the stream.
32 | var onEvent: (@Sendable (SSEEvent) -> Void)?
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:37:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | private let lock = NSRecursiveLock()
37 | private let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | private var session: URLSession?
39 | private var parser = SSEParser()
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/pocketbase/Tools/SSETransport.swift:38:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | private let lock = NSRecursiveLock()
37 | private let configuration: URLSessionConfiguration
38 | private var session: URLSession?
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | private var parser = SSEParser()
40 | private var task: URLSessionDataTask?
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/pocketbase/Tools/SSETransport.swift:40:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | private var session: URLSession?
39 | private var parser = SSEParser()
40 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | private var isCancelled = false
42 | private var didReportDisconnect = false
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:135:50: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:132:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter completionHandler: Receives the disposition for the response.
131 | func urlSession(
132 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
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/pocketbase/Tools/SSETransport.swift:133:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
131 | func urlSession(
132 | _ session: URLSession,
133 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 | didReceive response: URLResponse,
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:134:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
132 | _ session: URLSession,
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
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/pocketbase/Tools/SSETransport.swift:162:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
160 | /// - Parameter data: The newly received bytes.
161 | func urlSession(
162 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
163 | dataTask: URLSessionDataTask,
164 | didReceive data: Data
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/pocketbase/Tools/SSETransport.swift:163:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
161 | func urlSession(
162 | _ session: URLSession,
163 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
164 | didReceive data: Data
165 | ) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:182:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | /// - Parameter error: The failure, or `nil` for a clean end of stream.
181 | func urlSession(
182 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | task: URLSessionTask,
184 | didCompleteWithError error: Error?
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/pocketbase/Tools/SSETransport.swift:183:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | func urlSession(
182 | _ session: URLSession,
183 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | didCompleteWithError error: Error?
185 | ) {
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/pocketbase/Tools/SSETransport.swift:46:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
44 | /// Creates a transport backed by an ephemeral `URLSession`.
45 | override init() {
46 | let configuration = URLSessionConfiguration.ephemeral
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
47 | configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
48 | // SSE is long-lived; only fail an idle connection when the peer is
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:47:45: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
45 | override init() {
46 | let configuration = URLSessionConfiguration.ephemeral
47 | configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
48 | // SSE is long-lived; only fail an idle connection when the peer is
49 | // genuinely dead.
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:57:18: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
55 |
56 | deinit {
57 | session?.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
58 | }
59 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:67:23: error: cannot find 'URLRequest' in scope
65 | /// - Parameter headers: Additional request headers.
66 | func connect(url: URL, headers: [String: String]) {
67 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
68 | request.httpMethod = "GET"
69 | request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:80:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
78 | parser = SSEParser()
79 | if session == nil {
80 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
81 | }
82 | let session = session!
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:80:95: error: 'nil' requires a contextual type
78 | parser = SSEParser()
79 | if session == nil {
80 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
81 | }
82 | let session = session!
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:83:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
81 | }
82 | let session = session!
83 | let task = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
84 | self.task = task
85 | lock.unlock()
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:97:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
95 | self.task = nil
96 | lock.unlock()
97 | task?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
98 | invalidateSession()
99 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:111:18: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
109 | self.session = nil
110 | lock.unlock()
111 | session?.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
112 | }
113 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:137:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:137:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
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/pocketbase/Tools/SSETransport.swift:139:32: error: cannot infer contextual base in reference to member 'cancel'
137 | guard let http = response as? HTTPURLResponse else {
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
140 | return
141 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:143:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
141 | }
142 |
143 | guard (200..<300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:145:27: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
143 | guard (200..<300).contains(http.statusCode) else {
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
146 | status: http.statusCode,
147 | message: "Realtime connection failed with status \(http.statusCode)."
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:146:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
146 | status: http.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
147 | message: "Realtime connection failed with status \(http.statusCode)."
148 | ))
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:147:73: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
145 | url: http.url?.absoluteString ?? "",
146 | status: http.statusCode,
147 | message: "Realtime connection failed with status \(http.statusCode)."
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
148 | ))
149 | completionHandler(.cancel)
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:149:32: error: cannot infer contextual base in reference to member 'cancel'
147 | message: "Realtime connection failed with status \(http.statusCode)."
148 | ))
149 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
150 | return
151 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:153:28: error: cannot infer contextual base in reference to member 'allow'
151 | }
152 |
153 | completionHandler(.allow)
| `- error: cannot infer contextual base in reference to member 'allow'
154 | }
155 |
[20/33] Compiling pocketbase SSETransport.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:30:61: error: cannot find type 'URLSessionDataDelegate' in scope
28 | /// A dedicated session with a delegate is required: `URLSession.shared` has no
29 | /// delegate, so any bytes sent to it (such as an SSE stream) are discarded.
30 | final class URLSessionSSETransport: NSObject, SSETransport, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
31 | /// Called for every frame parsed from the stream.
32 | var onEvent: (@Sendable (SSEEvent) -> Void)?
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:37:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | private let lock = NSRecursiveLock()
37 | private let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | private var session: URLSession?
39 | private var parser = SSEParser()
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/pocketbase/Tools/SSETransport.swift:38:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | private let lock = NSRecursiveLock()
37 | private let configuration: URLSessionConfiguration
38 | private var session: URLSession?
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | private var parser = SSEParser()
40 | private var task: URLSessionDataTask?
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/pocketbase/Tools/SSETransport.swift:40:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | private var session: URLSession?
39 | private var parser = SSEParser()
40 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | private var isCancelled = false
42 | private var didReportDisconnect = false
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:135:50: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:132:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter completionHandler: Receives the disposition for the response.
131 | func urlSession(
132 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
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/pocketbase/Tools/SSETransport.swift:133:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
131 | func urlSession(
132 | _ session: URLSession,
133 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 | didReceive response: URLResponse,
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:134:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
132 | _ session: URLSession,
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
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/pocketbase/Tools/SSETransport.swift:162:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
160 | /// - Parameter data: The newly received bytes.
161 | func urlSession(
162 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
163 | dataTask: URLSessionDataTask,
164 | didReceive data: Data
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/pocketbase/Tools/SSETransport.swift:163:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
161 | func urlSession(
162 | _ session: URLSession,
163 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
164 | didReceive data: Data
165 | ) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:182:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | /// - Parameter error: The failure, or `nil` for a clean end of stream.
181 | func urlSession(
182 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | task: URLSessionTask,
184 | didCompleteWithError error: Error?
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/pocketbase/Tools/SSETransport.swift:183:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | func urlSession(
182 | _ session: URLSession,
183 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | didCompleteWithError error: Error?
185 | ) {
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/pocketbase/Tools/SSETransport.swift:46:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
44 | /// Creates a transport backed by an ephemeral `URLSession`.
45 | override init() {
46 | let configuration = URLSessionConfiguration.ephemeral
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
47 | configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
48 | // SSE is long-lived; only fail an idle connection when the peer is
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:47:45: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
45 | override init() {
46 | let configuration = URLSessionConfiguration.ephemeral
47 | configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
48 | // SSE is long-lived; only fail an idle connection when the peer is
49 | // genuinely dead.
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:57:18: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
55 |
56 | deinit {
57 | session?.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
58 | }
59 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:67:23: error: cannot find 'URLRequest' in scope
65 | /// - Parameter headers: Additional request headers.
66 | func connect(url: URL, headers: [String: String]) {
67 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
68 | request.httpMethod = "GET"
69 | request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:80:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
78 | parser = SSEParser()
79 | if session == nil {
80 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
81 | }
82 | let session = session!
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:80:95: error: 'nil' requires a contextual type
78 | parser = SSEParser()
79 | if session == nil {
80 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
81 | }
82 | let session = session!
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:83:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
81 | }
82 | let session = session!
83 | let task = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
84 | self.task = task
85 | lock.unlock()
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:97:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
95 | self.task = nil
96 | lock.unlock()
97 | task?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
98 | invalidateSession()
99 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:111:18: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
109 | self.session = nil
110 | lock.unlock()
111 | session?.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
112 | }
113 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:137:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:137:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
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/pocketbase/Tools/SSETransport.swift:139:32: error: cannot infer contextual base in reference to member 'cancel'
137 | guard let http = response as? HTTPURLResponse else {
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
140 | return
141 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:143:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
141 | }
142 |
143 | guard (200..<300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:145:27: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
143 | guard (200..<300).contains(http.statusCode) else {
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
146 | status: http.statusCode,
147 | message: "Realtime connection failed with status \(http.statusCode)."
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:146:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
146 | status: http.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
147 | message: "Realtime connection failed with status \(http.statusCode)."
148 | ))
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:147:73: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
145 | url: http.url?.absoluteString ?? "",
146 | status: http.statusCode,
147 | message: "Realtime connection failed with status \(http.statusCode)."
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
148 | ))
149 | completionHandler(.cancel)
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:149:32: error: cannot infer contextual base in reference to member 'cancel'
147 | message: "Realtime connection failed with status \(http.statusCode)."
148 | ))
149 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
150 | return
151 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:153:28: error: cannot infer contextual base in reference to member 'allow'
151 | }
152 |
153 | completionHandler(.allow)
| `- error: cannot infer contextual base in reference to member 'allow'
154 | }
155 |
[21/33] Compiling pocketbase pocketbase.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:30:61: error: cannot find type 'URLSessionDataDelegate' in scope
28 | /// A dedicated session with a delegate is required: `URLSession.shared` has no
29 | /// delegate, so any bytes sent to it (such as an SSE stream) are discarded.
30 | final class URLSessionSSETransport: NSObject, SSETransport, URLSessionDataDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionDataDelegate' in scope
31 | /// Called for every frame parsed from the stream.
32 | var onEvent: (@Sendable (SSEEvent) -> Void)?
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:37:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |
36 | private let lock = NSRecursiveLock()
37 | private let configuration: URLSessionConfiguration
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | private var session: URLSession?
39 | private var parser = SSEParser()
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/pocketbase/Tools/SSETransport.swift:38:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 | private let lock = NSRecursiveLock()
37 | private let configuration: URLSessionConfiguration
38 | private var session: URLSession?
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | private var parser = SSEParser()
40 | private var task: URLSessionDataTask?
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/pocketbase/Tools/SSETransport.swift:40:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | private var session: URLSession?
39 | private var parser = SSEParser()
40 | private var task: URLSessionDataTask?
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | private var isCancelled = false
42 | private var didReportDisconnect = false
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:135:50: error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
| `- error: 'ResponseDisposition' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:132:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | /// - Parameter completionHandler: Receives the disposition for the response.
131 | func urlSession(
132 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
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/pocketbase/Tools/SSETransport.swift:133:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
131 | func urlSession(
132 | _ session: URLSession,
133 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 | didReceive response: URLResponse,
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:134:30: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
132 | _ session: URLSession,
133 | dataTask: URLSessionDataTask,
134 | didReceive response: URLResponse,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
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/pocketbase/Tools/SSETransport.swift:162:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
160 | /// - Parameter data: The newly received bytes.
161 | func urlSession(
162 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
163 | dataTask: URLSessionDataTask,
164 | didReceive data: Data
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/pocketbase/Tools/SSETransport.swift:163:19: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
161 | func urlSession(
162 | _ session: URLSession,
163 | dataTask: URLSessionDataTask,
| `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
164 | didReceive data: Data
165 | ) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' 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 URLSessionDataTask = AnyObject
| `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:182:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
180 | /// - Parameter error: The failure, or `nil` for a clean end of stream.
181 | func urlSession(
182 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
183 | task: URLSessionTask,
184 | didCompleteWithError error: Error?
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/pocketbase/Tools/SSETransport.swift:183:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | func urlSession(
182 | _ session: URLSession,
183 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | didCompleteWithError error: Error?
185 | ) {
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/pocketbase/Tools/SSETransport.swift:46:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
44 | /// Creates a transport backed by an ephemeral `URLSession`.
45 | override init() {
46 | let configuration = URLSessionConfiguration.ephemeral
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
47 | configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
48 | // SSE is long-lived; only fail an idle connection when the peer is
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:47:45: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
45 | override init() {
46 | let configuration = URLSessionConfiguration.ephemeral
47 | configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalCacheData'
48 | // SSE is long-lived; only fail an idle connection when the peer is
49 | // genuinely dead.
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:57:18: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
55 |
56 | deinit {
57 | session?.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
58 | }
59 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:67:23: error: cannot find 'URLRequest' in scope
65 | /// - Parameter headers: Additional request headers.
66 | func connect(url: URL, headers: [String: String]) {
67 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
68 | request.httpMethod = "GET"
69 | request.setValue("text/event-stream", forHTTPHeaderField: "Accept")
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:80:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
78 | parser = SSEParser()
79 | if session == nil {
80 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
81 | }
82 | let session = session!
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:80:95: error: 'nil' requires a contextual type
78 | parser = SSEParser()
79 | if session == nil {
80 | session = URLSession(configuration: configuration, delegate: self, delegateQueue: nil)
| `- error: 'nil' requires a contextual type
81 | }
82 | let session = session!
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:83:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
81 | }
82 | let session = session!
83 | let task = session.dataTask(with: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
84 | self.task = task
85 | lock.unlock()
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:97:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
95 | self.task = nil
96 | lock.unlock()
97 | task?.cancel()
| `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
98 | invalidateSession()
99 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:111:18: error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
109 | self.session = nil
110 | lock.unlock()
111 | session?.invalidateAndCancel()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'invalidateAndCancel'
112 | }
113 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:137:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:137:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
135 | completionHandler: @escaping (URLSession.ResponseDisposition) -> Void
136 | ) {
137 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
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/pocketbase/Tools/SSETransport.swift:139:32: error: cannot infer contextual base in reference to member 'cancel'
137 | guard let http = response as? HTTPURLResponse else {
138 | reportDisconnect(ClientResponseError(message: "Invalid realtime response."))
139 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
140 | return
141 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:143:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
141 | }
142 |
143 | guard (200..<300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:145:27: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
143 | guard (200..<300).contains(http.statusCode) else {
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
146 | status: http.statusCode,
147 | message: "Realtime connection failed with status \(http.statusCode)."
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:146:30: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
144 | reportDisconnect(ClientResponseError(
145 | url: http.url?.absoluteString ?? "",
146 | status: http.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
147 | message: "Realtime connection failed with status \(http.statusCode)."
148 | ))
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:147:73: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
145 | url: http.url?.absoluteString ?? "",
146 | status: http.statusCode,
147 | message: "Realtime connection failed with status \(http.statusCode)."
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
148 | ))
149 | completionHandler(.cancel)
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:149:32: error: cannot infer contextual base in reference to member 'cancel'
147 | message: "Realtime connection failed with status \(http.statusCode)."
148 | ))
149 | completionHandler(.cancel)
| `- error: cannot infer contextual base in reference to member 'cancel'
150 | return
151 | }
/host/spi-builder-workspace/Sources/pocketbase/Tools/SSETransport.swift:153:28: error: cannot infer contextual base in reference to member 'allow'
151 | }
152 |
153 | completionHandler(.allow)
| `- error: cannot infer contextual base in reference to member 'allow'
154 | }
155 |
[22/33] Compiling pocketbase Client.swift
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:88:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | /// continues through the pipeline. Called before error statuses are
87 | /// converted into ``ClientResponseError``.
88 | open var afterSend: (@Sendable (HTTPURLResponse, Data, SendOptions) async throws -> Data)?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
89 |
90 | private let lock = NSRecursiveLock()
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/pocketbase/Client.swift:457:23: error: cannot find 'URLRequest' in scope
455 | }
456 |
457 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
458 | request.httpMethod = initOptions.method ?? "GET"
459 |
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:504:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
502 |
503 | let data: Data
504 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
505 | do {
506 | (data, response) = try await withTaskCancellationHandler {
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/pocketbase/Client.swift:520:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
518 | }
519 |
520 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
521 | throw ClientResponseError(url: urlString, status: 0, message: "Invalid server response")
522 | }
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:520:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
518 | }
519 |
520 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
521 | throw ClientResponseError(url: urlString, status: 0, message: "Invalid server response")
522 | }
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/pocketbase/Client.swift:531:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
529 | throw ClientResponseError(
530 | wrapping: error,
531 | url: httpResponse.url?.absoluteString ?? urlString
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
532 | )
533 | }
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:536:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
534 | }
535 |
536 | if httpResponse.statusCode >= 400 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
537 | var responseDict: [String: AnyCodable] = [:]
538 | if let jsonObj = try? JSONDecoder().decode([String: AnyCodable].self, from: finalData) {
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:542:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
540 | }
541 | throw ClientResponseError(
542 | url: httpResponse.url?.absoluteString ?? urlString,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
543 | status: httpResponse.statusCode,
544 | response: responseDict
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:543:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
541 | throw ClientResponseError(
542 | url: httpResponse.url?.absoluteString ?? urlString,
543 | status: httpResponse.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
544 | response: responseDict
545 | )
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:548:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
546 | }
547 |
548 | return (finalData, httpResponse.url ?? url)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
549 | }
550 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/BackupService.swift:28:31: error: cannot infer contextual base in reference to member 'json'
26 | var opt = options ?? SendOptions()
27 | opt.applyDefaultMethod("POST")
28 | opt.applyDefaultBody(.json(["name": AnyCodable(basename)]))
| `- error: cannot infer contextual base in reference to member 'json'
29 | let _: Data = try await client.sendRaw(path: "/api/backups", options: opt)
30 | return true
[23/33] Compiling pocketbase ClientResponseError.swift
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:88:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | /// continues through the pipeline. Called before error statuses are
87 | /// converted into ``ClientResponseError``.
88 | open var afterSend: (@Sendable (HTTPURLResponse, Data, SendOptions) async throws -> Data)?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
89 |
90 | private let lock = NSRecursiveLock()
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/pocketbase/Client.swift:457:23: error: cannot find 'URLRequest' in scope
455 | }
456 |
457 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
458 | request.httpMethod = initOptions.method ?? "GET"
459 |
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:504:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
502 |
503 | let data: Data
504 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
505 | do {
506 | (data, response) = try await withTaskCancellationHandler {
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/pocketbase/Client.swift:520:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
518 | }
519 |
520 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
521 | throw ClientResponseError(url: urlString, status: 0, message: "Invalid server response")
522 | }
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:520:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
518 | }
519 |
520 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
521 | throw ClientResponseError(url: urlString, status: 0, message: "Invalid server response")
522 | }
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/pocketbase/Client.swift:531:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
529 | throw ClientResponseError(
530 | wrapping: error,
531 | url: httpResponse.url?.absoluteString ?? urlString
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
532 | )
533 | }
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:536:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
534 | }
535 |
536 | if httpResponse.statusCode >= 400 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
537 | var responseDict: [String: AnyCodable] = [:]
538 | if let jsonObj = try? JSONDecoder().decode([String: AnyCodable].self, from: finalData) {
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:542:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
540 | }
541 | throw ClientResponseError(
542 | url: httpResponse.url?.absoluteString ?? urlString,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
543 | status: httpResponse.statusCode,
544 | response: responseDict
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:543:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
541 | throw ClientResponseError(
542 | url: httpResponse.url?.absoluteString ?? urlString,
543 | status: httpResponse.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
544 | response: responseDict
545 | )
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:548:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
546 | }
547 |
548 | return (finalData, httpResponse.url ?? url)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
549 | }
550 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/BackupService.swift:28:31: error: cannot infer contextual base in reference to member 'json'
26 | var opt = options ?? SendOptions()
27 | opt.applyDefaultMethod("POST")
28 | opt.applyDefaultBody(.json(["name": AnyCodable(basename)]))
| `- error: cannot infer contextual base in reference to member 'json'
29 | let _: Data = try await client.sendRaw(path: "/api/backups", options: opt)
30 | return true
[24/33] Compiling pocketbase BackupService.swift
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:88:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | /// continues through the pipeline. Called before error statuses are
87 | /// converted into ``ClientResponseError``.
88 | open var afterSend: (@Sendable (HTTPURLResponse, Data, SendOptions) async throws -> Data)?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
89 |
90 | private let lock = NSRecursiveLock()
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/pocketbase/Client.swift:457:23: error: cannot find 'URLRequest' in scope
455 | }
456 |
457 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
458 | request.httpMethod = initOptions.method ?? "GET"
459 |
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:504:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
502 |
503 | let data: Data
504 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
505 | do {
506 | (data, response) = try await withTaskCancellationHandler {
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/pocketbase/Client.swift:520:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
518 | }
519 |
520 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
521 | throw ClientResponseError(url: urlString, status: 0, message: "Invalid server response")
522 | }
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:520:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
518 | }
519 |
520 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
521 | throw ClientResponseError(url: urlString, status: 0, message: "Invalid server response")
522 | }
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/pocketbase/Client.swift:531:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
529 | throw ClientResponseError(
530 | wrapping: error,
531 | url: httpResponse.url?.absoluteString ?? urlString
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
532 | )
533 | }
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:536:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
534 | }
535 |
536 | if httpResponse.statusCode >= 400 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
537 | var responseDict: [String: AnyCodable] = [:]
538 | if let jsonObj = try? JSONDecoder().decode([String: AnyCodable].self, from: finalData) {
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:542:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
540 | }
541 | throw ClientResponseError(
542 | url: httpResponse.url?.absoluteString ?? urlString,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
543 | status: httpResponse.statusCode,
544 | response: responseDict
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:543:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
541 | throw ClientResponseError(
542 | url: httpResponse.url?.absoluteString ?? urlString,
543 | status: httpResponse.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
544 | response: responseDict
545 | )
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:548:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
546 | }
547 |
548 | return (finalData, httpResponse.url ?? url)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
549 | }
550 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/BackupService.swift:28:31: error: cannot infer contextual base in reference to member 'json'
26 | var opt = options ?? SendOptions()
27 | opt.applyDefaultMethod("POST")
28 | opt.applyDefaultBody(.json(["name": AnyCodable(basename)]))
| `- error: cannot infer contextual base in reference to member 'json'
29 | let _: Data = try await client.sendRaw(path: "/api/backups", options: opt)
30 | return true
[25/33] Compiling pocketbase BaseService.swift
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:88:37: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | /// continues through the pipeline. Called before error statuses are
87 | /// converted into ``ClientResponseError``.
88 | open var afterSend: (@Sendable (HTTPURLResponse, Data, SendOptions) async throws -> Data)?
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
89 |
90 | private let lock = NSRecursiveLock()
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/pocketbase/Client.swift:457:23: error: cannot find 'URLRequest' in scope
455 | }
456 |
457 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
458 | request.httpMethod = initOptions.method ?? "GET"
459 |
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:504:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
502 |
503 | let data: Data
504 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
505 | do {
506 | (data, response) = try await withTaskCancellationHandler {
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/pocketbase/Client.swift:520:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
518 | }
519 |
520 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
521 | throw ClientResponseError(url: urlString, status: 0, message: "Invalid server response")
522 | }
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:520:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
518 | }
519 |
520 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
521 | throw ClientResponseError(url: urlString, status: 0, message: "Invalid server response")
522 | }
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/pocketbase/Client.swift:531:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
529 | throw ClientResponseError(
530 | wrapping: error,
531 | url: httpResponse.url?.absoluteString ?? urlString
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
532 | )
533 | }
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:536:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
534 | }
535 |
536 | if httpResponse.statusCode >= 400 {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
537 | var responseDict: [String: AnyCodable] = [:]
538 | if let jsonObj = try? JSONDecoder().decode([String: AnyCodable].self, from: finalData) {
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:542:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
540 | }
541 | throw ClientResponseError(
542 | url: httpResponse.url?.absoluteString ?? urlString,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
543 | status: httpResponse.statusCode,
544 | response: responseDict
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:543:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
541 | throw ClientResponseError(
542 | url: httpResponse.url?.absoluteString ?? urlString,
543 | status: httpResponse.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
544 | response: responseDict
545 | )
/host/spi-builder-workspace/Sources/pocketbase/Client.swift:548:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
546 | }
547 |
548 | return (finalData, httpResponse.url ?? url)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'url'
549 | }
550 |
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/BackupService.swift:28:31: error: cannot infer contextual base in reference to member 'json'
26 | var opt = options ?? SendOptions()
27 | opt.applyDefaultMethod("POST")
28 | opt.applyDefaultBody(.json(["name": AnyCodable(basename)]))
| `- error: cannot infer contextual base in reference to member 'json'
29 | let _: Data = try await client.sendRaw(path: "/api/backups", options: opt)
30 | return true
[26/33] Compiling pocketbase CancellationHandle.swift
[27/33] Compiling pocketbase CookieUtils.swift
[28/33] Compiling pocketbase DTOs.swift
[29/33] Compiling pocketbase FormDataUtils.swift
[30/33] Compiling pocketbase RecordService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:275:31: error: cannot infer contextual base in reference to member 'json'
273 | var opt = options ?? SendOptions()
274 | opt.applyDefaultMethod("POST")
275 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
276 | "identity": AnyCodable(usernameOrEmail),
277 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:346:31: error: cannot infer contextual base in reference to member 'json'
344 | bodyDict["createData"] = AnyCodable(createData)
345 | }
346 | opt.applyDefaultBody(.json(bodyDict))
| `- error: cannot infer contextual base in reference to member 'json'
347 |
348 | let respData: [String: AnyCodable] = try await client.send(path: "\(baseCollectionPath)/auth-with-oauth2", options: opt)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:497:31: error: cannot infer contextual base in reference to member 'json'
495 | var opt = options ?? SendOptions()
496 | opt.applyDefaultMethod("POST")
497 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
498 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-password-reset", options: opt)
499 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:519:31: error: cannot infer contextual base in reference to member 'json'
517 | var opt = options ?? SendOptions()
518 | opt.applyDefaultMethod("POST")
519 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
520 | "token": AnyCodable(passwordResetToken),
521 | "password": AnyCodable(password),
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:538:31: error: cannot infer contextual base in reference to member 'json'
536 | var opt = options ?? SendOptions()
537 | opt.applyDefaultMethod("POST")
538 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
539 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-verification", options: opt)
540 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:557:31: error: cannot infer contextual base in reference to member 'json'
555 | var opt = options ?? SendOptions()
556 | opt.applyDefaultMethod("POST")
557 | opt.applyDefaultBody(.json(["token": AnyCodable(verificationToken)]))
| `- error: cannot infer contextual base in reference to member 'json'
558 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/confirm-verification", options: opt)
559 |
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:582:31: error: cannot infer contextual base in reference to member 'json'
580 | var opt = options ?? SendOptions()
581 | opt.applyDefaultMethod("POST")
582 | opt.applyDefaultBody(.json(["newEmail": AnyCodable(newEmail)]))
| `- error: cannot infer contextual base in reference to member 'json'
583 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-email-change", options: opt)
584 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:601:31: error: cannot infer contextual base in reference to member 'json'
599 | var opt = options ?? SendOptions()
600 | opt.applyDefaultMethod("POST")
601 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
602 | "token": AnyCodable(emailChangeToken),
603 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:627:31: error: cannot infer contextual base in reference to member 'json'
625 | var opt = options ?? SendOptions()
626 | opt.applyDefaultMethod("POST")
627 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
628 | return try await client.send(path: "\(baseCollectionPath)/request-otp", options: opt)
629 | }
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:644:31: error: cannot infer contextual base in reference to member 'json'
642 | var opt = options ?? SendOptions()
643 | opt.applyDefaultMethod("POST")
644 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
645 | "otpId": AnyCodable(otpId),
646 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:669:31: error: cannot infer contextual base in reference to member 'json'
667 | var opt = options ?? SendOptions()
668 | opt.applyDefaultMethod("POST")
669 | opt.applyDefaultBody(.json(["duration": AnyCodable(duration)]))
| `- error: cannot infer contextual base in reference to member 'json'
670 |
671 | if opt.headers["Authorization"] == nil {
/host/spi-builder-workspace/Sources/pocketbase/Services/SQLService.swift:18:31: error: cannot infer contextual base in reference to member 'json'
16 | var opt = options ?? SendOptions()
17 | opt.applyDefaultMethod("POST")
18 | opt.applyDefaultBody(.json(["query": AnyCodable(query)]))
| `- error: cannot infer contextual base in reference to member 'json'
19 | return try await client.send(path: "/api/sql", options: opt)
20 | }
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:40:31: error: cannot infer contextual base in reference to member 'json'
38 | var opt = options ?? SendOptions()
39 | opt.applyDefaultMethod("POST")
40 | opt.applyDefaultBody(.json(["filesystem": AnyCodable(filesystem)]))
| `- error: cannot infer contextual base in reference to member 'json'
41 | let _: Data = try await client.sendRaw(path: "/api/settings/test/s3", options: opt)
42 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:56:31: error: cannot infer contextual base in reference to member 'json'
54 | var opt = options ?? SendOptions()
55 | opt.applyDefaultMethod("POST")
56 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
57 | "email": AnyCodable(toEmail),
58 | "template": AnyCodable(emailTemplate),
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:85:31: error: cannot infer contextual base in reference to member 'json'
83 | var opt = options ?? SendOptions()
84 | opt.applyDefaultMethod("POST")
85 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
86 | "clientId": AnyCodable(clientId),
87 | "teamId": AnyCodable(teamId),
[31/33] Compiling pocketbase SQLService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:275:31: error: cannot infer contextual base in reference to member 'json'
273 | var opt = options ?? SendOptions()
274 | opt.applyDefaultMethod("POST")
275 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
276 | "identity": AnyCodable(usernameOrEmail),
277 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:346:31: error: cannot infer contextual base in reference to member 'json'
344 | bodyDict["createData"] = AnyCodable(createData)
345 | }
346 | opt.applyDefaultBody(.json(bodyDict))
| `- error: cannot infer contextual base in reference to member 'json'
347 |
348 | let respData: [String: AnyCodable] = try await client.send(path: "\(baseCollectionPath)/auth-with-oauth2", options: opt)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:497:31: error: cannot infer contextual base in reference to member 'json'
495 | var opt = options ?? SendOptions()
496 | opt.applyDefaultMethod("POST")
497 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
498 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-password-reset", options: opt)
499 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:519:31: error: cannot infer contextual base in reference to member 'json'
517 | var opt = options ?? SendOptions()
518 | opt.applyDefaultMethod("POST")
519 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
520 | "token": AnyCodable(passwordResetToken),
521 | "password": AnyCodable(password),
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:538:31: error: cannot infer contextual base in reference to member 'json'
536 | var opt = options ?? SendOptions()
537 | opt.applyDefaultMethod("POST")
538 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
539 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-verification", options: opt)
540 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:557:31: error: cannot infer contextual base in reference to member 'json'
555 | var opt = options ?? SendOptions()
556 | opt.applyDefaultMethod("POST")
557 | opt.applyDefaultBody(.json(["token": AnyCodable(verificationToken)]))
| `- error: cannot infer contextual base in reference to member 'json'
558 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/confirm-verification", options: opt)
559 |
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:582:31: error: cannot infer contextual base in reference to member 'json'
580 | var opt = options ?? SendOptions()
581 | opt.applyDefaultMethod("POST")
582 | opt.applyDefaultBody(.json(["newEmail": AnyCodable(newEmail)]))
| `- error: cannot infer contextual base in reference to member 'json'
583 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-email-change", options: opt)
584 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:601:31: error: cannot infer contextual base in reference to member 'json'
599 | var opt = options ?? SendOptions()
600 | opt.applyDefaultMethod("POST")
601 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
602 | "token": AnyCodable(emailChangeToken),
603 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:627:31: error: cannot infer contextual base in reference to member 'json'
625 | var opt = options ?? SendOptions()
626 | opt.applyDefaultMethod("POST")
627 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
628 | return try await client.send(path: "\(baseCollectionPath)/request-otp", options: opt)
629 | }
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:644:31: error: cannot infer contextual base in reference to member 'json'
642 | var opt = options ?? SendOptions()
643 | opt.applyDefaultMethod("POST")
644 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
645 | "otpId": AnyCodable(otpId),
646 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:669:31: error: cannot infer contextual base in reference to member 'json'
667 | var opt = options ?? SendOptions()
668 | opt.applyDefaultMethod("POST")
669 | opt.applyDefaultBody(.json(["duration": AnyCodable(duration)]))
| `- error: cannot infer contextual base in reference to member 'json'
670 |
671 | if opt.headers["Authorization"] == nil {
/host/spi-builder-workspace/Sources/pocketbase/Services/SQLService.swift:18:31: error: cannot infer contextual base in reference to member 'json'
16 | var opt = options ?? SendOptions()
17 | opt.applyDefaultMethod("POST")
18 | opt.applyDefaultBody(.json(["query": AnyCodable(query)]))
| `- error: cannot infer contextual base in reference to member 'json'
19 | return try await client.send(path: "/api/sql", options: opt)
20 | }
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:40:31: error: cannot infer contextual base in reference to member 'json'
38 | var opt = options ?? SendOptions()
39 | opt.applyDefaultMethod("POST")
40 | opt.applyDefaultBody(.json(["filesystem": AnyCodable(filesystem)]))
| `- error: cannot infer contextual base in reference to member 'json'
41 | let _: Data = try await client.sendRaw(path: "/api/settings/test/s3", options: opt)
42 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:56:31: error: cannot infer contextual base in reference to member 'json'
54 | var opt = options ?? SendOptions()
55 | opt.applyDefaultMethod("POST")
56 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
57 | "email": AnyCodable(toEmail),
58 | "template": AnyCodable(emailTemplate),
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:85:31: error: cannot infer contextual base in reference to member 'json'
83 | var opt = options ?? SendOptions()
84 | opt.applyDefaultMethod("POST")
85 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
86 | "clientId": AnyCodable(clientId),
87 | "teamId": AnyCodable(teamId),
[32/33] Compiling pocketbase SettingsService.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:275:31: error: cannot infer contextual base in reference to member 'json'
273 | var opt = options ?? SendOptions()
274 | opt.applyDefaultMethod("POST")
275 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
276 | "identity": AnyCodable(usernameOrEmail),
277 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:346:31: error: cannot infer contextual base in reference to member 'json'
344 | bodyDict["createData"] = AnyCodable(createData)
345 | }
346 | opt.applyDefaultBody(.json(bodyDict))
| `- error: cannot infer contextual base in reference to member 'json'
347 |
348 | let respData: [String: AnyCodable] = try await client.send(path: "\(baseCollectionPath)/auth-with-oauth2", options: opt)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:497:31: error: cannot infer contextual base in reference to member 'json'
495 | var opt = options ?? SendOptions()
496 | opt.applyDefaultMethod("POST")
497 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
498 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-password-reset", options: opt)
499 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:519:31: error: cannot infer contextual base in reference to member 'json'
517 | var opt = options ?? SendOptions()
518 | opt.applyDefaultMethod("POST")
519 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
520 | "token": AnyCodable(passwordResetToken),
521 | "password": AnyCodable(password),
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:538:31: error: cannot infer contextual base in reference to member 'json'
536 | var opt = options ?? SendOptions()
537 | opt.applyDefaultMethod("POST")
538 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
539 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-verification", options: opt)
540 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:557:31: error: cannot infer contextual base in reference to member 'json'
555 | var opt = options ?? SendOptions()
556 | opt.applyDefaultMethod("POST")
557 | opt.applyDefaultBody(.json(["token": AnyCodable(verificationToken)]))
| `- error: cannot infer contextual base in reference to member 'json'
558 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/confirm-verification", options: opt)
559 |
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:582:31: error: cannot infer contextual base in reference to member 'json'
580 | var opt = options ?? SendOptions()
581 | opt.applyDefaultMethod("POST")
582 | opt.applyDefaultBody(.json(["newEmail": AnyCodable(newEmail)]))
| `- error: cannot infer contextual base in reference to member 'json'
583 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-email-change", options: opt)
584 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:601:31: error: cannot infer contextual base in reference to member 'json'
599 | var opt = options ?? SendOptions()
600 | opt.applyDefaultMethod("POST")
601 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
602 | "token": AnyCodable(emailChangeToken),
603 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:627:31: error: cannot infer contextual base in reference to member 'json'
625 | var opt = options ?? SendOptions()
626 | opt.applyDefaultMethod("POST")
627 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
628 | return try await client.send(path: "\(baseCollectionPath)/request-otp", options: opt)
629 | }
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:644:31: error: cannot infer contextual base in reference to member 'json'
642 | var opt = options ?? SendOptions()
643 | opt.applyDefaultMethod("POST")
644 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
645 | "otpId": AnyCodable(otpId),
646 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:669:31: error: cannot infer contextual base in reference to member 'json'
667 | var opt = options ?? SendOptions()
668 | opt.applyDefaultMethod("POST")
669 | opt.applyDefaultBody(.json(["duration": AnyCodable(duration)]))
| `- error: cannot infer contextual base in reference to member 'json'
670 |
671 | if opt.headers["Authorization"] == nil {
/host/spi-builder-workspace/Sources/pocketbase/Services/SQLService.swift:18:31: error: cannot infer contextual base in reference to member 'json'
16 | var opt = options ?? SendOptions()
17 | opt.applyDefaultMethod("POST")
18 | opt.applyDefaultBody(.json(["query": AnyCodable(query)]))
| `- error: cannot infer contextual base in reference to member 'json'
19 | return try await client.send(path: "/api/sql", options: opt)
20 | }
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:40:31: error: cannot infer contextual base in reference to member 'json'
38 | var opt = options ?? SendOptions()
39 | opt.applyDefaultMethod("POST")
40 | opt.applyDefaultBody(.json(["filesystem": AnyCodable(filesystem)]))
| `- error: cannot infer contextual base in reference to member 'json'
41 | let _: Data = try await client.sendRaw(path: "/api/settings/test/s3", options: opt)
42 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:56:31: error: cannot infer contextual base in reference to member 'json'
54 | var opt = options ?? SendOptions()
55 | opt.applyDefaultMethod("POST")
56 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
57 | "email": AnyCodable(toEmail),
58 | "template": AnyCodable(emailTemplate),
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:85:31: error: cannot infer contextual base in reference to member 'json'
83 | var opt = options ?? SendOptions()
84 | opt.applyDefaultMethod("POST")
85 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
86 | "clientId": AnyCodable(clientId),
87 | "teamId": AnyCodable(teamId),
[33/33] Compiling pocketbase AsyncAuthStore.swift
/host/spi-builder-workspace/Sources/pocketbase/Tools/Options.swift:19:43: error: cannot find type 'URLRequest' in scope
17 | /// cancellation-aware APIs such as `URLSession`, which the default transport
18 | /// relies on.
19 | public typealias CustomFetch = @Sendable (URLRequest) async throws -> (Data, URLResponse)
| `- error: cannot find type 'URLRequest' in scope
20 |
21 | /// A file payload for multipart form submissions.
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:275:31: error: cannot infer contextual base in reference to member 'json'
273 | var opt = options ?? SendOptions()
274 | opt.applyDefaultMethod("POST")
275 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
276 | "identity": AnyCodable(usernameOrEmail),
277 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:346:31: error: cannot infer contextual base in reference to member 'json'
344 | bodyDict["createData"] = AnyCodable(createData)
345 | }
346 | opt.applyDefaultBody(.json(bodyDict))
| `- error: cannot infer contextual base in reference to member 'json'
347 |
348 | let respData: [String: AnyCodable] = try await client.send(path: "\(baseCollectionPath)/auth-with-oauth2", options: opt)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:497:31: error: cannot infer contextual base in reference to member 'json'
495 | var opt = options ?? SendOptions()
496 | opt.applyDefaultMethod("POST")
497 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
498 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-password-reset", options: opt)
499 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:519:31: error: cannot infer contextual base in reference to member 'json'
517 | var opt = options ?? SendOptions()
518 | opt.applyDefaultMethod("POST")
519 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
520 | "token": AnyCodable(passwordResetToken),
521 | "password": AnyCodable(password),
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:538:31: error: cannot infer contextual base in reference to member 'json'
536 | var opt = options ?? SendOptions()
537 | opt.applyDefaultMethod("POST")
538 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
539 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-verification", options: opt)
540 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:557:31: error: cannot infer contextual base in reference to member 'json'
555 | var opt = options ?? SendOptions()
556 | opt.applyDefaultMethod("POST")
557 | opt.applyDefaultBody(.json(["token": AnyCodable(verificationToken)]))
| `- error: cannot infer contextual base in reference to member 'json'
558 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/confirm-verification", options: opt)
559 |
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:582:31: error: cannot infer contextual base in reference to member 'json'
580 | var opt = options ?? SendOptions()
581 | opt.applyDefaultMethod("POST")
582 | opt.applyDefaultBody(.json(["newEmail": AnyCodable(newEmail)]))
| `- error: cannot infer contextual base in reference to member 'json'
583 | let _: Data = try await client.sendRaw(path: "\(baseCollectionPath)/request-email-change", options: opt)
584 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:601:31: error: cannot infer contextual base in reference to member 'json'
599 | var opt = options ?? SendOptions()
600 | opt.applyDefaultMethod("POST")
601 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
602 | "token": AnyCodable(emailChangeToken),
603 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:627:31: error: cannot infer contextual base in reference to member 'json'
625 | var opt = options ?? SendOptions()
626 | opt.applyDefaultMethod("POST")
627 | opt.applyDefaultBody(.json(["email": AnyCodable(email)]))
| `- error: cannot infer contextual base in reference to member 'json'
628 | return try await client.send(path: "\(baseCollectionPath)/request-otp", options: opt)
629 | }
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:644:31: error: cannot infer contextual base in reference to member 'json'
642 | var opt = options ?? SendOptions()
643 | opt.applyDefaultMethod("POST")
644 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
645 | "otpId": AnyCodable(otpId),
646 | "password": AnyCodable(password)
/host/spi-builder-workspace/Sources/pocketbase/Services/RecordService.swift:669:31: error: cannot infer contextual base in reference to member 'json'
667 | var opt = options ?? SendOptions()
668 | opt.applyDefaultMethod("POST")
669 | opt.applyDefaultBody(.json(["duration": AnyCodable(duration)]))
| `- error: cannot infer contextual base in reference to member 'json'
670 |
671 | if opt.headers["Authorization"] == nil {
/host/spi-builder-workspace/Sources/pocketbase/Services/SQLService.swift:18:31: error: cannot infer contextual base in reference to member 'json'
16 | var opt = options ?? SendOptions()
17 | opt.applyDefaultMethod("POST")
18 | opt.applyDefaultBody(.json(["query": AnyCodable(query)]))
| `- error: cannot infer contextual base in reference to member 'json'
19 | return try await client.send(path: "/api/sql", options: opt)
20 | }
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:40:31: error: cannot infer contextual base in reference to member 'json'
38 | var opt = options ?? SendOptions()
39 | opt.applyDefaultMethod("POST")
40 | opt.applyDefaultBody(.json(["filesystem": AnyCodable(filesystem)]))
| `- error: cannot infer contextual base in reference to member 'json'
41 | let _: Data = try await client.sendRaw(path: "/api/settings/test/s3", options: opt)
42 | return true
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:56:31: error: cannot infer contextual base in reference to member 'json'
54 | var opt = options ?? SendOptions()
55 | opt.applyDefaultMethod("POST")
56 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
57 | "email": AnyCodable(toEmail),
58 | "template": AnyCodable(emailTemplate),
/host/spi-builder-workspace/Sources/pocketbase/Services/SettingsService.swift:85:31: error: cannot infer contextual base in reference to member 'json'
83 | var opt = options ?? SendOptions()
84 | opt.applyDefaultMethod("POST")
85 | opt.applyDefaultBody(.json([
| `- error: cannot infer contextual base in reference to member 'json'
86 | "clientId": AnyCodable(clientId),
87 | "teamId": AnyCodable(teamId),
BUILD FAILURE 6.3 wasm