The Swift Package Index logo.Swift Package Index

Build Information

Failed to build HSObserver 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/ConfusedVorlon/HSObserver.git
Reference: 1.2.0
Cloned https://github.com/ConfusedVorlon/HSObserver.git into spi-builder-workspace
SUCCESS checkout https://github.com/ConfusedVorlon/HSObserver.git at 1.2.0
========================================
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...
[1/6] Compiling HSObserver NSNotification+HSObserver.swift
[2/6] Compiling HSObserver HSObserves.swift
[3/6] Compiling HSObserver HSObserver.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/6] Emitting module HSObserver
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
    public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:148: error: cannot find type 'NSKeyValueChangeKey' in scope
    public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
                                                                                                                                                   ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:13:25: error: cannot find type 'NSKeyValueChangeKey' in scope
    private var block:([NSKeyValueChangeKey:Any]?)->Void
                        ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:15:25: error: cannot find type 'NSKeyValueObservingOptions' in scope
    private var options:NSKeyValueObservingOptions
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:57:94: error: cannot find type 'NSKeyValueChangeKey' in scope
    override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
                                                                                             ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:57:26: error: method does not override any method from its superclass
    override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
    ~~~~~~~~             ^
[5/6] Compiling HSObserver HSHasObservers.swift
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:23:30: error: cannot find 'objc_getAssociatedObject' in scope
        guard let existing = objc_getAssociatedObject(self, &observerKey) as? [HSObserves] else {
                             ^~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:32:9: error: cannot find 'objc_setAssociatedObject' in scope
        objc_setAssociatedObject(self,
        ^~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:34:35: error: cannot infer contextual base in reference to member 'OBJC_ASSOCIATION_RETAIN_NONATOMIC'
                                 .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6/6] Compiling HSObserver HSKeyPathObserver.swift
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
    public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:148: error: cannot find type 'NSKeyValueChangeKey' in scope
    public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
                                                                                                                                                   ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:13:25: error: cannot find type 'NSKeyValueChangeKey' in scope
    private var block:([NSKeyValueChangeKey:Any]?)->Void
                        ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:15:25: error: cannot find type 'NSKeyValueObservingOptions' in scope
    private var options:NSKeyValueObservingOptions
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:57:94: error: cannot find type 'NSKeyValueChangeKey' in scope
    override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
                                                                                             ^~~~~~~~~~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:57:26: error: method does not override any method from its superclass
    override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
    ~~~~~~~~             ^
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:45:17: error: value of type 'AnyObject' has no member 'addObserver'
        object?.addObserver(self,
        ~~~~~~~ ^~~~~~~~~~~
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:48:37: error: 'nil' requires a contextual type
                           context: nil)
                                    ^
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:54:17: error: value of type 'AnyObject' has no member 'removeObserver'
        object?.removeObserver(self, forKeyPath: keyPath)
        ~~~~~~~ ^~~~~~~~~~~~~~
error: fatalError
BUILD FAILURE 5.9 linux

Build Machine: Linux 1