The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build OpenAIImageClient, reference main (ecbb6e), with Swift 6.0 for Linux on 14 May 2025 18:30:27 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.61.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/darya-varabei/OpenAIImageClient.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/darya-varabei/OpenAIImageClient
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at ecbb6ea Create LICENSE
Cloned https://github.com/darya-varabei/OpenAIImageClient.git
Revision (git rev-parse @):
ecbb6ea009af73b53bf0ca7e71c4da6c9429acc1
SUCCESS checkout https://github.com/darya-varabei/OpenAIImageClient.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/darya-varabei/OpenAIImageClient.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:9029076bb687edc160a3d5201c89e92dd9fa7309f33f090c4234365c83366c31
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/10] Compiling OpenAIImageClient OpenAIImageSize.swift
[4/10] Compiling OpenAIImageClient URLSessionsManager.swift
/host/spi-builder-workspace/Sources/OpenAIImageClient/URLSessions/URLSessionsManager.swift:12:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | class URLSessionsManager {
11 |
12 |     private let session: URLSession
   |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 |
14 |     init() {
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/OpenAIImageClient/URLSessions/URLSessionsManager.swift:15:46: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
13 |
14 |     init() {
15 |         let config = URLSessionConfiguration.default
   |                                              `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
16 |         config.timeoutIntervalForRequest = 120
17 |         config.timeoutIntervalForResource = 120
/host/spi-builder-workspace/Sources/OpenAIImageClient/URLSessions/URLSessionsManager.swift:18:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
16 |         config.timeoutIntervalForRequest = 120
17 |         config.timeoutIntervalForResource = 120
18 |         self.session = URLSession(configuration: config)
   |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
19 |     }
20 |
/host/spi-builder-workspace/Sources/OpenAIImageClient/URLSessions/URLSessionsManager.swift:30:23: error: cannot find 'URLRequest' in scope
28 |     ) async throws -> (Data, Any) {
29 |
30 |         var request = URLRequest(url: url)
   |                       `- error: cannot find 'URLRequest' in scope
31 |         request.httpMethod = httpMethod
32 |
/host/spi-builder-workspace/Sources/OpenAIImageClient/URLSessions/URLSessionsManager.swift:38:34: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
36 |         request.httpBody = body.isEmpty ? bodyData : try JSONSerialization.data(withJSONObject: body)
37 |
38 |         return try await session.data(for: request)
   |                                  `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
39 |     }
40 | }
[5/10] Compiling OpenAIImageClient Models.swift
[6/10] Compiling OpenAIImageClient OpenAIEnvironment.swift
[7/10] Compiling OpenAIImageClient OpenAIImageClient.swift
/host/spi-builder-workspace/Sources/OpenAIImageClient/OpenAIImageClient.swift:31:43: warning: conditional cast from 'Any' to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
 29 |                                                                 body: body)
 30 |
 31 |         guard let httpResponse = response as? HTTPURLResponse,
    |                                           `- warning: conditional cast from 'Any' to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
 32 |               (200..<300).contains(httpResponse.statusCode) else {
 33 |             let msg = String(data: data, encoding: .utf8) ?? OpenAIEnvironment.Error.unknownError
/host/spi-builder-workspace/Sources/OpenAIImageClient/OpenAIImageClient.swift:31:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 29 |                                                                 body: body)
 30 |
 31 |         guard let httpResponse = response as? HTTPURLResponse,
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |               (200..<300).contains(httpResponse.statusCode) else {
 33 |             let msg = String(data: data, encoding: .utf8) ?? OpenAIEnvironment.Error.unknownError
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenAIImageClient/OpenAIImageClient.swift:32:49: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 30 |
 31 |         guard let httpResponse = response as? HTTPURLResponse,
 32 |               (200..<300).contains(httpResponse.statusCode) else {
    |                                                 `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 33 |             let msg = String(data: data, encoding: .utf8) ?? OpenAIEnvironment.Error.unknownError
 34 |             throw NSError(domain: OpenAIEnvironment.Error.errorDomain, code: 1, userInfo: [NSLocalizedDescriptionKey: msg])
/host/spi-builder-workspace/Sources/OpenAIImageClient/OpenAIImageClient.swift:84:43: warning: conditional cast from 'Any' to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
 82 |                                                                 bodyData: body)
 83 |
 84 |         guard let httpResponse = response as? HTTPURLResponse,
    |                                           `- warning: conditional cast from 'Any' to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
 85 |               (200..<300).contains(httpResponse.statusCode) else {
 86 |             let msg = String(data: data, encoding: .utf8) ?? OpenAIEnvironment.Error.unknownError
/host/spi-builder-workspace/Sources/OpenAIImageClient/OpenAIImageClient.swift:84:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |                                                                 bodyData: body)
 83 |
 84 |         guard let httpResponse = response as? HTTPURLResponse,
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 85 |               (200..<300).contains(httpResponse.statusCode) else {
 86 |             let msg = String(data: data, encoding: .utf8) ?? OpenAIEnvironment.Error.unknownError
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' 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 HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/OpenAIImageClient/OpenAIImageClient.swift:85:49: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 83 |
 84 |         guard let httpResponse = response as? HTTPURLResponse,
 85 |               (200..<300).contains(httpResponse.statusCode) else {
    |                                                 `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 86 |             let msg = String(data: data, encoding: .utf8) ?? OpenAIEnvironment.Error.unknownError
 87 |             throw NSError(domain: OpenAIEnvironment.Error.errorDomain, code: 1, userInfo: [NSLocalizedDescriptionKey: msg])
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/10] Compiling OpenAIImageClient APIResponse.swift
[9/10] Compiling OpenAIImageClient OpenAIImageResult.swift
[10/10] Emitting module OpenAIImageClient
/host/spi-builder-workspace/Sources/OpenAIImageClient/URLSessions/URLSessionsManager.swift:12:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
10 | class URLSessionsManager {
11 |
12 |     private let session: URLSession
   |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
13 |
14 |     init() {
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
BUILD FAILURE 6.0 linux