Build Information
Failed to build CloudUserDefaults with Swift 5.7 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.7-latest swift build 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.22.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/nbasham/CloudUserDefaults.git
Reference: 1.0.3
Cloned https://github.com/nbasham/CloudUserDefaults.git into spi-builder-workspace
SUCCESS checkout https://github.com/nbasham/CloudUserDefaults.git at 1.0.3
========================================
Build
========================================
Selected platform: linux
Swift version: 5.7
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.7-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:22:9: error: failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project
for (key, value) in dict {
^
BUILD FAILURE 5.7 linux
Build Machine: Linux 1