The Swift Package Index logo.Swift Package Index

Build Information

Failed to build OpenAISwift 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 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.29.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/adamrushy/OpenAISwift.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/adamrushy/OpenAISwift
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at ca66fb7 Merge pull request #97 from adamrushy/feature/renaming-implementation
Cloned https://github.com/adamrushy/OpenAISwift.git
Revision (git rev-parse @):
ca66fb720d6ebb657601db5a0852b830ae310a4c
SUCCESS checkout https://github.com/adamrushy/OpenAISwift.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.10
Building package at path:  $workDir
https://github.com/adamrushy/OpenAISwift.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 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/13] Compiling OpenAISwift OpenAIModelType.swift
[4/14] Compiling OpenAISwift Instruction.swift
[5/14] Compiling OpenAISwift Moderation.swift
[6/14] Compiling OpenAISwift EmbeddingsInput.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/14] Compiling OpenAISwift ImageGeneration.swift
[8/14] Compiling OpenAISwift ChatMessage.swift
[9/14] Compiling OpenAISwift Command.swift
[10/14] Compiling OpenAISwift OpenAI.swift
[11/14] Emitting module OpenAISwift
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:31: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                              ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:71: error: cannot infer contextual base in reference to member 'default'
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                                                     ~^~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:111: error: 'nil' requires a contextual type
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                                                                                              ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:16:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private var task: URLSessionDataTask?
                      ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
    func connect(with request: URLRequest) {
                               ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:37:36: error: cannot find type 'URLSessionDataDelegate' in scope
extension ServerSentEventsHandler: URLSessionDataDelegate {
                                   ^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:43:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
                               ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:43:54: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
                                                     ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:58:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
                               ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:58:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
                                                 ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
[12/14] Compiling OpenAISwift OpenAIEndpoint.swift
[13/14] Compiling OpenAISwift OpenAISwift.swift
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
    func connect(with request: URLRequest) {
                               ^~~~~~~~~~
[14/14] Compiling OpenAISwift ServerSentEventsHandler.swift
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:31: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                              ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:71: error: cannot infer contextual base in reference to member 'default'
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                                                     ~^~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:111: error: 'nil' requires a contextual type
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                                                                                              ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:16:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private var task: URLSessionDataTask?
                      ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
    func connect(with request: URLRequest) {
                               ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:37:36: error: cannot find type 'URLSessionDataDelegate' in scope
extension ServerSentEventsHandler: URLSessionDataDelegate {
                                   ^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:43:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
                               ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:43:54: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
                                                     ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:58:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
                               ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:58:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
                                                 ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:19:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
        task = session.dataTask(with: request)
               ~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:20:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
        task?.resume()
        ~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:24:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
        task?.cancel()
        ~~~~~ ^~~~~~
error: fatalError
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/4] Compiling OpenAISwift OpenAISwift.swift
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
    func connect(with request: URLRequest) {
                               ^~~~~~~~~~
[3/4] Compiling OpenAISwift ServerSentEventsHandler.swift
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:31: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                              ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:71: error: cannot infer contextual base in reference to member 'default'
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                                                     ~^~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:111: error: 'nil' requires a contextual type
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                                                                                              ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:16:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private var task: URLSessionDataTask?
                      ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
    func connect(with request: URLRequest) {
                               ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:37:36: error: cannot find type 'URLSessionDataDelegate' in scope
extension ServerSentEventsHandler: URLSessionDataDelegate {
                                   ^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:43:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
                               ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:43:54: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
                                                     ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:58:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
                               ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:58:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
                                                 ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:19:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
        task = session.dataTask(with: request)
               ~~~~~~~ ^~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:20:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
        task?.resume()
        ~~~~~ ^~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:24:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
        task?.cancel()
        ~~~~~ ^~~~~~
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/4] Emitting module OpenAISwift
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:31: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                              ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                           ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:71: error: cannot infer contextual base in reference to member 'default'
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                                                     ~^~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:111: error: 'nil' requires a contextual type
    private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
                                                                                                              ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:16:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    private var task: URLSessionDataTask?
                      ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
    func connect(with request: URLRequest) {
                               ^~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:37:36: error: cannot find type 'URLSessionDataDelegate' in scope
extension ServerSentEventsHandler: URLSessionDataDelegate {
                                   ^~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:43:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
                               ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:43:54: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
                                                     ^~~~~~~~~~~~~~~~~~
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
public typealias URLSessionDataTask = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:58:32: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
                               ^~~~~~~~~~
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
public typealias URLSession = AnyObject
                 ^
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:58:50: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
    func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
                                                 ^~~~~~~~~~~~~~
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
public typealias URLSessionTask = AnyObject
                 ^
error: fatalError
BUILD FAILURE 5.10 linux

Build Machine: Linux 2