The Swift Package Index logo.Swift Package Index

Build Information

Failed to build OpenAIImageClient, reference main (ecbb6e), with Swift 6.1 for Wasm on 31 May 2025 01:57:49 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
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:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/darya-varabei/OpenAIImageClient.git
https://github.com/darya-varabei/OpenAIImageClient.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "OpenAIImageClient",
  "name" : "OpenAIImageClient",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "12.0"
    }
  ],
  "products" : [
    {
      "name" : "OpenAIImageClient",
      "targets" : [
        "OpenAIImageClient"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "OpenAIImageClientTests",
      "module_type" : "SwiftTarget",
      "name" : "OpenAIImageClientTests",
      "path" : "Tests/OpenAIImageClientTests",
      "sources" : [
        "OpenAIImageClientTests.swift"
      ],
      "target_dependencies" : [
        "OpenAIImageClient"
      ],
      "type" : "test"
    },
    {
      "c99name" : "OpenAIImageClient",
      "module_type" : "SwiftTarget",
      "name" : "OpenAIImageClient",
      "path" : "Sources/OpenAIImageClient",
      "product_memberships" : [
        "OpenAIImageClient"
      ],
      "sources" : [
        "Models/APIResponse.swift",
        "Models/OpenAIImageResult.swift",
        "OpenAIImageClient.swift",
        "Parameters/Models.swift",
        "Parameters/OpenAIEnvironment.swift",
        "Parameters/OpenAIImageSize.swift",
        "URLSessions/URLSessionsManager.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "6.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/10] Compiling OpenAIImageClient APIResponse.swift
[4/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
[5/10] Compiling OpenAIImageClient OpenAIImageResult.swift
[6/10] Compiling OpenAIImageClient Models.swift
[7/10] Compiling OpenAIImageClient OpenAIImageSize.swift
[8/10] Compiling OpenAIImageClient OpenAIEnvironment.swift
[9/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])
[10/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 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/9] 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 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/9] Compiling OpenAIImageClient OpenAIImageResult.swift
[4/9] Compiling OpenAIImageClient APIResponse.swift
[5/9] 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
[6/9] Compiling OpenAIImageClient OpenAIEnvironment.swift
[7/9] Compiling OpenAIImageClient Models.swift
[8/9] 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])
[9/9] Compiling OpenAIImageClient OpenAIImageSize.swift
BUILD FAILURE 6.1 wasm