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 HSObserver with Swift 5.10 for Linux.

Build Command

bash -c docker run --rm -v "checkouts-4609320-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.29.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ConfusedVorlon/HSObserver.git
Reference: 1.2.0
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/ConfusedVorlon/HSObserver
 * tag               1.2.0      -> FETCH_HEAD
HEAD is now at e3e5be5 Tidy up docs
Cloned https://github.com/ConfusedVorlon/HSObserver.git
Revision (git rev-parse @):
e3e5be504eae3d1f97adec90887a945f389de5ee
SUCCESS checkout https://github.com/ConfusedVorlon/HSObserver.git at 1.2.0
========================================
Build
========================================
Selected platform:         linux
Swift version:             5.10
Building package at path:  $workDir
https://github.com/ConfusedVorlon/HSObserver.git
Running build ...
bash -c docker run --rm -v "checkouts-4609320-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-5.10-latest swift build 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/8] 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?)
    ~~~~~~~~             ^
[4/8] 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)
                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[5/8] Compiling HSObserver NSNotification+HSObserver.swift
[6/8] Compiling HSObserver HSObserves.swift
[7/8] Compiling HSObserver HSObserver.swift
[8/8] 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
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/4] 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?)
    ~~~~~~~~             ^
[3/4] 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)
                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[4/4] 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.10 linux