The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Failed to build Cohere with Swift 5.8 for Linux.

Build Command

bash -c docker run --rm -v "checkouts-4606859-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.8-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.8
Building package at path:  $workDir
https://github.com/MaxRS07/Cohere.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-1":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.8-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
Building for debugging...
error: emit-module command failed with exit code 1 (use -v to see invocation)
[1/4] Compiling Cohere Enums.swift
[2/4] Compiling Cohere Structs.swift
[3/4] 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? {
                                                   ^~~~~~~~~~~~~~~~~~~
[4/4] 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)
                                                                      ^~~~~~~~~~
BUILD FAILURE 5.8 linux

Build Machine: Linux 1