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 1.0.0 (4a50d8), with Swift 5.10 for macOS (SPM) on 24 Apr 2025 09:24:19 UTC.

Build Command

env DEVELOPER_DIR=/Applications/Xcode-15.4.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: 1.0.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/marcusziade/OpenAIImagesKit
 * tag               1.0.0      -> FETCH_HEAD
HEAD is now at 4a50d86 Create LICENSE
Cloned https://github.com/marcusziade/OpenAIImagesKit.git
Revision (git rev-parse @):
4a50d86f8ee170efe4d53244382ea6d076834cfa
SUCCESS checkout https://github.com/marcusziade/OpenAIImagesKit.git at 1.0.0
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             5.10
Building package at path:  $PWD
https://github.com/marcusziade/OpenAIImagesKit.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.4.0.app xcrun swift build --arch arm64
Building for debugging...
[0/7] Write sources
[2/7] Write OpenAIImagesCLI-entitlement.plist
[3/7] Write swift-version-33747A42983211AE.txt
[5/15] Compiling OpenAIImagesKit OpenAIImagesKit.swift
[6/15] Compiling OpenAIImagesKit NetworkSession.swift
[7/15] Compiling OpenAIImagesKit OpenAIImagesClient.swift
[8/15] Compiling OpenAIImagesKit Examples.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/15] Compiling OpenAIImagesKit Errors.swift
[10/15] Compiling OpenAIImagesKit Models.swift
[11/15] Emitting module OpenAIImagesKit
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:44:45: error: cannot find type 'NSImage' in scope
    public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
                                            ^~~~~~~
/Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:8:1: note: interface 'NSImage' forward declared here
@class NSString, NSDictionary<KeyType, ObjectType>, NSArray<ObjectType>, NSDateComponents, NSDate, NSTimeZone, NSImage, NSAttributedString, NSUserNotificationAction;
^
[12/15] Compiling OpenAIImagesKit ImageUtils.swift
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:44:45: error: cannot find type 'NSImage' in scope
    public static func imageToData(_ image: NSImage, format: ImageFormat = .png) -> Data? {
                                            ^~~~~~~
/Applications/Xcode-15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:8:1: note: interface 'NSImage' forward declared here
@class NSString, NSDictionary<KeyType, ObjectType>, NSArray<ObjectType>, NSDateComponents, NSDate, NSTimeZone, NSImage, NSAttributedString, NSUserNotificationAction;
^
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:60: error: 'nil' requires a contextual type
        guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
                                                           ^
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:74: error: 'nil' requires a contextual type
        guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
                                                                         ^
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:45:86: error: 'nil' requires a contextual type
        guard let cgImage = image.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
                                                                                     ^
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:49:19: error: cannot find 'NSBitmapImageRep' in scope
        let rep = NSBitmapImageRep(cgImage: cgImage)
                  ^~~~~~~~~~~~~~~~
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:53:47: error: cannot infer contextual base in reference to member 'png'
            return rep.representation(using: .png, properties: [:])
                                             ~^~~
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:55:47: error: cannot infer contextual base in reference to member 'jpeg'
            return rep.representation(using: .jpeg, properties: [.compressionFactor: compressionQuality])
                                             ~^~~~
/Users/admin/builder/spi-builder-workspace/Sources/OpenAIImagesKit/ImageUtils.swift:55:67: error: reference to member 'compressionFactor' cannot be resolved without a contextual type
            return rep.representation(using: .jpeg, properties: [.compressionFactor: compressionQuality])
                                                                  ^
error: fatalError
BUILD FAILURE 5.10 macosSpm