Build Information
Failed to build Ollama, reference 1.9.2 (549699), with Swift 6.1 for Wasm on 2 Nov 2026 23:24:32 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>&1Build Log
========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mattt/ollama-swift.git
Reference: 1.9.2
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/mattt/ollama-swift
* tag 1.9.2 -> FETCH_HEAD
HEAD is now at 549699a Bump version to 1.9.2
Cloned https://github.com/mattt/ollama-swift.git
Revision (git rev-parse @):
549699a7c8f439015a48eb8ce6729d91ac09450a
SUCCESS checkout https://github.com/mattt/ollama-swift.git at 1.9.2
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/mattt/ollama-swift.git
https://github.com/mattt/ollama-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:f257c9b8465670613eb336f6def351d681b1d395aebdb231a45bac980c1f9d3c
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/12] Compiling Ollama Tool.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/13] Compiling Ollama Value.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/13] Compiling Ollama Model.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/13] Compiling Ollama SystemOne.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/13] Compiling Ollama JSONDecoder+Extensions.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/13] Compiling Ollama KeepAlive.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)
[9/13] Compiling Ollama Embeddings.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
[10/13] Compiling Ollama Data+Extensions.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
[11/13] Emitting module Ollama
<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/Ollama/Client.swift:37:31: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:58: error: cannot infer contextual base in reference to member 'default'
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: cannot infer contextual base in reference to member 'default'
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:28:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The underlying client session.
28 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 | /// Creates a client with the specified session, host, and user agent.
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/Ollama/Client.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | host: URL,
39 | userAgent: String? = nil
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/Ollama/Client.swift:57:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
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/Ollama/Client.swift:60:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |
62 | /// An unexpected error.
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/Ollama/Client.swift:57:14: error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
61 |
62 | /// An unexpected error.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:211:17: error: cannot find type 'URLRequest' in scope
209 | _ path: String,
210 | params: [String: Value]? = nil
211 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
212 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
213 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
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
[12/13] Compiling Ollama Chat.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/Ollama/Client.swift:37:31: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:58: error: cannot infer contextual base in reference to member 'default'
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: cannot infer contextual base in reference to member 'default'
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:28:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The underlying client session.
28 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 | /// Creates a client with the specified session, host, and user agent.
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/Ollama/Client.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | host: URL,
39 | userAgent: String? = nil
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/Ollama/Client.swift:57:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
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/Ollama/Client.swift:60:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |
62 | /// An unexpected error.
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/Ollama/Client.swift:57:14: error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
61 |
62 | /// An unexpected error.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:211:17: error: cannot find type 'URLRequest' in scope
209 | _ path: String,
210 | params: [String: Value]? = nil
211 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
212 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
213 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
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/Ollama/Client.swift:72:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
70 | return "Request error: \(detail)"
71 | case .responseError(let response, let detail):
72 | return "Response error (Status \(response.statusCode)): \(detail)"
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
73 | case .decodingError(let response, let detail):
74 | return "Decoding error (Status \(response.statusCode)): \(detail)"
/host/spi-builder-workspace/Sources/Ollama/Client.swift:74:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
72 | return "Response error (Status \(response.statusCode)): \(detail)"
73 | case .decodingError(let response, let detail):
74 | return "Decoding error (Status \(response.statusCode)): \(detail)"
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
75 | case .unexpectedError(let detail):
76 | return "Unexpected error: \(detail)"
/host/spi-builder-workspace/Sources/Ollama/Client.swift:97:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
95 | ) async throws -> T {
96 | let request = try createRequest(method, path, params: params)
97 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
98 | let httpResponse = try validateResponse(response)
99 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:236:22: error: cannot find type 'URLRequest' in scope
234 | #"Unable to construct URL with host "\#(host)" and path "\#(path)""#)
235 | }
236 | var request: URLRequest = URLRequest(url: url)
| `- error: cannot find type 'URLRequest' in scope
237 | request.httpMethod = method.rawValue
238 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:253:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
253 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
255 | }
/host/spi-builder-workspace/Sources/Ollama/Client.swift:253:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
253 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
255 | }
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
[13/13] Compiling Ollama 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/Ollama/Client.swift:37:31: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:58: error: cannot infer contextual base in reference to member 'default'
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: cannot infer contextual base in reference to member 'default'
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:28:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The underlying client session.
28 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 | /// Creates a client with the specified session, host, and user agent.
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/Ollama/Client.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | host: URL,
39 | userAgent: String? = nil
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/Ollama/Client.swift:57:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
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/Ollama/Client.swift:60:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |
62 | /// An unexpected error.
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/Ollama/Client.swift:57:14: error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
61 |
62 | /// An unexpected error.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:211:17: error: cannot find type 'URLRequest' in scope
209 | _ path: String,
210 | params: [String: Value]? = nil
211 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
212 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
213 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
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/Ollama/Client.swift:72:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
70 | return "Request error: \(detail)"
71 | case .responseError(let response, let detail):
72 | return "Response error (Status \(response.statusCode)): \(detail)"
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
73 | case .decodingError(let response, let detail):
74 | return "Decoding error (Status \(response.statusCode)): \(detail)"
/host/spi-builder-workspace/Sources/Ollama/Client.swift:74:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
72 | return "Response error (Status \(response.statusCode)): \(detail)"
73 | case .decodingError(let response, let detail):
74 | return "Decoding error (Status \(response.statusCode)): \(detail)"
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
75 | case .unexpectedError(let detail):
76 | return "Unexpected error: \(detail)"
/host/spi-builder-workspace/Sources/Ollama/Client.swift:97:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
95 | ) async throws -> T {
96 | let request = try createRequest(method, path, params: params)
97 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
98 | let httpResponse = try validateResponse(response)
99 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:236:22: error: cannot find type 'URLRequest' in scope
234 | #"Unable to construct URL with host "\#(host)" and path "\#(path)""#)
235 | }
236 | var request: URLRequest = URLRequest(url: url)
| `- error: cannot find type 'URLRequest' in scope
237 | request.httpMethod = method.rawValue
238 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:253:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
253 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
255 | }
/host/spi-builder-workspace/Sources/Ollama/Client.swift:253:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
253 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
255 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344847-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:f257c9b8465670613eb336f6def351d681b1d395aebdb231a45bac980c1f9d3c
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/11] Compiling Ollama KeepAlive.swift
[3/12] Compiling Ollama Tool.swift
[4/12] Compiling Ollama SystemOne.swift
[5/12] Compiling Ollama Model.swift
[6/12] Compiling Ollama JSONDecoder+Extensions.swift
[7/12] Compiling Ollama Value.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/12] Compiling Ollama Embeddings.swift
[9/12] Compiling Ollama Data+Extensions.swift
[10/12] Emitting module Ollama
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:31: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:58: error: cannot infer contextual base in reference to member 'default'
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: cannot infer contextual base in reference to member 'default'
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:28:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The underlying client session.
28 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 | /// Creates a client with the specified session, host, and user agent.
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/Ollama/Client.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | host: URL,
39 | userAgent: String? = nil
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/Ollama/Client.swift:57:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
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/Ollama/Client.swift:60:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |
62 | /// An unexpected error.
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/Ollama/Client.swift:57:14: error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
61 |
62 | /// An unexpected error.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:211:17: error: cannot find type 'URLRequest' in scope
209 | _ path: String,
210 | params: [String: Value]? = nil
211 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
212 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
213 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
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/12] Compiling Ollama Chat.swift
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:31: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:58: error: cannot infer contextual base in reference to member 'default'
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: cannot infer contextual base in reference to member 'default'
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:28:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The underlying client session.
28 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 | /// Creates a client with the specified session, host, and user agent.
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/Ollama/Client.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | host: URL,
39 | userAgent: String? = nil
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/Ollama/Client.swift:57:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
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/Ollama/Client.swift:60:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |
62 | /// An unexpected error.
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/Ollama/Client.swift:57:14: error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
61 |
62 | /// An unexpected error.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:211:17: error: cannot find type 'URLRequest' in scope
209 | _ path: String,
210 | params: [String: Value]? = nil
211 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
212 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
213 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
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/Ollama/Client.swift:72:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
70 | return "Request error: \(detail)"
71 | case .responseError(let response, let detail):
72 | return "Response error (Status \(response.statusCode)): \(detail)"
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
73 | case .decodingError(let response, let detail):
74 | return "Decoding error (Status \(response.statusCode)): \(detail)"
/host/spi-builder-workspace/Sources/Ollama/Client.swift:74:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
72 | return "Response error (Status \(response.statusCode)): \(detail)"
73 | case .decodingError(let response, let detail):
74 | return "Decoding error (Status \(response.statusCode)): \(detail)"
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
75 | case .unexpectedError(let detail):
76 | return "Unexpected error: \(detail)"
/host/spi-builder-workspace/Sources/Ollama/Client.swift:97:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
95 | ) async throws -> T {
96 | let request = try createRequest(method, path, params: params)
97 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
98 | let httpResponse = try validateResponse(response)
99 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:236:22: error: cannot find type 'URLRequest' in scope
234 | #"Unable to construct URL with host "\#(host)" and path "\#(path)""#)
235 | }
236 | var request: URLRequest = URLRequest(url: url)
| `- error: cannot find type 'URLRequest' in scope
237 | request.httpMethod = method.rawValue
238 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:253:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
253 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
255 | }
/host/spi-builder-workspace/Sources/Ollama/Client.swift:253:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
253 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
255 | }
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
[12/12] Compiling Ollama Client.swift
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:31: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:37:58: error: cannot infer contextual base in reference to member 'default'
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: cannot infer contextual base in reference to member 'default'
38 | host: URL,
39 | userAgent: String? = nil
/host/spi-builder-workspace/Sources/Ollama/Client.swift:28:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |
27 | /// The underlying client session.
28 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 | /// Creates a client with the specified session, host, and user agent.
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/Ollama/Client.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | /// - userAgent: The value for the `User-Agent` header sent in requests, if any. Defaults to `nil`.
36 | public init(
37 | session: URLSession = URLSession(configuration: .default),
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | host: URL,
39 | userAgent: String? = nil
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/Ollama/Client.swift:57:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
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/Ollama/Client.swift:60:38: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
61 |
62 | /// An unexpected error.
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/Ollama/Client.swift:57:14: error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
55 |
56 | /// An error returned by the Ollama HTTP API.
57 | case responseError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
58 |
59 | /// An error encountered while decoding the response.
60 | case decodingError(response: HTTPURLResponse, detail: String)
| `- error: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' has non-sendable type 'HTTPURLResponse' (aka 'AnyObject')
61 |
62 | /// An unexpected error.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:211:17: error: cannot find type 'URLRequest' in scope
209 | _ path: String,
210 | params: [String: Value]? = nil
211 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
212 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
213 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Ollama/Client.swift:252:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 | }
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
253 | guard let httpResponse = response as? HTTPURLResponse else {
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
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/Ollama/Client.swift:72:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
70 | return "Request error: \(detail)"
71 | case .responseError(let response, let detail):
72 | return "Response error (Status \(response.statusCode)): \(detail)"
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
73 | case .decodingError(let response, let detail):
74 | return "Decoding error (Status \(response.statusCode)): \(detail)"
/host/spi-builder-workspace/Sources/Ollama/Client.swift:74:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
72 | return "Response error (Status \(response.statusCode)): \(detail)"
73 | case .decodingError(let response, let detail):
74 | return "Decoding error (Status \(response.statusCode)): \(detail)"
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
75 | case .unexpectedError(let detail):
76 | return "Unexpected error: \(detail)"
/host/spi-builder-workspace/Sources/Ollama/Client.swift:97:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
95 | ) async throws -> T {
96 | let request = try createRequest(method, path, params: params)
97 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
98 | let httpResponse = try validateResponse(response)
99 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:236:22: error: cannot find type 'URLRequest' in scope
234 | #"Unable to construct URL with host "\#(host)" and path "\#(path)""#)
235 | }
236 | var request: URLRequest = URLRequest(url: url)
| `- error: cannot find type 'URLRequest' in scope
237 | request.httpMethod = method.rawValue
238 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:253:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
253 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
255 | }
/host/spi-builder-workspace/Sources/Ollama/Client.swift:253:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
251 |
252 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
253 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
254 | throw Error.unexpectedError("Response is not HTTPURLResponse")
255 | }
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.1 wasm