The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Figranium, reference main (03ece8), with Swift 6.1 for Wasm on 12 Oct 2026 13:05:48 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 5.1.1
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 03ece8e docs: remove obsolete administration resource entries
Cloned https://github.com/figranium/figranium-swift.git
Revision (git rev-parse @):
03ece8e609ed0cc5bd8c8363f91dec2f4e5e65a2
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/figranium/figranium-swift.git at main
========================================
Build
========================================
Selected platform:         wasm
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-54344847-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:005e294ea72e7f7733559677ac003354f37dc6afb35c5bbab6bc9a95fc174f44
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/10] 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:17:146: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// Client for connecting to a self-hosted Figranium instance.
16 | public final class Figranium: @unchecked Sendable {
17 |     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.
18 |     /// The auth value.
19 |     public lazy var tasks = TasksResource(client: self); public lazy var executions = ExecutionsResource(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:28:191: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 |     /// Creates a new Figranium.
28 |     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.
29 |         precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
30 |         self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout; self.session = session
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:28:205: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
26 |
27 |     /// Creates a new Figranium.
28 |     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'
29 |         precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
30 |         self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout; self.session = session
/host/spi-builder-workspace/Sources/Figranium/Client.swift:83:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 |     }
82 |     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) }
83 |     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.
84 | }
85 | func pathID(_ value: String) -> String { value.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? value }
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
[4/10] 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
[5/10] 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
[6/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
[7/10] 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:48:207: error: module 'Swift' has no member named 'Task'
 46 |     public func stream(options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> { client.stream("/api/executions/stream", options: options) }
 47 |     /// Polls an execution and emits updates until it reaches a terminal outcome.
 48 |     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'
 49 | }
 50 | /// API resource for schedules operations.
/host/spi-builder-workspace/Sources/Figranium/Resources.swift:48:257: error: module 'Swift' has no member named 'Task'
 46 |     public func stream(options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> { client.stream("/api/executions/stream", options: options) }
 47 |     /// Polls an execution and emits updates until it reaches a terminal outcome.
 48 |     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'
 49 | }
 50 | /// API resource for schedules operations.
[8/10] 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
[9/10] 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:17:146: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// Client for connecting to a self-hosted Figranium instance.
16 | public final class Figranium: @unchecked Sendable {
17 |     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.
18 |     /// The auth value.
19 |     public lazy var tasks = TasksResource(client: self); public lazy var executions = ExecutionsResource(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:28:191: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 |     /// Creates a new Figranium.
28 |     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.
29 |         precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
30 |         self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout; self.session = session
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:28:205: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
26 |
27 |     /// Creates a new Figranium.
28 |     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'
29 |         precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
30 |         self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout; self.session = session
/host/spi-builder-workspace/Sources/Figranium/Client.swift:83:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 |     }
82 |     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) }
83 |     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.
84 | }
85 | func pathID(_ value: String) -> String { value.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? value }
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:56:23: error: cannot find 'URLRequest' in scope
54 |         if !query.isEmpty { components.queryItems = query.compactMap { $0.value.isEmpty ? nil : URLQueryItem(name: $0.key, value: $0.value) } }
55 |         guard let url = components.url else { throw FigraniumError(message: "Unable to construct Figranium request URL") }
56 |         var request = URLRequest(url: url); request.httpMethod = method; request.timeoutInterval = options.timeout ?? timeout
   |                       `- error: cannot find 'URLRequest' in scope
57 |         var headers = defaultHeaders; headers["accept"] = "application/json"; options.headers.forEach { headers[$0.key] = $0.value }
58 |         if case let .apiKey(key, header) = authentication { headers[header] = header.lowercased() == "authorization" ? "Bearer \(key)" : key }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:62:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
60 |         headers.forEach { request.setValue($0.value, forHTTPHeaderField: $0.key) }
61 |         do {
62 |             let (data, response) = try await session.data(for: request)
   |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
63 |             guard let http = response as? HTTPURLResponse else { throw FigraniumError(message: "Figranium returned an invalid response", code: "NETWORK_ERROR") }
64 |             guard 200..<300 ~= http.statusCode else { throw error(from: data, response: http) }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:74:31: error: cannot find 'URLRequest' in scope
72 |         AsyncThrowingStream { continuation in
73 |             let task = Swift.Task { do {
74 |                 var request = URLRequest(url: baseURL.appendingPathComponent(path.trimmingCharacters(in: CharacterSet(charactersIn: "/")))); request.timeoutInterval = options.timeout ?? 0; request.setValue("text/event-stream", forHTTPHeaderField: "accept")
   |                               `- error: cannot find 'URLRequest' in scope
