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 OpenAISwift, reference 1.4.1 (ca66fb), with Swift 6.0 for Linux on 3 Nov 2024 08:37:29 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/adamrushy/OpenAISwift.git
Reference: 1.4.1
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
 * tag               1.4.1      -> FETCH_HEAD
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 1.4.1
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/adamrushy/OpenAISwift.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/13] Compiling OpenAISwift Instruction.swift
[4/13] Compiling OpenAISwift Moderation.swift
[5/14] Compiling OpenAISwift OpenAIModelType.swift
[6/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.
13 |     var onComplete: (() -> Void)?
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
   |                               `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |     private var task: URLSessionDataTask?
17 |
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
13 |     var onComplete: (() -> Void)?
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
   |                                            `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
16 |     private var task: URLSessionDataTask?
17 |
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:71: error: cannot infer contextual base in reference to member 'default'
13 |     var onComplete: (() -> Void)?
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
   |                                                                       `- error: cannot infer contextual base in reference to member 'default'
16 |     private var task: URLSessionDataTask?
17 |
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:111: error: 'nil' requires a contextual type
13 |     var onComplete: (() -> Void)?
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
   |                                                                                                               `- error: 'nil' requires a contextual type
16 |     private var task: URLSessionDataTask?
17 |
/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.
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
16 |     private var task: URLSessionDataTask?
   |                       `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |
18 |     func connect(with request: URLRequest) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
16 |     private var task: URLSessionDataTask?
17 |
18 |     func connect(with request: URLRequest) {
   |                                `- error: cannot find type 'URLRequest' in scope
19 |         task = session.dataTask(with: request)
20 |         task?.resume()
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:37:36: error: cannot find type 'URLSessionDataDelegate' in scope
35 | }
36 |
37 | extension ServerSentEventsHandler: URLSessionDataDelegate {
   |                                    `- error: cannot find type 'URLSessionDataDelegate' in scope
38 |
39 |     /// It will be called several times, each time could return one chunk of data or multiple chunk of data
/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.
41 |     /// `data: {"id":"chatcmpl-6yVTvD6UAXsE9uG2SmW4Tc2iuFnnT","object":"chat.completion.chunk","created":1679878715,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]}`
42 |     /// `data: {"id":"chatcmpl-6yVTvD6UAXsE9uG2SmW4Tc2iuFnnT","object":"chat.completion.chunk","created":1679878715,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"Once"},"index":0,"finish_reason":null}]}`
43 |     func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
   |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 |         if let eventString = String(data: data, encoding: .utf8) {
45 |             let lines = eventString.split(separator: "\n")
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/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.
41 |     /// `data: {"id":"chatcmpl-6yVTvD6UAXsE9uG2SmW4Tc2iuFnnT","object":"chat.completion.chunk","created":1679878715,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]}`
42 |     /// `data: {"id":"chatcmpl-6yVTvD6UAXsE9uG2SmW4Tc2iuFnnT","object":"chat.completion.chunk","created":1679878715,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"Once"},"index":0,"finish_reason":null}]}`
43 |     func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
   |                                                      `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 |         if let eventString = String(data: data, encoding: .utf8) {
45 |             let lines = eventString.split(separator: "\n")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/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.
56 |     }
57 |
58 |     func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
   |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 |         if let error = error {
60 |             onEventReceived?(.failure(.genericError(error: error)))
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/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.
56 |     }
57 |
58 |     func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
   |                                                  `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 |         if let error = error {
60 |             onEventReceived?(.failure(.genericError(error: error)))
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:19:24: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
17 |
18 |     func connect(with request: URLRequest) {
19 |         task = session.dataTask(with: request)
   |                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
20 |         task?.resume()
21 |     }
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:20:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
18 |     func connect(with request: URLRequest) {
19 |         task = session.dataTask(with: request)
20 |         task?.resume()
   |               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
21 |     }
22 |
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:24:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
22 |
23 |     func disconnect() {
24 |         task?.cancel()
   |               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
25 |     }
26 |
[7/14] Compiling OpenAISwift OpenAIEndpoint.swift
[8/14] Compiling OpenAISwift OpenAISwift.swift
/host/spi-builder-workspace/Sources/OpenAISwift/OpenAISwift.swift:10:10: warning: associated value 'chatError(error:)' of 'Sendable'-conforming enum 'OpenAIError' has non-sendable type 'ChatError.Payload'; this is an error in the Swift 6 language mode
  8 |     case genericError(error: Error)
  9 |     case decodingError(error: Error)
 10 |     case chatError(error: ChatError.Payload)
    |          `- warning: associated value 'chatError(error:)' of 'Sendable'-conforming enum 'OpenAIError' has non-sendable type 'ChatError.Payload'; this is an error in the Swift 6 language mode
 11 | }
 12 |
