Build Information
Failed to build Cohere, reference main (6c7705), with Swift 6.3 for Android on 14 Apr 2026 14:24:20 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/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:android-6.3-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/MaxRS07/Cohere.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/MaxRS07/Cohere
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 6c77054 Merge remote-tracking branch 'refs/remotes/origin/main'
Cloned https://github.com/MaxRS07/Cohere.git
Revision (git rev-parse @):
6c77054fc3b6a3ba57dc18c513ab33520c375455
SUCCESS checkout https://github.com/MaxRS07/Cohere.git at main
========================================
Build
========================================
Selected platform: android
Swift version: 6.3
Building package at path: $PWD
https://github.com/MaxRS07/Cohere.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/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:android-6.3-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1
android-6.3-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:9008270ea37a55e78725e6225015adb5eff8582da520c5232bf0499f32c36dc4
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:android-6.3-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--4F562202D5529B1.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/6] Emitting module Cohere
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:199:52: error: cannot find type 'NSMutableURLRequest' in scope
197 | }
198 | }
199 | private func MakeURLRequest<T : Codable>(request : NSMutableURLRequest, jsonDecoder : T.Type) async throws -> T? {
| `- error: cannot find type 'NSMutableURLRequest' in scope
200 | let session = URLSession.shared
201 | if #available(macOS 12.0, *), #available(iOS 15.0, *) {
[4/6] Compiling Cohere Enums.swift
[5/6] Compiling Cohere Structs.swift
[6/6] Compiling Cohere Cohere.swift
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:199:52: error: cannot find type 'NSMutableURLRequest' in scope
197 | }
198 | }
199 | private func MakeURLRequest<T : Codable>(request : NSMutableURLRequest, jsonDecoder : T.Type) async throws -> T? {
| `- error: cannot find type 'NSMutableURLRequest' in scope
200 | let session = URLSession.shared
201 | if #available(macOS 12.0, *), #available(iOS 15.0, *) {
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:42:23: error: cannot find 'NSMutableURLRequest' in scope
40 | ] as [String : Any]
41 | guard let postData = try? JSONSerialization.data(withJSONObject: parameters, options: []) else { return nil }
42 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/classify")! as URL,
| `- error: cannot find 'NSMutableURLRequest' in scope
43 | cachePolicy: .useProtocolCachePolicy,
44 | timeoutInterval: 10.0)
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:43:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
41 | guard let postData = try? JSONSerialization.data(withJSONObject: parameters, options: []) else { return nil }
42 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/classify")! as URL,
43 | cachePolicy: .useProtocolCachePolicy,
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
44 | timeoutInterval: 10.0)
45 |
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:72:23: error: cannot find 'NSMutableURLRequest' in scope
70 | guard let postData = try? JSONSerialization.data(withJSONObject: parameters, options: []) else {return nil}
71 |
72 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/generate")! as URL,
| `- error: cannot find 'NSMutableURLRequest' in scope
73 | cachePolicy: .useProtocolCachePolicy,
74 | timeoutInterval: 10.0)
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:73:63: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
71 |
72 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/generate")! as URL,
73 | cachePolicy: .useProtocolCachePolicy,
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
74 | timeoutInterval: 10.0)
75 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:97:23: error: cannot find 'NSMutableURLRequest' in scope
95 | guard let postData = try? JSONSerialization.data(withJSONObject: parameters, options: []) else { return nil }
96 |
97 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/embed")! as URL,
| `- error: cannot find 'NSMutableURLRequest' in scope
98 | cachePolicy: .useProtocolCachePolicy,
99 | timeoutInterval: 10.0)
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:98:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
96 |
97 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/embed")! as URL,
98 | cachePolicy: .useProtocolCachePolicy,
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
99 | timeoutInterval: 10.0)
100 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:122:23: error: cannot find 'NSMutableURLRequest' in scope
120 | guard let postData = try? JSONSerialization.data(withJSONObject: parameters, options: []) else { return nil }
121 |
122 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/summarize")! as URL,
| `- error: cannot find 'NSMutableURLRequest' in scope
123 | cachePolicy: .useProtocolCachePolicy,
124 | timeoutInterval: 10.0)
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:123:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
121 |
122 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/summarize")! as URL,
123 | cachePolicy: .useProtocolCachePolicy,
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
124 | timeoutInterval: 10.0)
125 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:156:23: error: cannot find 'NSMutableURLRequest' in scope
154 | guard let postData = try? JSONSerialization.data(withJSONObject: parameters, options: []) else {return nil}
155 |
156 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/chat")! as URL,
| `- error: cannot find 'NSMutableURLRequest' in scope
157 | cachePolicy: .useProtocolCachePolicy,
158 | timeoutInterval: 10.0)
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:157:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
155 |
156 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/chat")! as URL,
157 | cachePolicy: .useProtocolCachePolicy,
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
158 | timeoutInterval: 10.0)
159 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:183:23: error: cannot find 'NSMutableURLRequest' in scope
181 | guard let postData = try? JSONSerialization.data(withJSONObject: parameters, options: []) else {return nil}
182 |
183 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/rerank")! as URL,
| `- error: cannot find 'NSMutableURLRequest' in scope
184 | cachePolicy: .useProtocolCachePolicy,
185 | timeoutInterval: 10.0)
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:184:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
182 |
183 | let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/rerank")! as URL,
184 | cachePolicy: .useProtocolCachePolicy,
| `- error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
185 | timeoutInterval: 10.0)
186 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:200:30: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
198 | }
199 | private func MakeURLRequest<T : Codable>(request : NSMutableURLRequest, jsonDecoder : T.Type) async throws -> T? {
200 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
201 | if #available(macOS 12.0, *), #available(iOS 15.0, *) {
202 | let (data, response) = try await session.data(for: request as URLRequest)
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:202:71: error: cannot find type 'URLRequest' in scope
200 | let session = URLSession.shared
201 | if #available(macOS 12.0, *), #available(iOS 15.0, *) {
202 | let (data, response) = try await session.data(for: request as URLRequest)
| `- error: cannot find type 'URLRequest' in scope
203 | guard let httpResponse = response as? HTTPURLResponse,
204 | (200...299).contains(httpResponse.statusCode) else {
BUILD FAILURE 6.3 android