The Swift Package Index logo.Swift Package Index

Build Information

Failed to build OpenAISwift with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4606859-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.21.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/adamrushy/OpenAISwift.git
Reference: 1.4.1
Cloned https://github.com/adamrushy/OpenAISwift.git into spi-builder-workspace
SUCCESS checkout https://github.com/adamrushy/OpenAISwift.git at 1.4.1
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4606859-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Building for debugging...
[1/11] Compiling OpenAISwift OpenAIEndpoint.swift
[2/11] 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/11] Compiling OpenAISwift OpenAIModelType.swift
[4/12] 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()
        ~~~~~ ^~~~~~
[5/12] Compiling OpenAISwift Instruction.swift
[6/12] Compiling OpenAISwift Moderation.swift
[7/12] Compiling OpenAISwift OpenAI.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/12] Compiling OpenAISwift EmbeddingsInput.swift
[9/12] Compiling OpenAISwift ImageGeneration.swift
[10/12] Compiling OpenAISwift ChatMessage.swift
[11/12] Compiling OpenAISwift Command.swift
[12/12] 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.9 linux

Build Machine: Linux 1