/host/spi-builder-workspace/Sources/OpenAISwift/Models/ChatMessage.swift:95:19: note: consider making struct 'Payload' conform to the 'Sendable' protocol
 93 |
 94 | public struct ChatError: Codable {
 95 |     public struct Payload: Codable {
    |                   `- note: consider making struct 'Payload' conform to the 'Sendable' protocol
 96 |         public let message, type: String
 97 |         public let param, code: String?
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
16 |     private var task: URLSessionDataTask?
17 |
18 |     func connect(with request: URLRequest) {
   |                                `- error: cannot find type 'URLRequest' in scope
19 |         task = session.dataTask(with: request)
20 |         task?.resume()
/host/spi-builder-workspace/Sources/OpenAISwift/OpenAISwift.swift:296:17: warning: capture of 'completionHandler' with non-sendable type '(Result<Data, any Error>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
294 |         let task = session.dataTask(with: request) { (data, response, error) in
295 |             if let error = error {
296 |                 completionHandler(.failure(error))
    |                 |- warning: capture of 'completionHandler' with non-sendable type '(Result<Data, any Error>) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
297 |             } else if let data = data {
298 |                 completionHandler(.success(data))
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/14] Compiling OpenAISwift ChatMessage.swift
[10/14] Compiling OpenAISwift Command.swift
[11/14] Compiling OpenAISwift EmbeddingsInput.swift
[12/14] Compiling OpenAISwift ImageGeneration.swift
[13/14] Emitting module OpenAISwift
/host/spi-builder-workspace/Sources/OpenAISwift/OpenAISwift.swift:10:10: warning: associated value 'chatError(error:)' of 'Sendable'-conforming enum 'OpenAIError' has non-sendable type 'ChatError.Payload'; this is an error in the Swift 6 language mode
  8 |     case genericError(error: Error)
  9 |     case decodingError(error: Error)
 10 |     case chatError(error: ChatError.Payload)
    |          `- warning: associated value 'chatError(error:)' of 'Sendable'-conforming enum 'OpenAIError' has non-sendable type 'ChatError.Payload'; this is an error in the Swift 6 language mode
 11 | }
 12 |
/host/spi-builder-workspace/Sources/OpenAISwift/Models/ChatMessage.swift:95:19: note: consider making struct 'Payload' conform to the 'Sendable' protocol
 93 |
 94 | public struct ChatError: Codable {
 95 |     public struct Payload: Codable {
    |                   `- note: consider making struct 'Payload' conform to the 'Sendable' protocol
 96 |         public let message, type: String
 97 |         public let param, code: String?
/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.
13 |     var onComplete: (() -> Void)?
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
   |                               `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 |     private var task: URLSessionDataTask?
17 |
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:44: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
13 |     var onComplete: (() -> Void)?
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
   |                                            `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
16 |     private var task: URLSessionDataTask?
17 |
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:71: error: cannot infer contextual base in reference to member 'default'
13 |     var onComplete: (() -> Void)?
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
   |                                                                       `- error: cannot infer contextual base in reference to member 'default'
16 |     private var task: URLSessionDataTask?
17 |
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:15:111: error: 'nil' requires a contextual type
13 |     var onComplete: (() -> Void)?
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
   |                                                                                                               `- error: 'nil' requires a contextual type
16 |     private var task: URLSessionDataTask?
17 |
/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.
14 |
15 |     private lazy var session: URLSession = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
16 |     private var task: URLSessionDataTask?
   |                       `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |
18 |     func connect(with request: URLRequest) {
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:18:32: error: cannot find type 'URLRequest' in scope
16 |     private var task: URLSessionDataTask?
17 |
18 |     func connect(with request: URLRequest) {
   |                                `- error: cannot find type 'URLRequest' in scope
19 |         task = session.dataTask(with: request)
20 |         task?.resume()
/host/spi-builder-workspace/Sources/OpenAISwift/ServerSentEventsHandler.swift:37:36: error: cannot find type 'URLSessionDataDelegate' in scope
35 | }
36 |
37 | extension ServerSentEventsHandler: URLSessionDataDelegate {
   |                                    `- error: cannot find type 'URLSessionDataDelegate' in scope
38 |
39 |     /// It will be called several times, each time could return one chunk of data or multiple chunk of data
/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.
41 |     /// `data: {"id":"chatcmpl-6yVTvD6UAXsE9uG2SmW4Tc2iuFnnT","object":"chat.completion.chunk","created":1679878715,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]}`
42 |     /// `data: {"id":"chatcmpl-6yVTvD6UAXsE9uG2SmW4Tc2iuFnnT","object":"chat.completion.chunk","created":1679878715,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"Once"},"index":0,"finish_reason":null}]}`
43 |     func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
   |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 |         if let eventString = String(data: data, encoding: .utf8) {
45 |             let lines = eventString.split(separator: "\n")
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/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.
41 |     /// `data: {"id":"chatcmpl-6yVTvD6UAXsE9uG2SmW4Tc2iuFnnT","object":"chat.completion.chunk","created":1679878715,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"role":"assistant"},"index":0,"finish_reason":null}]}`
42 |     /// `data: {"id":"chatcmpl-6yVTvD6UAXsE9uG2SmW4Tc2iuFnnT","object":"chat.completion.chunk","created":1679878715,"model":"gpt-3.5-turbo-0301","choices":[{"delta":{"content":"Once"},"index":0,"finish_reason":null}]}`
43 |     func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
   |                                                      `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 |         if let eventString = String(data: data, encoding: .utf8) {
45 |             let lines = eventString.split(separator: "\n")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/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.
56 |     }
57 |
58 |     func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
   |                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 |         if let error = error {
60 |             onEventReceived?(.failure(.genericError(error: error)))
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/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.
56 |     }
57 |
58 |     func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
   |                                                  `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
59 |         if let error = error {
60 |             onEventReceived?(.failure(.genericError(error: error)))
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
[14/14] Compiling OpenAISwift OpenAI.swift
BUILD FAILURE 6.0 linux