Build Information
Failed to build Cohere with Swift 5.10 for Linux.
Build Command
bash -c docker run --rm -v "checkouts-4609320-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.39.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: linux
Swift version: 5.10
Building package at path: $workDir
https://github.com/MaxRS07/Cohere.git
Running build ...
bash -c docker run --rm -v "checkouts-4609320-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/6] Compiling Cohere Enums.swift
[4/6] Compiling Cohere Structs.swift
[5/6] Emitting module Cohere
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:199:52: error: cannot find type 'NSMutableURLRequest' in scope
private func MakeURLRequest<T : Codable>(request : NSMutableURLRequest, jsonDecoder : T.Type) async throws -> T? {
^~~~~~~~~~~~~~~~~~~
[6/6] Compiling Cohere Cohere.swift
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:199:52: error: cannot find type 'NSMutableURLRequest' in scope
private func MakeURLRequest<T : Codable>(request : NSMutableURLRequest, jsonDecoder : T.Type) async throws -> T? {
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:42:23: error: cannot find 'NSMutableURLRequest' in scope
let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/classify")! as URL,
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:43:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
cachePolicy: .useProtocolCachePolicy,
~^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:72:23: error: cannot find 'NSMutableURLRequest' in scope
let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/generate")! as URL,
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:73:63: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
cachePolicy: .useProtocolCachePolicy,
~^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:97:23: error: cannot find 'NSMutableURLRequest' in scope
let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/embed")! as URL,
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:98:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
cachePolicy: .useProtocolCachePolicy,
~^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:122:23: error: cannot find 'NSMutableURLRequest' in scope
let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/summarize")! as URL,
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:123:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
cachePolicy: .useProtocolCachePolicy,
~^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:156:23: error: cannot find 'NSMutableURLRequest' in scope
let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/chat")! as URL,
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:157:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
cachePolicy: .useProtocolCachePolicy,
~^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:183:23: error: cannot find 'NSMutableURLRequest' in scope
let request = NSMutableURLRequest(url: NSURL(string: "https://api.cohere.ai/v1/rerank")! as URL,
^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:184:57: error: cannot infer contextual base in reference to member 'useProtocolCachePolicy'
cachePolicy: .useProtocolCachePolicy,
~^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:200:30: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
let session = URLSession.shared
~~~~~~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/Cohere/Cohere.swift:202:71: error: cannot find type 'URLRequest' in scope
let (data, response) = try await session.data(for: request as URLRequest)
^~~~~~~~~~
error: fatalError
BUILD FAILURE 5.10 linux
Build Machine: Linux 2