The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Figranium, reference main (f740bb), with Swift 6.3 for Wasm on 3 Nov 2026 03:57:49 UTC.

Build Command

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

Build 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:         wasm
Swift version:             6.3
Building package at path:  $PWD
https://github.com/figranium/figranium-swift.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-53886770-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1
wasm-6.3-latest: Pulling from saguaro1/spi-images
Digest: sha256:eea66feda95ad8894091082dbcb77ec1fc917891d37888fd1938b0b68455d992
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/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: value of type '_' expected to be instance of class or class-constrained type
 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: value of type '_' expected to be instance of class or class-constrained type
 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: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: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 {
[4/11] Compiling Figranium Templates.swift
[5/11] Compiling Figranium ApiKeys.swift
[6/11] Compiling Figranium Actions.swift
[7/11] Compiling Figranium Resources.swift
[8/11] Compiling Figranium Models.swift
[9/11] Compiling Figranium FoundationModels.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[10/11] Compiling Figranium AppIntents.swift
[11/11] 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: value of type '_' expected to be instance of class or class-constrained type
 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: value of type '_' expected to be instance of class or class-constrained type
 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: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
BUILD FAILURE 6.3 wasm