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 OpenAIImagesKit, reference master (e771c5), with Swift 6.1 for macOS (SPM) on 24 Apr 2025 09:43:03 UTC.

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64

Build Log

========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/marcusziade/OpenAIImagesKit.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/marcusziade/OpenAIImagesKit
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at e771c5c Update OpenAIImagesKit repository URL in README
Cloned https://github.com/marcusziade/OpenAIImagesKit.git
Revision (git rev-parse @):
e771c5c13c826668ac78ac467ad82f7abad7d1c0
SUCCESS checkout https://github.com/marcusziade/OpenAIImagesKit.git at master
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
  "identity": ".resolve-product-dependencies",
  "name": "resolve-dependencies",
  "url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "version": "unspecified",
  "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "dependencies": [
    {
      "identity": "openaiimageskit",
      "name": "OpenAIImagesKit",
      "url": "https://github.com/marcusziade/OpenAIImagesKit.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/OpenAIImagesKit",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/marcusziade/OpenAIImagesKit.git
[1/94] Fetching openaiimageskit
Fetched https://github.com/marcusziade/OpenAIImagesKit.git from cache (0.71s)
Creating working copy for https://github.com/marcusziade/OpenAIImagesKit.git
Working copy of https://github.com/marcusziade/OpenAIImagesKit.git resolved at master (e771c5c)
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/marcusziade/OpenAIImagesKit.git
https://github.com/marcusziade/OpenAIImagesKit.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "OpenAIImagesKit",
  "name" : "OpenAIImagesKit",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "12.0"
    },
    {
      "name" : "ios",
      "version" : "15.0"
    }
  ],
  "products" : [
    {
      "name" : "OpenAIImagesKit",
      "targets" : [
        "OpenAIImagesKit"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "OpenAIImagesCLI",
      "targets" : [
        "OpenAIImagesCLI"
      ],
      "type" : {
        "executable" : null
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "OpenAIImagesKitTests",
      "module_type" : "SwiftTarget",
      "name" : "OpenAIImagesKitTests",
      "path" : "Tests/OpenAIImagesKitTests",
      "sources" : [
        "Fixtures/TestFixtures.swift",
        "Mocks/MockNetworkSession.swift",
        "ModelsTests.swift",
        "OpenAIImagesClientTests.swift"
      ],
      "target_dependencies" : [
        "OpenAIImagesKit"
      ],
      "type" : "test"
    },
    {
      "c99name" : "OpenAIImagesKit",
      "module_type" : "SwiftTarget",
      "name" : "OpenAIImagesKit",
      "path" : "Sources/OpenAIImagesKit",
      "product_memberships" : [
        "OpenAIImagesKit",
        "OpenAIImagesCLI"
      ],
      "sources" : [
        "Errors.swift",
        "Examples.swift",
        "ImageUtils.swift",
        "Models.swift",
        "NetworkSession.swift",
        "OpenAIImagesClient.swift",
        "OpenAIImagesKit.swift"
      ],
      "type" : "library"
    },
    {
      "c99name" : "OpenAIImagesCLI",
      "module_type" : "SwiftTarget",
      "name" : "OpenAIImagesCLI",
      "path" : "Sources/OpenAIImagesCLI",
      "product_memberships" : [
        "OpenAIImagesCLI"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "OpenAIImagesKit"
      ],
      "type" : "executable"
    }
  ],
  "tools_version" : "5.7"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/7] Write sources
[2/7] Write OpenAIImagesCLI-entitlement.plist
[3/7] Write swift-version-2F0A5646E1D333AE.txt
[5/15] Compiling OpenAIImagesKit OpenAIImagesKit.swift
[6/15] Compiling OpenAIImagesKit NetworkSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/NetworkSession.swift:33:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 31 |         completion: @escaping (Result<T, Error>) -> Void
 32 |     ) {
 33 |         Task {
    |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 34 |             do {
 35 |                 let result = try await performRequest(url: url, method: method, headers: headers, body: body) as T
    |                                        `- note: closure captures 'self' which is accessible to code in the current task
 36 |                 completion(.success(result))
 37 |             } catch {
[7/15] Compiling OpenAIImagesKit ImageUtils.swift
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:44:45: error: cannot find type 'NSImage' in scope
42 |     }
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
   |                                             `- error: cannot find type 'NSImage' in scope
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
46 |             return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:8:1: note: interface 'NSImage' forward declared here
  6 | #import <Foundation/NSObject.h>
  7 |
  8 | @class NSString, NSDictionary<KeyType, ObjectType>, NSArray<ObjectType>, NSDateComponents, NSDate, NSTimeZone, NSImage, NSAttributedString, NSUserNotificationAction;
    | `- note: interface 'NSImage' forward declared here
  9 | @protocol NSUserNotificationCenterDelegate;
 10 |
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:60: error: 'nil' requires a contextual type
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
   |                                                            `- error: 'nil' requires a contextual type
46 |             return nil
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:74: error: 'nil' requires a contextual type
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
   |                                                                          `- error: 'nil' requires a contextual type
46 |             return nil
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:86: error: 'nil' requires a contextual type
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
   |                                                                                      `- error: 'nil' requires a contextual type
46 |             return nil
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:49:19: error: cannot find 'NSBitmapImageRep' in scope
47 |         }
48 |
49 |         let rep = NSBitmapImageRep(cgImage: cgImage)
   |                   `- error: cannot find 'NSBitmapImageRep' in scope
50 |
51 |         switch format {
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:53:47: error: cannot infer contextual base in reference to member 'png'
51 |         switch format {
52 |         case .png:
53 |             return rep.representation(using: .png, properties: [:])
   |                                               `- error: cannot infer contextual base in reference to member 'png'
54 |         case .jpeg(let compressionQuality):
55 |             return rep.representation(using: .jpeg, properties: [.compressionFactor: compressionQuality])
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:55:47: error: cannot infer contextual base in reference to member 'jpeg'
53 |             return rep.representation(using: .png, properties: [:])
54 |         case .jpeg(let compressionQuality):
55 |             return rep.representation(using: .jpeg, properties: [.compressionFactor: compressionQuality])
   |                                               `- error: cannot infer contextual base in reference to member 'jpeg'
56 |         }
57 |     }
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:55:67: error: reference to member 'compressionFactor' cannot be resolved without a contextual type
53 |             return rep.representation(using: .png, properties: [:])
54 |         case .jpeg(let compressionQuality):
55 |             return rep.representation(using: .jpeg, properties: [.compressionFactor: compressionQuality])
   |                                                                   `- error: reference to member 'compressionFactor' cannot be resolved without a contextual type
56 |         }
57 |     }
[8/15] Compiling OpenAIImagesKit Examples.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/15] Compiling OpenAIImagesKit OpenAIImagesClient.swift
[10/15] Emitting module OpenAIImagesKit
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:44:45: error: cannot find type 'NSImage' in scope
42 |     }
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
   |                                             `- error: cannot find type 'NSImage' in scope
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
46 |             return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:8:1: note: interface 'NSImage' forward declared here
  6 | #import <Foundation/NSObject.h>
  7 |
  8 | @class NSString, NSDictionary<KeyType, ObjectType>, NSArray<ObjectType>, NSDateComponents, NSDate, NSTimeZone, NSImage, NSAttributedString, NSUserNotificationAction;
    | `- note: interface 'NSImage' forward declared here
  9 | @protocol NSUserNotificationCenterDelegate;
 10 |