75 |                 if case let .apiKey(key, header) = authentication { request.setValue(header.lowercased() == "authorization" ? "Bearer \(key)" : key, forHTTPHeaderField: header) }
76 |                 let (bytes, response) = try await session.bytes(for: request); guard let http = response as? HTTPURLResponse, 200..<300 ~= http.statusCode else { throw FigraniumError(message: "Unable to open Figranium stream", code: "NETWORK_ERROR") }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:73:24: error: module 'Swift' has no member named 'Task'
71 |     func stream(_ path: String, options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> {
72 |         AsyncThrowingStream { continuation in
73 |             let task = Swift.Task { do {
   |                        `- error: module 'Swift' has no member named 'Task'
74 |                 var request = URLRequest(url: baseURL.appendingPathComponent(path.trimmingCharacters(in: CharacterSet(charactersIn: "/")))); request.timeoutInterval = options.timeout ?? 0; request.setValue("text/event-stream", forHTTPHeaderField: "accept")
75 |                 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:83:558: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
81 |     }
82 |     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) }
83 |     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'
84 | }
85 | func pathID(_ value: String) -> String { value.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? value }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:83:652: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
81 |     }
82 |     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) }
83 |     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'
84 | }
85 | func pathID(_ value: String) -> String { value.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? value }
[10/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
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344847-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:005e294ea72e7f7733559677ac003354f37dc6afb35c5bbab6bc9a95fc174f44
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/9] Compiling Figranium Templates.swift
[3/9] Compiling Figranium Resources.swift
/host/spi-builder-workspace/Sources/Figranium/Resources.swift:48:207: error: module 'Swift' has no member named 'Task'
 46 |     public func stream(options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> { client.stream("/api/executions/stream", options: options) }
 47 |     /// Polls an execution and emits updates until it reaches a terminal outcome.
 48 |     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'
 49 | }
 50 | /// API resource for schedules operations.
/host/spi-builder-workspace/Sources/Figranium/Resources.swift:48:257: error: module 'Swift' has no member named 'Task'
 46 |     public func stream(options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> { client.stream("/api/executions/stream", options: options) }
 47 |     /// Polls an execution and emits updates until it reaches a terminal outcome.
 48 |     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'
 49 | }
 50 | /// API resource for schedules operations.
[4/9] Compiling Figranium Models.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/9] Compiling Figranium Actions.swift
[6/9] Compiling Figranium FoundationModels.swift
[7/9] Compiling Figranium AppIntents.swift
[8/9] Emitting module Figranium
/host/spi-builder-workspace/Sources/Figranium/Client.swift:17:146: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// Client for connecting to a self-hosted Figranium instance.
16 | public final class Figranium: @unchecked Sendable {
17 |     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.
18 |     /// The auth value.
19 |     public lazy var tasks = TasksResource(client: self); public lazy var executions = ExecutionsResource(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:28:191: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 |     /// Creates a new Figranium.
28 |     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.
29 |         precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
30 |         self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout; self.session = session
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:28:205: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
26 |
27 |     /// Creates a new Figranium.
28 |     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'
29 |         precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
30 |         self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout; self.session = session
/host/spi-builder-workspace/Sources/Figranium/Client.swift:83:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 |     }
82 |     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) }
83 |     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.
84 | }
85 | func pathID(_ value: String) -> String { value.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? value }
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
[9/9] Compiling Figranium Client.swift
/host/spi-builder-workspace/Sources/Figranium/Client.swift:17:146: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | /// Client for connecting to a self-hosted Figranium instance.
16 | public final class Figranium: @unchecked Sendable {
17 |     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.
18 |     /// The auth value.
19 |     public lazy var tasks = TasksResource(client: self); public lazy var executions = ExecutionsResource(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:28:191: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 |     /// Creates a new Figranium.
28 |     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.
29 |         precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
30 |         self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout; self.session = session
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:28:205: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
26 |
27 |     /// Creates a new Figranium.
28 |     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'
29 |         precondition(["http", "https"].contains(baseURL.scheme?.lowercased()), "baseURL must use http or https")
30 |         self.baseURL = baseURL; self.authentication = authentication; self.defaultHeaders = headers; self.timeout = timeout; self.session = session
/host/spi-builder-workspace/Sources/Figranium/Client.swift:83:51: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 |     }
82 |     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) }
83 |     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.
84 | }
85 | func pathID(_ value: String) -> String { value.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? value }
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:56:23: error: cannot find 'URLRequest' in scope
54 |         if !query.isEmpty { components.queryItems = query.compactMap { $0.value.isEmpty ? nil : URLQueryItem(name: $0.key, value: $0.value) } }
55 |         guard let url = components.url else { throw FigraniumError(message: "Unable to construct Figranium request URL") }
56 |         var request = URLRequest(url: url); request.httpMethod = method; request.timeoutInterval = options.timeout ?? timeout
   |                       `- error: cannot find 'URLRequest' in scope
57 |         var headers = defaultHeaders; headers["accept"] = "application/json"; options.headers.forEach { headers[$0.key] = $0.value }
58 |         if case let .apiKey(key, header) = authentication { headers[header] = header.lowercased() == "authorization" ? "Bearer \(key)" : key }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:62:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
60 |         headers.forEach { request.setValue($0.value, forHTTPHeaderField: $0.key) }
61 |         do {
62 |             let (data, response) = try await session.data(for: request)
   |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
63 |             guard let http = response as? HTTPURLResponse else { throw FigraniumError(message: "Figranium returned an invalid response", code: "NETWORK_ERROR") }
64 |             guard 200..<300 ~= http.statusCode else { throw error(from: data, response: http) }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:74:31: error: cannot find 'URLRequest' in scope
72 |         AsyncThrowingStream { continuation in
73 |             let task = Swift.Task { do {
74 |                 var request = URLRequest(url: baseURL.appendingPathComponent(path.trimmingCharacters(in: CharacterSet(charactersIn: "/")))); request.timeoutInterval = options.timeout ?? 0; request.setValue("text/event-stream", forHTTPHeaderField: "accept")
   |                               `- error: cannot find 'URLRequest' in scope
75 |                 if case let .apiKey(key, header) = authentication { request.setValue(header.lowercased() == "authorization" ? "Bearer \(key)" : key, forHTTPHeaderField: header) }
76 |                 let (bytes, response) = try await session.bytes(for: request); guard let http = response as? HTTPURLResponse, 200..<300 ~= http.statusCode else { throw FigraniumError(message: "Unable to open Figranium stream", code: "NETWORK_ERROR") }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:73:24: error: module 'Swift' has no member named 'Task'
71 |     func stream(_ path: String, options: RequestOptions = .init()) -> AsyncThrowingStream<StreamEvent<JSONValue>, Error> {
72 |         AsyncThrowingStream { continuation in
73 |             let task = Swift.Task { do {
   |                        `- error: module 'Swift' has no member named 'Task'
74 |                 var request = URLRequest(url: baseURL.appendingPathComponent(path.trimmingCharacters(in: CharacterSet(charactersIn: "/")))); request.timeoutInterval = options.timeout ?? 0; request.setValue("text/event-stream", forHTTPHeaderField: "accept")
75 |                 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:83:558: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
81 |     }
82 |     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) }
83 |     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'
84 | }
85 | func pathID(_ value: String) -> String { value.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? value }
/host/spi-builder-workspace/Sources/Figranium/Client.swift:83:652: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
81 |     }
82 |     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) }
83 |     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'
84 | }
85 | func pathID(_ value: String) -> String { value.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? value }
BUILD FAILURE 6.1 wasm