The Swift Package Index logo.Swift Package Index

Build Information

Failed to build CloudUserDefaults with Swift 5.9 for Linux.

Build Command

docker run --rm -v "checkouts-4606859-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.19.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/nbasham/CloudUserDefaults.git
Reference: main
Cloned https://github.com/nbasham/CloudUserDefaults.git into spi-builder-workspace
SUCCESS checkout https://github.com/nbasham/CloudUserDefaults.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.9
Building package at path:  spi-builder-workspace
Running build ...
docker run --rm -v "checkouts-4606859-0":/host -w "/host/spi-builder-workspace" registry.gitlab.com/finestructure/spi-images:basic-5.9-latest swift build 2>&1
Building for debugging...
error: emit-module command failed with exit code 1 (use -v to see invocation)
[1/2] Emitting module CloudUserDefaults
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:16:6: error: Objective-C interoperability is disabled
    @objc internal func notificationFromCloud(notification: NSNotification) {
    ~^~~~~
    
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:35:6: error: Objective-C interoperability is disabled
    @objc internal func notifyCloud(notification: NSNotification) {
    ~^~~~~
    
[2/2] Compiling CloudUserDefaults CloudUserDefaults.swift
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:16:6: error: Objective-C interoperability is disabled
    @objc internal func notificationFromCloud(notification: NSNotification) {
    ~^~~~~
    
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:35:6: error: Objective-C interoperability is disabled
    @objc internal func notifyCloud(notification: NSNotification) {
    ~^~~~~
    
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:12:119: error: cannot find 'NSUbiquitousKeyValueStore' in scope
        NotificationCenter.default.addObserver(self, selector: #selector(notificationFromCloud(notification:)), name: NSUbiquitousKeyValueStore.didChangeExternallyNotification, object: nil)
                                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:12:64: error: '#selector' can only be used with the Objective-C runtime
        NotificationCenter.default.addObserver(self, selector: #selector(notificationFromCloud(notification:)), name: NSUbiquitousKeyValueStore.didChangeExternallyNotification, object: nil)
                                                               ^
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:13:64: error: '#selector' can only be used with the Objective-C runtime
        NotificationCenter.default.addObserver(self, selector: #selector(notifyCloud(notification:)), name: UserDefaults.didChangeNotification, object: nil)
                                                               ^
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:17:20: error: cannot find 'NSUbiquitousKeyValueStore' in scope
        let dict = NSUbiquitousKeyValueStore.default.dictionaryRepresentation
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:29:64: error: '#selector' can only be used with the Objective-C runtime
        NotificationCenter.default.addObserver(self, selector: #selector(notifyCloud(notification:)), name: UserDefaults.didChangeNotification, object: nil)
                                                               ^
/host/spi-builder-workspace/Sources/CloudUserDefaults/CloudUserDefaults.swift:39:17: error: cannot find 'NSUbiquitousKeyValueStore' in scope
                NSUbiquitousKeyValueStore.default.set(value, forKey: key)
                ^~~~~~~~~~~~~~~~~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1