[11/15] Compiling OpenAIImagesKit Errors.swift
[12/15] Compiling OpenAIImagesKit Models.swift
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/4] Write swift-version-2F0A5646E1D333AE.txt
[2/12] Compiling OpenAIImagesKit NetworkSession.swift
[3/12] Compiling OpenAIImagesKit OpenAIImagesClient.swift
[4/12] Compiling OpenAIImagesKit ImageUtils.swift
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:44:45: error: cannot find type 'NSImage' in scope
42 |     }
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
   |                                             `- error: cannot find type 'NSImage' in scope
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
46 |             return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:8:1: note: interface 'NSImage' forward declared here
  6 | #import <Foundation/NSObject.h>
  7 |
  8 | @class NSString, NSDictionary<KeyType, ObjectType>, NSArray<ObjectType>, NSDateComponents, NSDate, NSTimeZone, NSImage, NSAttributedString, NSUserNotificationAction;
    | `- note: interface 'NSImage' forward declared here
  9 | @protocol NSUserNotificationCenterDelegate;
 10 |
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:60: error: 'nil' requires a contextual type
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
   |                                                            `- error: 'nil' requires a contextual type
46 |             return nil
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:74: error: 'nil' requires a contextual type
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
   |                                                                          `- error: 'nil' requires a contextual type
46 |             return nil
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:86: error: 'nil' requires a contextual type
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
   |                                                                                      `- error: 'nil' requires a contextual type
46 |             return nil
47 |         }
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:49:19: error: cannot find 'NSBitmapImageRep' in scope
47 |         }
48 |
49 |         let rep = NSBitmapImageRep(cgImage: cgImage)
   |                   `- error: cannot find 'NSBitmapImageRep' in scope
50 |
51 |         switch format {
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:53:47: error: cannot infer contextual base in reference to member 'png'
51 |         switch format {
52 |         case .png:
53 |             return rep.representation(using: .png, properties: [:])
   |                                               `- error: cannot infer contextual base in reference to member 'png'
54 |         case .jpeg(let compressionQuality):
55 |             return rep.representation(using: .jpeg, properties: [.compressionFactor: compressionQuality])
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:55:47: error: cannot infer contextual base in reference to member 'jpeg'
53 |             return rep.representation(using: .png, properties: [:])
54 |         case .jpeg(let compressionQuality):
55 |             return rep.representation(using: .jpeg, properties: [.compressionFactor: compressionQuality])
   |                                               `- error: cannot infer contextual base in reference to member 'jpeg'
56 |         }
57 |     }
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:55:67: error: reference to member 'compressionFactor' cannot be resolved without a contextual type
53 |             return rep.representation(using: .png, properties: [:])
54 |         case .jpeg(let compressionQuality):
55 |             return rep.representation(using: .jpeg, properties: [.compressionFactor: compressionQuality])
   |                                                                   `- error: reference to member 'compressionFactor' cannot be resolved without a contextual type
56 |         }
57 |     }
[5/12] Compiling OpenAIImagesKit OpenAIImagesKit.swift
[6/12] Compiling OpenAIImagesKit Examples.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/12] Compiling OpenAIImagesKit Errors.swift
[8/12] Compiling OpenAIImagesKit Models.swift
[9/12] Emitting module OpenAIImagesKit
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:44:45: error: cannot find type 'NSImage' in scope
42 |     }
43 |     #elseif os(macOS)
44 |     public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
   |                                             `- error: cannot find type 'NSImage' in scope
45 |         guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
46 |             return nil
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:8:1: note: interface 'NSImage' forward declared here
  6 | #import <Foundation/NSObject.h>
  7 |
  8 | @class NSString, NSDictionary<KeyType, ObjectType>, NSArray<ObjectType>, NSDateComponents, NSDate, NSTimeZone, NSImage, NSAttributedString, NSUserNotificationAction;
    | `- note: interface 'NSImage' forward declared here
  9 | @protocol NSUserNotificationCenterDelegate;
 10 |
BUILD FAILURE 6.1 macosSpm