Build Information
Failed to build Ollama, reference main (be75f6
), with Swift 6.1 for Wasm on 14 Jun 2025 17:45:15 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/loopwork-ai/ollama-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/loopwork-ai/ollama-swift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at be75f65 Bump version to 1.7.0
Cloned https://github.com/loopwork-ai/ollama-swift.git
Revision (git rev-parse @):
be75f6552d6e2e352f9897fc20dfdaaf32a6213d
SUCCESS checkout https://github.com/loopwork-ai/ollama-swift.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/loopwork-ai/ollama-swift.git
https://github.com/loopwork-ai/ollama-swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
],
"manifest_display_name" : "Ollama",
"name" : "Ollama",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "13.0"
},
{
"name" : "maccatalyst",
"version" : "13.0"
},
{
"name" : "ios",
"version" : "16.0"
},
{
"name" : "watchos",
"version" : "9.0"
},
{
"name" : "tvos",
"version" : "16.0"
},
{
"name" : "visionos",
"version" : "1.0"
}
],
"products" : [
{
"name" : "Ollama",
"targets" : [
"Ollama"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "OllamaTests",
"module_type" : "SwiftTarget",
"name" : "OllamaTests",
"path" : "Tests/OllamaTests",
"sources" : [
"ClientTests.swift",
"DataURLTests.swift",
"Fixtures/HexColorTool.swift",
"ISO8601WithFractionalSecondsTests.swift",
"KeepAliveTests.swift",
"ModelTests.swift",
"ToolTests.swift",
"ValueTests.swift"
],
"target_dependencies" : [
"Ollama"
],
"type" : "test"
},
{
"c99name" : "Ollama",
"module_type" : "SwiftTarget",
"name" : "Ollama",
"path" : "Sources/Ollama",
"product_memberships" : [
"Ollama"
],
"sources" : [
"Chat.swift",
"Client.swift",
"Embeddings.swift",
"Extensions/Data+Extensions.swift",
"Extensions/JSONDecoder+Extensions.swift",
"KeepAlive.swift",
"Model.swift",
"Tool.swift",
"Value.swift"
],
"type" : "library"
}
],
"tools_version" : "6.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:1f4a86c2403dd7f046762c8271002f713e736861711b4d7bb001b0e60ed1e881
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/11] Compiling Ollama Tool.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/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:206:17: error: cannot find type 'URLRequest' in scope
204 | _ path: String,
205 | params: [String: Value]? = nil
206 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
207 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
208 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:247:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:247:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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
[5/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:206:17: error: cannot find type 'URLRequest' in scope
204 | _ path: String,
205 | params: [String: Value]? = nil
206 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
207 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
208 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:247:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:247:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:231:22: error: cannot find type 'URLRequest' in scope
229 | #"Unable to construct URL with host "\#(host)" and path "\#(path)""#)
230 | }
231 | var request: URLRequest = URLRequest(url: url)
| `- error: cannot find type 'URLRequest' in scope
232 | request.httpMethod = method.rawValue
233 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:248:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
246 |
247 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
248 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
249 | throw Error.unexpectedError("Response is not HTTPURLResponse")
250 | }
/host/spi-builder-workspace/Sources/Ollama/Client.swift:248:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
246 |
247 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
248 | 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.
249 | throw Error.unexpectedError("Response is not HTTPURLResponse")
250 | }
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
[6/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:206:17: error: cannot find type 'URLRequest' in scope
204 | _ path: String,
205 | params: [String: Value]? = nil
206 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
207 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
208 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:247:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:247:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:231:22: error: cannot find type 'URLRequest' in scope
229 | #"Unable to construct URL with host "\#(host)" and path "\#(path)""#)
230 | }
231 | var request: URLRequest = URLRequest(url: url)
| `- error: cannot find type 'URLRequest' in scope
232 | request.httpMethod = method.rawValue
233 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:248:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
246 |
247 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
248 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
249 | throw Error.unexpectedError("Response is not HTTPURLResponse")
250 | }
/host/spi-builder-workspace/Sources/Ollama/Client.swift:248:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
246 |
247 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
248 | 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.
249 | throw Error.unexpectedError("Response is not HTTPURLResponse")
250 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
[7/12] Compiling Ollama Model.swift
[8/12] Compiling Ollama Value.swift
[9/12] Compiling Ollama JSONDecoder+Extensions.swift
[10/12] Compiling Ollama KeepAlive.swift
[11/12] Compiling Ollama Embeddings.swift
[12/12] Compiling Ollama Data+Extensions.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:1f4a86c2403dd7f046762c8271002f713e736861711b4d7bb001b0e60ed1e881
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/10] Compiling Ollama Tool.swift
[3/11] Compiling Ollama JSONDecoder+Extensions.swift
[4/11] Compiling Ollama KeepAlive.swift
[5/11] Compiling Ollama Model.swift
[6/11] Compiling Ollama Value.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/11] Compiling Ollama Embeddings.swift
[8/11] Compiling Ollama Data+Extensions.swift
[9/11] 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:206:17: error: cannot find type 'URLRequest' in scope
204 | _ path: String,
205 | params: [String: Value]? = nil
206 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
207 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
208 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:247:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:247:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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
[10/11] 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:206:17: error: cannot find type 'URLRequest' in scope
204 | _ path: String,
205 | params: [String: Value]? = nil
206 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
207 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
208 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:247:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:247:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:231:22: error: cannot find type 'URLRequest' in scope
229 | #"Unable to construct URL with host "\#(host)" and path "\#(path)""#)
230 | }
231 | var request: URLRequest = URLRequest(url: url)
| `- error: cannot find type 'URLRequest' in scope
232 | request.httpMethod = method.rawValue
233 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:248:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
246 |
247 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
248 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
249 | throw Error.unexpectedError("Response is not HTTPURLResponse")
250 | }
/host/spi-builder-workspace/Sources/Ollama/Client.swift:248:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
246 |
247 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
248 | 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.
249 | throw Error.unexpectedError("Response is not HTTPURLResponse")
250 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
[11/11] Compiling 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:206:17: error: cannot find type 'URLRequest' in scope
204 | _ path: String,
205 | params: [String: Value]? = nil
206 | ) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
207 | var urlComponents = URLComponents(url: host, resolvingAgainstBaseURL: true)
208 | urlComponents?.path = path
/host/spi-builder-workspace/Sources/Ollama/Client.swift:247:47: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:247:70: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
245 | }
246 |
247 | 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.
248 | guard let httpResponse = response as? HTTPURLResponse else {
249 | 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:231:22: error: cannot find type 'URLRequest' in scope
229 | #"Unable to construct URL with host "\#(host)" and path "\#(path)""#)
230 | }
231 | var request: URLRequest = URLRequest(url: url)
| `- error: cannot find type 'URLRequest' in scope
232 | request.httpMethod = method.rawValue
233 |
/host/spi-builder-workspace/Sources/Ollama/Client.swift:248:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
246 |
247 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
248 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
249 | throw Error.unexpectedError("Response is not HTTPURLResponse")
250 | }
/host/spi-builder-workspace/Sources/Ollama/Client.swift:248:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
246 |
247 | private func validateResponse(_ response: URLResponse) throws -> HTTPURLResponse {
248 | 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.
249 | throw Error.unexpectedError("Response is not HTTPURLResponse")
250 | }
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