Build Information
Failed to build Figranium, reference main (f740bb), with Swift 6.1 for Linux on 3 Nov 2026 03:56:06 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344843-1":/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:linux-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1Build Log
========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/figranium/figranium-swift.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/figranium/figranium-swift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at f740bbf fix: prevent API-key forwarding through URLSession redirects (#15)
Cloned https://github.com/figranium/figranium-swift.git
Revision (git rev-parse @):
f740bbf17ef2cb8cd24f857847b14cb4fdb72d27
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/figranium/figranium-swift.git at main
========================================
Build
========================================
Selected platform: linux
Swift version: 6.1
Building package at path: $PWD
https://github.com/figranium/figranium-swift.git
https://github.com/figranium/figranium-swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344843-1":/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:linux-6.1-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
linux-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:b6bfb4c5da2c5a0e111d7eb0c087cb4f5887cce9a34b7779faa557952c747cfc
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:linux-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling Figranium Models.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[4/10] Compiling Figranium AppIntents.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[5/11] Compiling Figranium Client.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/Figranium/Client.swift:18:48: error: cannot find type 'URLSessionTaskDelegate' in scope
16 | /// be forwarded to a different origin. A session-level delegate is required:
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
20 | completionHandler(nil)
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:140: error: cannot find type 'URLRequest' in scope
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
20 | completionHandler(nil)
21 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:182: error: cannot find type 'URLRequest' in scope
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
20 | completionHandler(nil)
21 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
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/Figranium/Client.swift:19:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
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/Figranium/Client.swift:19:103: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Figranium/Client.swift:26:146: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// Client for connecting to a self-hosted Figranium instance.
25 | public final class Figranium: @unchecked Sendable {
26 | let baseURL: URL; let authentication: FigraniumAuthentication; let defaultHeaders: [String: String]; let timeout: TimeInterval; let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | /// The auth value.
28 | public lazy var cookieStates = CookieStatesResource(client: self)
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/Figranium/Client.swift:38:191: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |
37 | /// Creates a new Figranium.
38 | public init(baseURL: URL = URL(string: "http://localhost:11345")!, authentication: FigraniumAuthentication = .none, headers: [String: String] = [:], timeout: TimeInterval = 30, session: URLSession = .shared) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
40 | self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout
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/Figranium/Client.swift:38:205: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
36 |
37 | /// Creates a new Figranium.
38 | public init(baseURL: URL = URL(string: "http://localhost:11345")!, authentication: FigraniumAuthentication = .none, headers: [String: String] = [:], timeout: TimeInterval = 30, session: URLSession = .shared) {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
39 | precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
40 | self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout
/host/spi-builder-workspace/Sources/Figranium/Client.swift:113:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 | }
112 | private static func sse(_ lines: [String]) -> StreamEvent<JSONValue>? { let data = lines.compactMap { $0.hasPrefix("data:") ? String($0.dropFirst(5)).trimmingCharacters(in: .whitespaces) : nil }.joined(separator: "\n"); guard !data.isEmpty else { return nil }; let value = (try? JSONDecoder().decode(JSONValue.self, from: Data(data.utf8))) ?? .string(data); return .init(data: value, event: lines.first(where: { $0.hasPrefix("event:") }).map { String($0.dropFirst(6)).trimmingCharacters(in: .whitespaces) }, id: lines.first(where: { $0.hasPrefix("id:") }).map { String($0.dropFirst(3)).trimmingCharacters(in: .whitespaces) }, retry: lines.first(where: { $0.hasPrefix("retry:") }).flatMap { Int($0.dropFirst(6).trimmingCharacters(in: .whitespaces)) }, raw: data) }
113 | private func error(from data: Data, response: HTTPURLResponse) -> FigraniumError { let object = try? JSONDecoder().decode(JSONObject.self, from: data); let message = object?["message"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? String(data: data, encoding: .utf8) ?? "Figranium request failed"; let code = object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } }; return .init(message: message, status: response.statusCode, code: code, details: object?["details"] ?? object?["detail"], requestID: response.value(forHTTPHeaderField: "x-request-id")) }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 | func pathID(_ value: String) -> String {
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/Figranium/Client.swift:20:27: error: 'nil' requires a contextual type
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
20 | completionHandler(nil)
| `- error: 'nil' requires a contextual type
21 | }
22 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:43:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
41 | // Preserve the caller's session configuration (including custom URLProtocol
42 | // classes) while enforcing a non-redirecting delegate for all requests.
43 | self.session = URLSession(configuration: session.configuration, delegate: RejectRedirectsDelegate(), delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
44 | }
45 | /// Creates a new Figranium.
/host/spi-builder-workspace/Sources/Figranium/Client.swift:43:58: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
41 | // Preserve the caller's session configuration (including custom URLProtocol
42 | // classes) while enforcing a non-redirecting delegate for all requests.
43 | self.session = URLSession(configuration: session.configuration, delegate: RejectRedirectsDelegate(), delegateQueue: nil)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
44 | }
45 | /// Creates a new Figranium.
/host/spi-builder-workspace/Sources/Figranium/Client.swift:43:125: error: 'nil' requires a contextual type
41 | // Preserve the caller's session configuration (including custom URLProtocol
42 | // classes) while enforcing a non-redirecting delegate for all requests.
43 | self.session = URLSession(configuration: session.configuration, delegate: RejectRedirectsDelegate(), delegateQueue: nil)
| `- error: 'nil' requires a contextual type
44 | }
45 | /// Creates a new Figranium.
/host/spi-builder-workspace/Sources/Figranium/Client.swift:77:23: error: cannot find 'URLRequest' in scope
75 | private func requestInternal<Value: Decodable & Sendable>(_ method: String, _ path: String, body: Data?, query: [String: String], options: RequestOptions) async throws -> Value {
76 | let url = try makeURL(path, query: query)
77 | var request = URLRequest(url: url); request.httpMethod = method; request.timeoutInterval = options.timeout ?? timeout
| `- error: cannot find 'URLRequest' in scope
78 | var headers = defaultHeaders; headers["accept"] = "application/json"; options.headers.forEach { headers[$0.key] = $0.value }
79 | if case let .apiKey(key, header) = authentication { headers[header] = header.lowercased() == "authorization" ? "Bearer \(key)" : key }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:89:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
87 | headers.forEach { request.setValue($0.value, forHTTPHeaderField: $0.key) }
88 | do {
89 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | guard let http = response as? HTTPURLResponse else { throw FigraniumError(message: "Figranium returned an invalid response", code: "NETWORK_ERROR") }
91 | if 300..<400 ~= http.statusCode { throw FigraniumError(message: "Refusing HTTP redirect for a Figranium request", status: http.statusCode, code: "REDIRECT_NOT_ALLOWED") }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:102:31: error: cannot find 'URLRequest' in scope
100 | AsyncThrowingStream { continuation in
101 | let task = Swift.Task { do {
102 | var request = URLRequest(url: try makeURL(path, query: query)); request.timeoutInterval = options.timeout ?? 0; request.setValue("text/event-stream", forHTTPHeaderField: "accept")
| `- error: cannot find 'URLRequest' in scope
103 | if case let .apiKey(key, header) = authentication { request.setValue(header.lowercased() == "authorization" ? "Bearer \(key)" : key, forHTTPHeaderField: header) }
104 | let (bytes, response) = try await session.bytes(for: request)
/host/spi-builder-workspace/Sources/Figranium/Client.swift:101:24: error: module 'Swift' has no member named 'Task'
99 | func stream(_ path: String, query: [String: String] = [:], options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> {
100 | AsyncThrowingStream { continuation in
101 | let task = Swift.Task { do {
| `- error: module 'Swift' has no member named 'Task'
102 | var request = URLRequest(url: try makeURL(path, query: query)); request.timeoutInterval = options.timeout ?? 0; request.setValue("text/event-stream", forHTTPHeaderField: "accept")
103 | if case let .apiKey(key, header) = authentication { request.setValue(header.lowercased() == "authorization" ? "Bearer \(key)" : key, forHTTPHeaderField: header) }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:113:558: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
111 | }
112 | private static func sse(_ lines: [String]) -> StreamEvent<JSONValue>? { let data = lines.compactMap { $0.hasPrefix("data:") ? String($0.dropFirst(5)).trimmingCharacters(in: .whitespaces) : nil }.joined(separator: "\n"); guard !data.isEmpty else { return nil }; let value = (try? JSONDecoder().decode(JSONValue.self, from: Data(data.utf8))) ?? .string(data); return .init(data: value, event: lines.first(where: { $0.hasPrefix("event:") }).map { String($0.dropFirst(6)).trimmingCharacters(in: .whitespaces) }, id: lines.first(where: { $0.hasPrefix("id:") }).map { String($0.dropFirst(3)).trimmingCharacters(in: .whitespaces) }, retry: lines.first(where: { $0.hasPrefix("retry:") }).flatMap { Int($0.dropFirst(6).trimmingCharacters(in: .whitespaces)) }, raw: data) }
113 | private func error(from data: Data, response: HTTPURLResponse) -> FigraniumError { let object = try? JSONDecoder().decode(JSONObject.self, from: data); let message = object?["message"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? String(data: data, encoding: .utf8) ?? "Figranium request failed"; let code = object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } }; return .init(message: message, status: response.statusCode, code: code, details: object?["details"] ?? object?["detail"], requestID: response.value(forHTTPHeaderField: "x-request-id")) }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
114 | }
115 | func pathID(_ value: String) -> String {
/host/spi-builder-workspace/Sources/Figranium/Client.swift:113:652: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
111 | }
112 | private static func sse(_ lines: [String]) -> StreamEvent<JSONValue>? { let data = lines.compactMap { $0.hasPrefix("data:") ? String($0.dropFirst(5)).trimmingCharacters(in: .whitespaces) : nil }.joined(separator: "\n"); guard !data.isEmpty else { return nil }; let value = (try? JSONDecoder().decode(JSONValue.self, from: Data(data.utf8))) ?? .string(data); return .init(data: value, event: lines.first(where: { $0.hasPrefix("event:") }).map { String($0.dropFirst(6)).trimmingCharacters(in: .whitespaces) }, id: lines.first(where: { $0.hasPrefix("id:") }).map { String($0.dropFirst(3)).trimmingCharacters(in: .whitespaces) }, retry: lines.first(where: { $0.hasPrefix("retry:") }).flatMap { Int($0.dropFirst(6).trimmingCharacters(in: .whitespaces)) }, raw: data) }
113 | private func error(from data: Data, response: HTTPURLResponse) -> FigraniumError { let object = try? JSONDecoder().decode(JSONObject.self, from: data); let message = object?["message"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? String(data: data, encoding: .utf8) ?? "Figranium request failed"; let code = object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } }; return .init(message: message, status: response.statusCode, code: code, details: object?["details"] ?? object?["detail"], requestID: response.value(forHTTPHeaderField: "x-request-id")) }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
114 | }
115 | func pathID(_ value: String) -> String {
[6/11] Compiling Figranium FoundationModels.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[7/11] Compiling Figranium ApiKeys.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[8/11] Compiling Figranium Resources.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/Figranium/Resources.swift:100:207: error: module 'Swift' has no member named 'Task'
98 | public func stream(runID: String, options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> { client.stream("/api/executions/stream", query: ["runId": runID], options: options) }
99 | /// Polls an execution and emits updates until it reaches a terminal outcome.
100 | public func watch(_ executionID: String, interval: Duration = .seconds(1), options: RequestOptions = .init()) -> AsyncThrowingStream<Execution, Error> { AsyncThrowingStream { continuation in let task = Swift.Task { do { var lastStatus: String?; while !Swift.Task.isCancelled { let value = try await get(executionID, options: options); if value.status != lastStatus { continuation.yield(value); lastStatus = value.status }; if ["success", "error", "stopped", "crashed", "anti_bot"].contains(value.outcome ?? value.status ?? "") { continuation.finish(); return }; try await Swift.Task.sleep(for: interval) } } catch { continuation.finish(throwing: error) } }; continuation.onTermination = { _ in task.cancel() } } }
| `- error: module 'Swift' has no member named 'Task'
101 | }
102 | /// API resource for schedules operations.
/host/spi-builder-workspace/Sources/Figranium/Resources.swift:100:257: error: module 'Swift' has no member named 'Task'
98 | public func stream(runID: String, options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> { client.stream("/api/executions/stream", query: ["runId": runID], options: options) }
99 | /// Polls an execution and emits updates until it reaches a terminal outcome.
100 | public func watch(_ executionID: String, interval: Duration = .seconds(1), options: RequestOptions = .init()) -> AsyncThrowingStream<Execution, Error> { AsyncThrowingStream { continuation in let task = Swift.Task { do { var lastStatus: String?; while !Swift.Task.isCancelled { let value = try await get(executionID, options: options); if value.status != lastStatus { continuation.yield(value); lastStatus = value.status }; if ["success", "error", "stopped", "crashed", "anti_bot"].contains(value.outcome ?? value.status ?? "") { continuation.finish(); return }; try await Swift.Task.sleep(for: interval) } } catch { continuation.finish(throwing: error) } }; continuation.onTermination = { _ in task.cancel() } } }
| `- error: module 'Swift' has no member named 'Task'
101 | }
102 | /// API resource for schedules operations.
[9/11] Compiling Figranium Templates.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
error: emit-module command failed with exit code 1 (use -v to see invocation)
[10/11] Emitting module Figranium
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/Sources/Figranium/Client.swift:18:48: error: cannot find type 'URLSessionTaskDelegate' in scope
16 | /// be forwarded to a different origin. A session-level delegate is required:
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
20 | completionHandler(nil)
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:140: error: cannot find type 'URLRequest' in scope
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
20 | completionHandler(nil)
21 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:182: error: cannot find type 'URLRequest' in scope
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
20 | completionHandler(nil)
21 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
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/Figranium/Client.swift:19:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
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/Figranium/Client.swift:19:103: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Figranium/Client.swift:26:146: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// Client for connecting to a self-hosted Figranium instance.
25 | public final class Figranium: @unchecked Sendable {
26 | let baseURL: URL; let authentication: FigraniumAuthentication; let defaultHeaders: [String: String]; let timeout: TimeInterval; let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | /// The auth value.
28 | public lazy var cookieStates = CookieStatesResource(client: self)
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/Figranium/Client.swift:38:191: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |
37 | /// Creates a new Figranium.
38 | public init(baseURL: URL = URL(string: "http://localhost:11345")!, authentication: FigraniumAuthentication = .none, headers: [String: String] = [:], timeout: TimeInterval = 30, session: URLSession = .shared) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
40 | self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout
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/Figranium/Client.swift:38:205: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
36 |
37 | /// Creates a new Figranium.
38 | public init(baseURL: URL = URL(string: "http://localhost:11345")!, authentication: FigraniumAuthentication = .none, headers: [String: String] = [:], timeout: TimeInterval = 30, session: URLSession = .shared) {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
39 | precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
40 | self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout
/host/spi-builder-workspace/Sources/Figranium/Client.swift:113:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 | }
112 | private static func sse(_ lines: [String]) -> StreamEvent<JSONValue>? { let data = lines.compactMap { $0.hasPrefix("data:") ? String($0.dropFirst(5)).trimmingCharacters(in: .whitespaces) : nil }.joined(separator: "\n"); guard !data.isEmpty else { return nil }; let value = (try? JSONDecoder().decode(JSONValue.self, from: Data(data.utf8))) ?? .string(data); return .init(data: value, event: lines.first(where: { $0.hasPrefix("event:") }).map { String($0.dropFirst(6)).trimmingCharacters(in: .whitespaces) }, id: lines.first(where: { $0.hasPrefix("id:") }).map { String($0.dropFirst(3)).trimmingCharacters(in: .whitespaces) }, retry: lines.first(where: { $0.hasPrefix("retry:") }).flatMap { Int($0.dropFirst(6).trimmingCharacters(in: .whitespaces)) }, raw: data) }
113 | private func error(from data: Data, response: HTTPURLResponse) -> FigraniumError { let object = try? JSONDecoder().decode(JSONObject.self, from: data); let message = object?["message"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? String(data: data, encoding: .utf8) ?? "Figranium request failed"; let code = object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } }; return .init(message: message, status: response.statusCode, code: code, details: object?["details"] ?? object?["detail"], requestID: response.value(forHTTPHeaderField: "x-request-id")) }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 | func pathID(_ value: String) -> String {
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
[11/11] Compiling Figranium Actions.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344843-1":/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:linux-6.1-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
linux-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:b6bfb4c5da2c5a0e111d7eb0c087cb4f5887cce9a34b7779faa557952c747cfc
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:linux-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/9] Compiling Figranium Resources.swift
/host/spi-builder-workspace/Sources/Figranium/Resources.swift:100:207: error: module 'Swift' has no member named 'Task'
98 | public func stream(runID: String, options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> { client.stream("/api/executions/stream", query: ["runId": runID], options: options) }
99 | /// Polls an execution and emits updates until it reaches a terminal outcome.
100 | public func watch(_ executionID: String, interval: Duration = .seconds(1), options: RequestOptions = .init()) -> AsyncThrowingStream<Execution, Error> { AsyncThrowingStream { continuation in let task = Swift.Task { do { var lastStatus: String?; while !Swift.Task.isCancelled { let value = try await get(executionID, options: options); if value.status != lastStatus { continuation.yield(value); lastStatus = value.status }; if ["success", "error", "stopped", "crashed", "anti_bot"].contains(value.outcome ?? value.status ?? "") { continuation.finish(); return }; try await Swift.Task.sleep(for: interval) } } catch { continuation.finish(throwing: error) } }; continuation.onTermination = { _ in task.cancel() } } }
| `- error: module 'Swift' has no member named 'Task'
101 | }
102 | /// API resource for schedules operations.
/host/spi-builder-workspace/Sources/Figranium/Resources.swift:100:257: error: module 'Swift' has no member named 'Task'
98 | public func stream(runID: String, options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> { client.stream("/api/executions/stream", query: ["runId": runID], options: options) }
99 | /// Polls an execution and emits updates until it reaches a terminal outcome.
100 | public func watch(_ executionID: String, interval: Duration = .seconds(1), options: RequestOptions = .init()) -> AsyncThrowingStream<Execution, Error> { AsyncThrowingStream { continuation in let task = Swift.Task { do { var lastStatus: String?; while !Swift.Task.isCancelled { let value = try await get(executionID, options: options); if value.status != lastStatus { continuation.yield(value); lastStatus = value.status }; if ["success", "error", "stopped", "crashed", "anti_bot"].contains(value.outcome ?? value.status ?? "") { continuation.finish(); return }; try await Swift.Task.sleep(for: interval) } } catch { continuation.finish(throwing: error) } }; continuation.onTermination = { _ in task.cancel() } } }
| `- error: module 'Swift' has no member named 'Task'
101 | }
102 | /// API resource for schedules operations.
[3/10] Compiling Figranium AppIntents.swift
[4/10] Compiling Figranium ApiKeys.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/10] Compiling Figranium Actions.swift
[6/10] Emitting module Figranium
/host/spi-builder-workspace/Sources/Figranium/Client.swift:18:48: error: cannot find type 'URLSessionTaskDelegate' in scope
16 | /// be forwarded to a different origin. A session-level delegate is required:
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
20 | completionHandler(nil)
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:140: error: cannot find type 'URLRequest' in scope
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
20 | completionHandler(nil)
21 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:182: error: cannot find type 'URLRequest' in scope
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
20 | completionHandler(nil)
21 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
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/Figranium/Client.swift:19:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
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/Figranium/Client.swift:19:103: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Figranium/Client.swift:26:146: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// Client for connecting to a self-hosted Figranium instance.
25 | public final class Figranium: @unchecked Sendable {
26 | let baseURL: URL; let authentication: FigraniumAuthentication; let defaultHeaders: [String: String]; let timeout: TimeInterval; let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | /// The auth value.
28 | public lazy var cookieStates = CookieStatesResource(client: self)
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/Figranium/Client.swift:38:191: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |
37 | /// Creates a new Figranium.
38 | public init(baseURL: URL = URL(string: "http://localhost:11345")!, authentication: FigraniumAuthentication = .none, headers: [String: String] = [:], timeout: TimeInterval = 30, session: URLSession = .shared) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
40 | self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout
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/Figranium/Client.swift:38:205: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
36 |
37 | /// Creates a new Figranium.
38 | public init(baseURL: URL = URL(string: "http://localhost:11345")!, authentication: FigraniumAuthentication = .none, headers: [String: String] = [:], timeout: TimeInterval = 30, session: URLSession = .shared) {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
39 | precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
40 | self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout
/host/spi-builder-workspace/Sources/Figranium/Client.swift:113:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 | }
112 | private static func sse(_ lines: [String]) -> StreamEvent<JSONValue>? { let data = lines.compactMap { $0.hasPrefix("data:") ? String($0.dropFirst(5)).trimmingCharacters(in: .whitespaces) : nil }.joined(separator: "\n"); guard !data.isEmpty else { return nil }; let value = (try? JSONDecoder().decode(JSONValue.self, from: Data(data.utf8))) ?? .string(data); return .init(data: value, event: lines.first(where: { $0.hasPrefix("event:") }).map { String($0.dropFirst(6)).trimmingCharacters(in: .whitespaces) }, id: lines.first(where: { $0.hasPrefix("id:") }).map { String($0.dropFirst(3)).trimmingCharacters(in: .whitespaces) }, retry: lines.first(where: { $0.hasPrefix("retry:") }).flatMap { Int($0.dropFirst(6).trimmingCharacters(in: .whitespaces)) }, raw: data) }
113 | private func error(from data: Data, response: HTTPURLResponse) -> FigraniumError { let object = try? JSONDecoder().decode(JSONObject.self, from: data); let message = object?["message"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? String(data: data, encoding: .utf8) ?? "Figranium request failed"; let code = object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } }; return .init(message: message, status: response.statusCode, code: code, details: object?["details"] ?? object?["detail"], requestID: response.value(forHTTPHeaderField: "x-request-id")) }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 | func pathID(_ value: String) -> String {
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
[7/10] Compiling Figranium Templates.swift
[8/10] Compiling Figranium FoundationModels.swift
[9/10] Compiling Figranium Client.swift
/host/spi-builder-workspace/Sources/Figranium/Client.swift:18:48: error: cannot find type 'URLSessionTaskDelegate' in scope
16 | /// be forwarded to a different origin. A session-level delegate is required:
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
20 | completionHandler(nil)
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:140: error: cannot find type 'URLRequest' in scope
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
20 | completionHandler(nil)
21 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:182: error: cannot find type 'URLRequest' in scope
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
20 | completionHandler(nil)
21 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:19:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
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/Figranium/Client.swift:19:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
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/Figranium/Client.swift:19:103: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 | /// per-task delegates do not reliably suppress redirects on all platforms.
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 | completionHandler(nil)
21 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Figranium/Client.swift:26:146: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | /// Client for connecting to a self-hosted Figranium instance.
25 | public final class Figranium: @unchecked Sendable {
26 | let baseURL: URL; let authentication: FigraniumAuthentication; let defaultHeaders: [String: String]; let timeout: TimeInterval; let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | /// The auth value.
28 | public lazy var cookieStates = CookieStatesResource(client: self)
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/Figranium/Client.swift:38:191: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |
37 | /// Creates a new Figranium.
38 | public init(baseURL: URL = URL(string: "http://localhost:11345")!, authentication: FigraniumAuthentication = .none, headers: [String: String] = [:], timeout: TimeInterval = 30, session: URLSession = .shared) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
39 | precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
40 | self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout
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/Figranium/Client.swift:38:205: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
36 |
37 | /// Creates a new Figranium.
38 | public init(baseURL: URL = URL(string: "http://localhost:11345")!, authentication: FigraniumAuthentication = .none, headers: [String: String] = [:], timeout: TimeInterval = 30, session: URLSession = .shared) {
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
39 | precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
40 | self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout
/host/spi-builder-workspace/Sources/Figranium/Client.swift:113:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 | }
112 | private static func sse(_ lines: [String]) -> StreamEvent<JSONValue>? { let data = lines.compactMap { $0.hasPrefix("data:") ? String($0.dropFirst(5)).trimmingCharacters(in: .whitespaces) : nil }.joined(separator: "\n"); guard !data.isEmpty else { return nil }; let value = (try? JSONDecoder().decode(JSONValue.self, from: Data(data.utf8))) ?? .string(data); return .init(data: value, event: lines.first(where: { $0.hasPrefix("event:") }).map { String($0.dropFirst(6)).trimmingCharacters(in: .whitespaces) }, id: lines.first(where: { $0.hasPrefix("id:") }).map { String($0.dropFirst(3)).trimmingCharacters(in: .whitespaces) }, retry: lines.first(where: { $0.hasPrefix("retry:") }).flatMap { Int($0.dropFirst(6).trimmingCharacters(in: .whitespaces)) }, raw: data) }
113 | private func error(from data: Data, response: HTTPURLResponse) -> FigraniumError { let object = try? JSONDecoder().decode(JSONObject.self, from: data); let message = object?["message"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? String(data: data, encoding: .utf8) ?? "Figranium request failed"; let code = object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } }; return .init(message: message, status: response.statusCode, code: code, details: object?["details"] ?? object?["detail"], requestID: response.value(forHTTPHeaderField: "x-request-id")) }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 | func pathID(_ value: String) -> String {
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/Figranium/Client.swift:20:27: error: 'nil' requires a contextual type
18 | final class RejectRedirectsDelegate: NSObject, URLSessionTaskDelegate, @unchecked Sendable {
19 | func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void) {
20 | completionHandler(nil)
| `- error: 'nil' requires a contextual type
21 | }
22 | }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:43:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
41 | // Preserve the caller's session configuration (including custom URLProtocol
42 | // classes) while enforcing a non-redirecting delegate for all requests.
43 | self.session = URLSession(configuration: session.configuration, delegate: RejectRedirectsDelegate(), delegateQueue: nil)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
44 | }
45 | /// Creates a new Figranium.
/host/spi-builder-workspace/Sources/Figranium/Client.swift:43:58: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
41 | // Preserve the caller's session configuration (including custom URLProtocol
42 | // classes) while enforcing a non-redirecting delegate for all requests.
43 | self.session = URLSession(configuration: session.configuration, delegate: RejectRedirectsDelegate(), delegateQueue: nil)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
44 | }
45 | /// Creates a new Figranium.
/host/spi-builder-workspace/Sources/Figranium/Client.swift:43:125: error: 'nil' requires a contextual type
41 | // Preserve the caller's session configuration (including custom URLProtocol
42 | // classes) while enforcing a non-redirecting delegate for all requests.
43 | self.session = URLSession(configuration: session.configuration, delegate: RejectRedirectsDelegate(), delegateQueue: nil)
| `- error: 'nil' requires a contextual type
44 | }
45 | /// Creates a new Figranium.
/host/spi-builder-workspace/Sources/Figranium/Client.swift:77:23: error: cannot find 'URLRequest' in scope
75 | private func requestInternal<Value: Decodable & Sendable>(_ method: String, _ path: String, body: Data?, query: [String: String], options: RequestOptions) async throws -> Value {
76 | let url = try makeURL(path, query: query)
77 | var request = URLRequest(url: url); request.httpMethod = method; request.timeoutInterval = options.timeout ?? timeout
| `- error: cannot find 'URLRequest' in scope
78 | var headers = defaultHeaders; headers["accept"] = "application/json"; options.headers.forEach { headers[$0.key] = $0.value }
79 | if case let .apiKey(key, header) = authentication { headers[header] = header.lowercased() == "authorization" ? "Bearer \(key)" : key }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:89:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
87 | headers.forEach { request.setValue($0.value, forHTTPHeaderField: $0.key) }
88 | do {
89 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
90 | guard let http = response as? HTTPURLResponse else { throw FigraniumError(message: "Figranium returned an invalid response", code: "NETWORK_ERROR") }
91 | if 300..<400 ~= http.statusCode { throw FigraniumError(message: "Refusing HTTP redirect for a Figranium request", status: http.statusCode, code: "REDIRECT_NOT_ALLOWED") }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:102:31: error: cannot find 'URLRequest' in scope
100 | AsyncThrowingStream { continuation in
101 | let task = Swift.Task { do {
102 | var request = URLRequest(url: try makeURL(path, query: query)); request.timeoutInterval = options.timeout ?? 0; request.setValue("text/event-stream", forHTTPHeaderField: "accept")
| `- error: cannot find 'URLRequest' in scope
103 | if case let .apiKey(key, header) = authentication { request.setValue(header.lowercased() == "authorization" ? "Bearer \(key)" : key, forHTTPHeaderField: header) }
104 | let (bytes, response) = try await session.bytes(for: request)
/host/spi-builder-workspace/Sources/Figranium/Client.swift:101:24: error: module 'Swift' has no member named 'Task'
99 | func stream(_ path: String, query: [String: String] = [:], options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> {
100 | AsyncThrowingStream { continuation in
101 | let task = Swift.Task { do {
| `- error: module 'Swift' has no member named 'Task'
102 | var request = URLRequest(url: try makeURL(path, query: query)); request.timeoutInterval = options.timeout ?? 0; request.setValue("text/event-stream", forHTTPHeaderField: "accept")
103 | if case let .apiKey(key, header) = authentication { request.setValue(header.lowercased() == "authorization" ? "Bearer \(key)" : key, forHTTPHeaderField: header) }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:113:558: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
111 | }
112 | private static func sse(_ lines: [String]) -> StreamEvent<JSONValue>? { let data = lines.compactMap { $0.hasPrefix("data:") ? String($0.dropFirst(5)).trimmingCharacters(in: .whitespaces) : nil }.joined(separator: "\n"); guard !data.isEmpty else { return nil }; let value = (try? JSONDecoder().decode(JSONValue.self, from: Data(data.utf8))) ?? .string(data); return .init(data: value, event: lines.first(where: { $0.hasPrefix("event:") }).map { String($0.dropFirst(6)).trimmingCharacters(in: .whitespaces) }, id: lines.first(where: { $0.hasPrefix("id:") }).map { String($0.dropFirst(3)).trimmingCharacters(in: .whitespaces) }, retry: lines.first(where: { $0.hasPrefix("retry:") }).flatMap { Int($0.dropFirst(6).trimmingCharacters(in: .whitespaces)) }, raw: data) }
113 | private func error(from data: Data, response: HTTPURLResponse) -> FigraniumError { let object = try? JSONDecoder().decode(JSONObject.self, from: data); let message = object?["message"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? String(data: data, encoding: .utf8) ?? "Figranium request failed"; let code = object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } }; return .init(message: message, status: response.statusCode, code: code, details: object?["details"] ?? object?["detail"], requestID: response.value(forHTTPHeaderField: "x-request-id")) }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
114 | }
115 | func pathID(_ value: String) -> String {
/host/spi-builder-workspace/Sources/Figranium/Client.swift:113:652: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
111 | }
112 | private static func sse(_ lines: [String]) -> StreamEvent<JSONValue>? { let data = lines.compactMap { $0.hasPrefix("data:") ? String($0.dropFirst(5)).trimmingCharacters(in: .whitespaces) : nil }.joined(separator: "\n"); guard !data.isEmpty else { return nil }; let value = (try? JSONDecoder().decode(JSONValue.self, from: Data(data.utf8))) ?? .string(data); return .init(data: value, event: lines.first(where: { $0.hasPrefix("event:") }).map { String($0.dropFirst(6)).trimmingCharacters(in: .whitespaces) }, id: lines.first(where: { $0.hasPrefix("id:") }).map { String($0.dropFirst(3)).trimmingCharacters(in: .whitespaces) }, retry: lines.first(where: { $0.hasPrefix("retry:") }).flatMap { Int($0.dropFirst(6).trimmingCharacters(in: .whitespaces)) }, raw: data) }
113 | private func error(from data: Data, response: HTTPURLResponse) -> FigraniumError { let object = try? JSONDecoder().decode(JSONObject.self, from: data); let message = object?["message"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } } ?? String(data: data, encoding: .utf8) ?? "Figranium request failed"; let code = object?["error"].flatMap { if case .string(let value) = $0 { value } else { nil } }; return .init(message: message, status: response.statusCode, code: code, details: object?["details"] ?? object?["detail"], requestID: response.value(forHTTPHeaderField: "x-request-id")) }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
114 | }
115 | func pathID(_ value: String) -> String {
[10/10] Compiling Figranium Models.swift
BUILD FAILURE 6.1 linux