The Swift Package Index logo.Swift Package Index

Build Information

Failed to build HSObserver, reference 1.2.0 (e3e5be), with Swift 6.1 for Android on 28 May 2025 00:22:19 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
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:         android
Swift version:             6.1
Building package at path:  $PWD
https://github.com/ConfusedVorlon/HSObserver.git
https://github.com/ConfusedVorlon/HSObserver.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "HSObserver",
  "name" : "HSObserver",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "HSObserver",
      "targets" : [
        "HSObserver"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "HSObserverTests",
      "module_type" : "SwiftTarget",
      "name" : "HSObserverTests",
      "path" : "Tests/HSObserverTests",
      "sources" : [
        "HSObserverTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "HSObserver"
      ],
      "type" : "test"
    },
    {
      "c99name" : "HSObserver",
      "module_type" : "SwiftTarget",
      "name" : "HSObserver",
      "path" : "Sources/HSObserver",
      "product_memberships" : [
        "HSObserver"
      ],
      "sources" : [
        "HSHasObservers.swift",
        "HSKeyPathObserver.swift",
        "HSObserver.swift",
        "HSObserves.swift",
        "NSNotification+HSObserver.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/8] Compiling HSObserver NSNotification+HSObserver.swift
[4/8] Compiling HSObserver HSObserves.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/8] Emitting module HSObserver
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:20:13: warning: var 'observerKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 | }
19 |
20 | private var observerKey: Void?
   |             |- warning: var 'observerKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |             |- note: convert 'observerKey' to a 'let' constant to make 'Sendable' shared state immutable
   |             |- note: add '@MainActor' to make var 'observerKey' part of global actor 'MainActor'
   |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 | public extension HSHasObservers {
22 |     private func _getObservers() -> [HSObserves] {
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
24 |     ///   - activate: whether to immediately activate the observer
25 |     ///   - block: the block to call when there is a change
26 |     public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
   |                                                                           `- error: cannot find type 'NSKeyValueObservingOptions' in scope
27 |         self.block = block
28 |         self.keyPath = keyPath
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:148: error: cannot find type 'NSKeyValueChangeKey' in scope
24 |     ///   - activate: whether to immediately activate the observer
25 |     ///   - block: the block to call when there is a change
26 |     public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
   |                                                                                                                                                    `- error: cannot find type 'NSKeyValueChangeKey' in scope
27 |         self.block = block
28 |         self.keyPath = keyPath
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:13:25: error: cannot find type 'NSKeyValueChangeKey' in scope
11 |
12 | public class HSKeyPathObserver:NSObject, HSObserves {
13 |     private var block:([NSKeyValueChangeKey:Any]?)->Void
   |                         `- error: cannot find type 'NSKeyValueChangeKey' in scope
14 |     private var keyPath:String
15 |     private var options:NSKeyValueObservingOptions
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:15:25: error: cannot find type 'NSKeyValueObservingOptions' in scope
13 |     private var block:([NSKeyValueChangeKey:Any]?)->Void
14 |     private var keyPath:String
15 |     private var options:NSKeyValueObservingOptions
   |                         `- error: cannot find type 'NSKeyValueObservingOptions' in scope
16 |     weak private var object:AnyObject?
17 |
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:57:94: error: cannot find type 'NSKeyValueChangeKey' in scope
55 |     }
56 |
57 |     override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
   |                                                                                              `- error: cannot find type 'NSKeyValueChangeKey' in scope
58 |     {
59 |         block(change)
[6/8] Compiling HSObserver HSHasObservers.swift
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:20:13: warning: var 'observerKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
18 | }
19 |
20 | private var observerKey: Void?
   |             |- warning: var 'observerKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |             |- note: convert 'observerKey' to a 'let' constant to make 'Sendable' shared state immutable
   |             |- note: add '@MainActor' to make var 'observerKey' part of global actor 'MainActor'
   |             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 | public extension HSHasObservers {
22 |     private func _getObservers() -> [HSObserves] {
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:23:30: error: cannot find 'objc_getAssociatedObject' in scope
21 | public extension HSHasObservers {
22 |     private func _getObservers() -> [HSObserves] {
23 |         guard let existing = objc_getAssociatedObject(self, &observerKey) as? [HSObserves] else {
   |                              `- error: cannot find 'objc_getAssociatedObject' in scope
24 |             return [HSObserver]()
25 |         }
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:32:9: error: cannot find 'objc_setAssociatedObject' in scope
30 |     private func _setObservers(_ newValue:[HSObserves]) {
31 |         let objcArray = newValue as NSArray
32 |         objc_setAssociatedObject(self,
   |         `- error: cannot find 'objc_setAssociatedObject' in scope
33 |                                  &observerKey, objcArray,
34 |                                  .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:34:35: error: cannot infer contextual base in reference to member 'OBJC_ASSOCIATION_RETAIN_NONATOMIC'
32 |         objc_setAssociatedObject(self,
33 |                                  &observerKey, objcArray,
34 |                                  .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
   |                                   `- error: cannot infer contextual base in reference to member 'OBJC_ASSOCIATION_RETAIN_NONATOMIC'
35 |     }
36 |
[7/8] Compiling HSObserver HSObserver.swift
/host/spi-builder-workspace/Sources/HSObserver/HSObserver.swift:92:86: warning: converting non-sendable function value to '@Sendable (Notification) -> Void' may introduce data races
 90 |                                                                               object: object,
 91 |                                                                               queue: queue,
 92 |                                                                               using: block)
    |                                                                                      `- warning: converting non-sendable function value to '@Sendable (Notification) -> Void' may introduce data races
 93 |                 notificationObservers.append(notificationObserver)
 94 |             }
[8/8] Compiling HSObserver HSKeyPathObserver.swift
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
24 |     ///   - activate: whether to immediately activate the observer
25 |     ///   - block: the block to call when there is a change
26 |     public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
   |                                                                           `- error: cannot find type 'NSKeyValueObservingOptions' in scope
27 |         self.block = block
28 |         self.keyPath = keyPath
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:148: error: cannot find type 'NSKeyValueChangeKey' in scope
24 |     ///   - activate: whether to immediately activate the observer
25 |     ///   - block: the block to call when there is a change
26 |     public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
   |                                                                                                                                                    `- error: cannot find type 'NSKeyValueChangeKey' in scope
27 |         self.block = block
28 |         self.keyPath = keyPath
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:13:25: error: cannot find type 'NSKeyValueChangeKey' in scope
11 |
12 | public class HSKeyPathObserver:NSObject, HSObserves {
13 |     private var block:([NSKeyValueChangeKey:Any]?)->Void
   |                         `- error: cannot find type 'NSKeyValueChangeKey' in scope
14 |     private var keyPath:String
15 |     private var options:NSKeyValueObservingOptions
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:15:25: error: cannot find type 'NSKeyValueObservingOptions' in scope
13 |     private var block:([NSKeyValueChangeKey:Any]?)->Void
14 |     private var keyPath:String
15 |     private var options:NSKeyValueObservingOptions
   |                         `- error: cannot find type 'NSKeyValueObservingOptions' in scope
16 |     weak private var object:AnyObject?
17 |
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:57:94: error: cannot find type 'NSKeyValueChangeKey' in scope
55 |     }
56 |
57 |     override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
   |                                                                                              `- error: cannot find type 'NSKeyValueChangeKey' in scope
58 |     {
59 |         block(change)
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:45:17: error: value of type 'AnyObject' has no member 'addObserver'
43 |     @discardableResult
44 |     public func activate() -> Self {
45 |         object?.addObserver(self,
   |                 `- error: value of type 'AnyObject' has no member 'addObserver'
46 |                            forKeyPath: keyPath,
47 |                            options: options,
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:48:37: error: 'nil' requires a contextual type
46 |                            forKeyPath: keyPath,
47 |                            options: options,
48 |                            context: nil)
   |                                     `- error: 'nil' requires a contextual type
49 |
50 |         return self
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:54:17: error: value of type 'AnyObject' has no member 'removeObserver'
52 |
53 |     public func deactivate() {
54 |         object?.removeObserver(self, forKeyPath: keyPath)
   |                 `- error: value of type 'AnyObject' has no member 'removeObserver'
55 |     }
56 |
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/7] Compiling HSObserver HSHasObservers.swift
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:23:30: error: cannot find 'objc_getAssociatedObject' in scope
21 | public extension HSHasObservers {
22 |     private func _getObservers() -> [HSObserves] {
23 |         guard let existing = objc_getAssociatedObject(self, &observerKey) as? [HSObserves] else {
   |                              `- error: cannot find 'objc_getAssociatedObject' in scope
24 |             return [HSObserver]()
25 |         }
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:32:9: error: cannot find 'objc_setAssociatedObject' in scope
30 |     private func _setObservers(_ newValue:[HSObserves]) {
31 |         let objcArray = newValue as NSArray
32 |         objc_setAssociatedObject(self,
   |         `- error: cannot find 'objc_setAssociatedObject' in scope
33 |                                  &observerKey, objcArray,
34 |                                  .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
/host/spi-builder-workspace/Sources/HSObserver/HSHasObservers.swift:34:35: error: cannot infer contextual base in reference to member 'OBJC_ASSOCIATION_RETAIN_NONATOMIC'
32 |         objc_setAssociatedObject(self,
33 |                                  &observerKey, objcArray,
34 |                                  .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
   |                                   `- error: cannot infer contextual base in reference to member 'OBJC_ASSOCIATION_RETAIN_NONATOMIC'
35 |     }
36 |
[3/7] Compiling HSObserver HSKeyPathObserver.swift
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
24 |     ///   - activate: whether to immediately activate the observer
25 |     ///   - block: the block to call when there is a change
26 |     public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
   |                                                                           `- error: cannot find type 'NSKeyValueObservingOptions' in scope
27 |         self.block = block
28 |         self.keyPath = keyPath
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:148: error: cannot find type 'NSKeyValueChangeKey' in scope
24 |     ///   - activate: whether to immediately activate the observer
25 |     ///   - block: the block to call when there is a change
26 |     public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
   |                                                                                                                                                    `- error: cannot find type 'NSKeyValueChangeKey' in scope
27 |         self.block = block
28 |         self.keyPath = keyPath
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:13:25: error: cannot find type 'NSKeyValueChangeKey' in scope
11 |
12 | public class HSKeyPathObserver:NSObject, HSObserves {
13 |     private var block:([NSKeyValueChangeKey:Any]?)->Void
   |                         `- error: cannot find type 'NSKeyValueChangeKey' in scope
14 |     private var keyPath:String
15 |     private var options:NSKeyValueObservingOptions
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:15:25: error: cannot find type 'NSKeyValueObservingOptions' in scope
13 |     private var block:([NSKeyValueChangeKey:Any]?)->Void
14 |     private var keyPath:String
15 |     private var options:NSKeyValueObservingOptions
   |                         `- error: cannot find type 'NSKeyValueObservingOptions' in scope
16 |     weak private var object:AnyObject?
17 |
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:57:94: error: cannot find type 'NSKeyValueChangeKey' in scope
55 |     }
56 |
57 |     override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
   |                                                                                              `- error: cannot find type 'NSKeyValueChangeKey' in scope
58 |     {
59 |         block(change)
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:45:17: error: value of type 'AnyObject' has no member 'addObserver'
43 |     @discardableResult
44 |     public func activate() -> Self {
45 |         object?.addObserver(self,
   |                 `- error: value of type 'AnyObject' has no member 'addObserver'
46 |                            forKeyPath: keyPath,
47 |                            options: options,
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:48:37: error: 'nil' requires a contextual type
46 |                            forKeyPath: keyPath,
47 |                            options: options,
48 |                            context: nil)
   |                                     `- error: 'nil' requires a contextual type
49 |
50 |         return self
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:54:17: error: value of type 'AnyObject' has no member 'removeObserver'
52 |
53 |     public func deactivate() {
54 |         object?.removeObserver(self, forKeyPath: keyPath)
   |                 `- error: value of type 'AnyObject' has no member 'removeObserver'
55 |     }
56 |
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/7] Emitting module HSObserver
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
24 |     ///   - activate: whether to immediately activate the observer
25 |     ///   - block: the block to call when there is a change
26 |     public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
   |                                                                           `- error: cannot find type 'NSKeyValueObservingOptions' in scope
27 |         self.block = block
28 |         self.keyPath = keyPath
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:26:148: error: cannot find type 'NSKeyValueChangeKey' in scope
24 |     ///   - activate: whether to immediately activate the observer
25 |     ///   - block: the block to call when there is a change
26 |     public init(forKeyPath keyPath: String,of object: AnyObject, options: NSKeyValueObservingOptions = [],activate:Bool = false, block:@escaping ([NSKeyValueChangeKey:Any]?)->Void ){
   |                                                                                                                                                    `- error: cannot find type 'NSKeyValueChangeKey' in scope
27 |         self.block = block
28 |         self.keyPath = keyPath
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:13:25: error: cannot find type 'NSKeyValueChangeKey' in scope
11 |
12 | public class HSKeyPathObserver:NSObject, HSObserves {
13 |     private var block:([NSKeyValueChangeKey:Any]?)->Void
   |                         `- error: cannot find type 'NSKeyValueChangeKey' in scope
14 |     private var keyPath:String
15 |     private var options:NSKeyValueObservingOptions
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:15:25: error: cannot find type 'NSKeyValueObservingOptions' in scope
13 |     private var block:([NSKeyValueChangeKey:Any]?)->Void
14 |     private var keyPath:String
15 |     private var options:NSKeyValueObservingOptions
   |                         `- error: cannot find type 'NSKeyValueObservingOptions' in scope
16 |     weak private var object:AnyObject?
17 |
/host/spi-builder-workspace/Sources/HSObserver/HSKeyPathObserver.swift:57:94: error: cannot find type 'NSKeyValueChangeKey' in scope
55 |     }
56 |
57 |     override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)
   |                                                                                              `- error: cannot find type 'NSKeyValueChangeKey' in scope
58 |     {
59 |         block(change)
[5/7] Compiling HSObserver HSObserves.swift
[6/7] Compiling HSObserver NSNotification+HSObserver.swift
[7/7] Compiling HSObserver HSObserver.swift
/host/spi-builder-workspace/Sources/HSObserver/HSObserver.swift:92:86: warning: converting non-sendable function value to '@Sendable (Notification) -> Void' may introduce data races
 90 |                                                                               object: object,
 91 |                                                                               queue: queue,
 92 |                                                                               using: block)
    |                                                                                      `- warning: converting non-sendable function value to '@Sendable (Notification) -> Void' may introduce data races
 93 |                 notificationObservers.append(notificationObserver)
 94 |             }
BUILD FAILURE 6.1 android