The Swift Package Index logo.Swift Package Index

Build Information

Failed to build OpenAIImagesKit, reference master (730f4b), with Swift 6.0 for macOS (SPM) on 13 Jul 2025 11:23:49 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/guitaripod/OpenAIImagesKit.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/guitaripod/OpenAIImagesKit
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 730f4bb Update GitHub username from marcusziade to guitaripod
Cloned https://github.com/guitaripod/OpenAIImagesKit.git
Revision (git rev-parse @):
730f4bb7c115f83d5dd4430e5c939928a3178e9d
SUCCESS checkout https://github.com/guitaripod/OpenAIImagesKit.git at master
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/guitaripod/OpenAIImagesKit.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64
Building for debugging...
[0/7] Write sources
[1/7] Write OpenAIImagesCLI-entitlement.plist
[3/7] Write swift-version-5BDAB9E9C0126B9D.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/15] Compiling OpenAIImagesKit OpenAIImagesKit.swift
[6/15] Compiling OpenAIImagesKit NetworkSession.swift
[7/15] Compiling OpenAIImagesKit OpenAIImagesClient.swift
[8/15] Compiling OpenAIImagesKit Examples.swift
[9/15] Compiling OpenAIImagesKit Errors.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.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.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 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.2.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.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 |     }
[12/15] Compiling OpenAIImagesKit Models.swift
BUILD FAILURE 6.0 macosSpm