The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Ollama, reference main (63a889), with Swift 6.3 for Wasm on 16 Apr 2026 15:31:14 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/mattt/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/mattt/ollama-swift
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 63a8891 Transfer project from Loopwork (#28)
Cloned https://github.com/mattt/ollama-swift.git
Revision (git rev-parse @):
63a8891509399450322b19786b129024b612bcf3
SUCCESS checkout https://github.com/mattt/ollama-swift.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.3
Building package at path:  $PWD
https://github.com/mattt/ollama-swift.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-3":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1
wasm-6.3-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:d69f4e7582c319245442d62a08b2d7c7fd5a0c0c69f5d2ef11d1530cd8d3329b
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/11] Compiling Ollama Tool.swift
[4/12] Compiling Ollama JSONDecoder+Extensions.swift
[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: warning: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  55 |
  56 |         /// An error returned by the Ollama HTTP API.
  57 |         case responseError(response: HTTPURLResponse, detail: String)
     |              `- warning: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  58 |
  59 |         /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: warning: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  58 |
  59 |         /// An error encountered while decoding the response.
  60 |         case decodingError(response: HTTPURLResponse, detail: String)
     |              `- warning: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type '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:231:35: error: cannot find '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 '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: warning: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  55 |
  56 |         /// An error returned by the Ollama HTTP API.
  57 |         case responseError(response: HTTPURLResponse, detail: String)
     |              `- warning: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  58 |
  59 |         /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: warning: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  58 |
  59 |         /// An error encountered while decoding the response.
  60 |         case decodingError(response: HTTPURLResponse, detail: String)
     |              `- warning: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type '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:231:35: error: cannot find '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 '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
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/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: warning: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  55 |
  56 |         /// An error returned by the Ollama HTTP API.
  57 |         case responseError(response: HTTPURLResponse, detail: String)
     |              `- warning: associated value 'responseError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  58 |
  59 |         /// An error encountered while decoding the response.
/host/spi-builder-workspace/Sources/Ollama/Client.swift:60:14: warning: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type 'AnyObject'
  58 |
  59 |         /// An error encountered while decoding the response.
  60 |         case decodingError(response: HTTPURLResponse, detail: String)
     |              `- warning: associated value 'decodingError(response:detail:)' of 'Sendable'-conforming enum 'Error' contains non-Sendable type '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
[8/12] Compiling Ollama KeepAlive.swift
[9/12] Compiling Ollama Model.swift
[10/12] Compiling Ollama Value.swift
[11/12] Compiling Ollama Embeddings.swift
[12/12] Compiling Ollama Data+Extensions.swift
BUILD FAILURE 6.3 wasm