Build Information
Failed to build SwiftyUserDefaults, reference master (558c01
), with Swift 6.1 for Android on 27 May 2025 22:46:53 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/sunshinejr/SwiftyUserDefaults.git
Reference: master
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/sunshinejr/SwiftyUserDefaults
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 558c015 Update README.md
Cloned https://github.com/sunshinejr/SwiftyUserDefaults.git
Revision (git rev-parse @):
558c015e49524ebf5031b66980a722a4c225c302
SUCCESS checkout https://github.com/sunshinejr/SwiftyUserDefaults.git at master
========================================
Build
========================================
Selected platform: android
Swift version: 6.1
Building package at path: $PWD
https://github.com/sunshinejr/SwiftyUserDefaults.git
https://github.com/sunshinejr/SwiftyUserDefaults.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
],
"manifest_display_name" : "SwiftyUserDefaults",
"name" : "SwiftyUserDefaults",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.11"
},
{
"name" : "ios",
"version" : "9.0"
},
{
"name" : "tvos",
"version" : "9.0"
},
{
"name" : "watchos",
"version" : "2.0"
}
],
"products" : [
{
"name" : "SwiftyUserDefaults",
"targets" : [
"SwiftyUserDefaults"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SwiftyUserDefaults",
"module_type" : "SwiftTarget",
"name" : "SwiftyUserDefaults",
"path" : "Sources",
"product_memberships" : [
"SwiftyUserDefaults"
],
"sources" : [
"BuiltIns.swift",
"Defaults+Observing.swift",
"Defaults+StringToBool.swift",
"Defaults+Subscripts.swift",
"Defaults.swift",
"DefaultsAdapter.swift",
"DefaultsBridges.swift",
"DefaultsKey.swift",
"DefaultsKeys.swift",
"DefaultsObserver.swift",
"DefaultsSerializable.swift",
"OptionalType.swift",
"PropertyWrappers.swift"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
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/15] Compiling SwiftyUserDefaults OptionalType.swift
[4/16] Compiling SwiftyUserDefaults PropertyWrappers.swift
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:28:23: warning: static property 'cached' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | #if swift(>=5.1)
26 | public struct SwiftyUserDefaultOptions: OptionSet {
| `- note: consider making struct 'SwiftyUserDefaultOptions' conform to the 'Sendable' protocol
27 |
28 | public static let cached = SwiftyUserDefaultOptions(rawValue: 1 << 0)
| |- warning: static property 'cached' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'cached' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 | public static let observed = SwiftyUserDefaultOptions(rawValue: 1 << 2)
30 |
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:29:23: warning: static property 'observed' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | #if swift(>=5.1)
26 | public struct SwiftyUserDefaultOptions: OptionSet {
| `- note: consider making struct 'SwiftyUserDefaultOptions' conform to the 'Sendable' protocol
27 |
28 | public static let cached = SwiftyUserDefaultOptions(rawValue: 1 << 0)
29 | public static let observed = SwiftyUserDefaultOptions(rawValue: 1 << 2)
| |- warning: static property 'observed' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'observed' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | public let rawValue: Int
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:32:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
30 |
31 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>,
32 | options: NSKeyValueObservingOptions = [.new, .old],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
33 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
34 | return defaults.observe(key, options: options, handler: handler)
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:38:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
36 |
37 | func observe<T: DefaultsSerializable>(_ keyPath: KeyPath<KeyStore, DefaultsKey<T>>,
38 | options: NSKeyValueObservingOptions = [.old, .new],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
39 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
40 | return defaults.observe(keyStore[keyPath: keyPath],
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:66:35: error: cannot call value of non-function type 'Never'
64 |
65 | if options.contains(.observed) {
66 | observation = adapter.observe(key) { [weak self] update in
| `- error: cannot call value of non-function type 'Never'
67 | self?._value = update.newValue
68 | }
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:66:62: error: cannot infer type of closure parameter 'update' without a type annotation
64 |
65 | if options.contains(.observed) {
66 | observation = adapter.observe(key) { [weak self] update in
| `- error: cannot infer type of closure parameter 'update' without a type annotation
67 | self?._value = update.newValue
68 | }
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:77:36: error: cannot call value of non-function type 'Never'
75 |
76 | if options.contains(.observed) {
77 | observation = Defaults.observe(key) { [weak self] update in
| `- error: cannot call value of non-function type 'Never'
78 | self?._value = update.newValue
79 | }
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:77:63: error: cannot infer type of closure parameter 'update' without a type annotation
75 |
76 | if options.contains(.observed) {
77 | observation = Defaults.observe(key) { [weak self] update in
| `- error: cannot infer type of closure parameter 'update' without a type annotation
78 | self?._value = update.newValue
79 | }
[5/16] Compiling SwiftyUserDefaults DefaultsBridges.swift
[6/16] Compiling SwiftyUserDefaults DefaultsKey.swift
[7/16] Compiling SwiftyUserDefaults Defaults.swift
/host/spi-builder-workspace/Sources/Defaults.swift:35:12: warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | /// ~~~
34 |
35 | public var Defaults = DefaultsAdapter<DefaultsKeys>(defaults: .standard, keyStore: .init())
| |- warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'Defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make var 'Defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 |
37 | public extension UserDefaults {
[8/16] Compiling SwiftyUserDefaults DefaultsAdapter.swift
/host/spi-builder-workspace/Sources/Defaults.swift:35:12: warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | /// ~~~
34 |
35 | public var Defaults = DefaultsAdapter<DefaultsKeys>(defaults: .standard, keyStore: .init())
| |- warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'Defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make var 'Defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 |
37 | public extension UserDefaults {
[9/16] Compiling SwiftyUserDefaults DefaultsKeys.swift
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:36:26: error: cannot find type 'NSKeyValueChange' in scope
34 |
35 | public struct Update {
36 | public let kind: NSKeyValueChange
| `- error: cannot find type 'NSKeyValueChange' in scope
37 | public let indexes: IndexSet?
38 | public let isPrior: Bool
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:42:21: error: cannot find type 'NSKeyValueChangeKey' in scope
40 | public let oldValue: T.T?
41 |
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:51:41: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' previously declared here
34 |
35 | public struct Update {
:
49 | }
50 |
51 | private static func deserialize<T: DefaultsSerializable>(_ value: Any?, for key: DefaultsKey<T>) -> T.T? where T.T == T {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
52 | guard let value = value else { return nil }
53 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:88:94: error: cannot find type 'NSKeyValueChangeKey' in scope
86 |
87 | // swiftlint:disable:next block_based_kvo
88 | public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
89 | guard let change = change, object != nil, keyPath == key._key else {
90 | return
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:44:20: error: cannot find 'NSKeyValueChange' in scope
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
| `- error: cannot find 'NSKeyValueChange' in scope
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:44:53: error: cannot infer contextual base in reference to member 'kindKey'
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
| `- error: cannot infer contextual base in reference to member 'kindKey'
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:45:29: error: cannot infer contextual base in reference to member 'indexesKey'
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
45 | indexes = dict[.indexesKey] as? IndexSet
| `- error: cannot infer contextual base in reference to member 'indexesKey'
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:46:29: error: cannot infer contextual base in reference to member 'notificationIsPriorKey'
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
| `- error: cannot infer contextual base in reference to member 'notificationIsPriorKey'
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:47:49: error: cannot infer contextual base in reference to member 'oldKey'
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
| `- error: cannot infer contextual base in reference to member 'oldKey'
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
49 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:48:49: error: cannot infer contextual base in reference to member 'newKey'
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
| `- error: cannot infer contextual base in reference to member 'newKey'
49 | }
50 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:80:22: error: value of type 'UserDefaults' has no member 'addObserver'
78 | super.init()
79 |
80 | userDefaults.addObserver(self, forKeyPath: key._key, options: options, context: nil)
| `- error: value of type 'UserDefaults' has no member 'addObserver'
81 | }
82 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:80:89: error: 'nil' requires a contextual type
78 | super.init()
79 |
80 | userDefaults.addObserver(self, forKeyPath: key._key, options: options, context: nil)
| `- error: 'nil' requires a contextual type
81 | }
82 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:103:22: error: value of type 'UserDefaults' has no member 'removeObserver'
101 |
102 | didRemoveObserver = true
103 | userDefaults.removeObserver(self, forKeyPath: key._key, context: nil)
| `- error: value of type 'UserDefaults' has no member 'removeObserver'
104 | }
105 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:103:74: error: 'nil' requires a contextual type
101 |
102 | didRemoveObserver = true
103 | userDefaults.removeObserver(self, forKeyPath: key._key, context: nil)
| `- error: 'nil' requires a contextual type
104 | }
105 | }
[10/16] Compiling SwiftyUserDefaults DefaultsObserver.swift
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:36:26: error: cannot find type 'NSKeyValueChange' in scope
34 |
35 | public struct Update {
36 | public let kind: NSKeyValueChange
| `- error: cannot find type 'NSKeyValueChange' in scope
37 | public let indexes: IndexSet?
38 | public let isPrior: Bool
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:42:21: error: cannot find type 'NSKeyValueChangeKey' in scope
40 | public let oldValue: T.T?
41 |
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:51:41: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' previously declared here
34 |
35 | public struct Update {
:
49 | }
50 |
51 | private static func deserialize<T: DefaultsSerializable>(_ value: Any?, for key: DefaultsKey<T>) -> T.T? where T.T == T {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
52 | guard let value = value else { return nil }
53 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:88:94: error: cannot find type 'NSKeyValueChangeKey' in scope
86 |
87 | // swiftlint:disable:next block_based_kvo
88 | public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
89 | guard let change = change, object != nil, keyPath == key._key else {
90 | return
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:44:20: error: cannot find 'NSKeyValueChange' in scope
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
| `- error: cannot find 'NSKeyValueChange' in scope
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:44:53: error: cannot infer contextual base in reference to member 'kindKey'
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
| `- error: cannot infer contextual base in reference to member 'kindKey'
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:45:29: error: cannot infer contextual base in reference to member 'indexesKey'
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
45 | indexes = dict[.indexesKey] as? IndexSet
| `- error: cannot infer contextual base in reference to member 'indexesKey'
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:46:29: error: cannot infer contextual base in reference to member 'notificationIsPriorKey'
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
| `- error: cannot infer contextual base in reference to member 'notificationIsPriorKey'
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:47:49: error: cannot infer contextual base in reference to member 'oldKey'
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
| `- error: cannot infer contextual base in reference to member 'oldKey'
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
49 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:48:49: error: cannot infer contextual base in reference to member 'newKey'
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
| `- error: cannot infer contextual base in reference to member 'newKey'
49 | }
50 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:80:22: error: value of type 'UserDefaults' has no member 'addObserver'
78 | super.init()
79 |
80 | userDefaults.addObserver(self, forKeyPath: key._key, options: options, context: nil)
| `- error: value of type 'UserDefaults' has no member 'addObserver'
81 | }
82 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:80:89: error: 'nil' requires a contextual type
78 | super.init()
79 |
80 | userDefaults.addObserver(self, forKeyPath: key._key, options: options, context: nil)
| `- error: 'nil' requires a contextual type
81 | }
82 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:103:22: error: value of type 'UserDefaults' has no member 'removeObserver'
101 |
102 | didRemoveObserver = true
103 | userDefaults.removeObserver(self, forKeyPath: key._key, context: nil)
| `- error: value of type 'UserDefaults' has no member 'removeObserver'
104 | }
105 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:103:74: error: 'nil' requires a contextual type
101 |
102 | didRemoveObserver = true
103 | userDefaults.removeObserver(self, forKeyPath: key._key, context: nil)
| `- error: 'nil' requires a contextual type
104 | }
105 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[11/16] Compiling SwiftyUserDefaults Defaults+StringToBool.swift
[12/16] Compiling SwiftyUserDefaults Defaults+Subscripts.swift
[13/16] Emitting module SwiftyUserDefaults
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:32:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
30 |
31 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>,
32 | options: NSKeyValueObservingOptions = [.new, .old],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
33 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
34 | return defaults.observe(key, options: options, handler: handler)
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:38:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
36 |
37 | func observe<T: DefaultsSerializable>(_ keyPath: KeyPath<KeyStore, DefaultsKey<T>>,
38 | options: NSKeyValueObservingOptions = [.old, .new],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
39 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
40 | return defaults.observe(keyStore[keyPath: keyPath],
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:48:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
46 | public extension UserDefaults {
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
50 | }
/host/spi-builder-workspace/Sources/Defaults.swift:35:12: warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | /// ~~~
34 |
35 | public var Defaults = DefaultsAdapter<DefaultsKeys>(defaults: .standard, keyStore: .init())
| |- warning: var 'Defaults' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'Defaults' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make var 'Defaults' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 |
37 | public extension UserDefaults {
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:36:26: error: cannot find type 'NSKeyValueChange' in scope
34 |
35 | public struct Update {
36 | public let kind: NSKeyValueChange
| `- error: cannot find type 'NSKeyValueChange' in scope
37 | public let indexes: IndexSet?
38 | public let isPrior: Bool
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:42:21: error: cannot find type 'NSKeyValueChangeKey' in scope
40 | public let oldValue: T.T?
41 |
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:51:41: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' previously declared here
34 |
35 | public struct Update {
:
49 | }
50 |
51 | private static func deserialize<T: DefaultsSerializable>(_ value: Any?, for key: DefaultsKey<T>) -> T.T? where T.T == T {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
52 | guard let value = value else { return nil }
53 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:88:94: error: cannot find type 'NSKeyValueChangeKey' in scope
86 |
87 | // swiftlint:disable:next block_based_kvo
88 | public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
89 | guard let change = change, object != nil, keyPath == key._key else {
90 | return
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:28:23: warning: static property 'cached' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | #if swift(>=5.1)
26 | public struct SwiftyUserDefaultOptions: OptionSet {
| `- note: consider making struct 'SwiftyUserDefaultOptions' conform to the 'Sendable' protocol
27 |
28 | public static let cached = SwiftyUserDefaultOptions(rawValue: 1 << 0)
| |- warning: static property 'cached' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'cached' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
29 | public static let observed = SwiftyUserDefaultOptions(rawValue: 1 << 2)
30 |
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:29:23: warning: static property 'observed' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
24 |
25 | #if swift(>=5.1)
26 | public struct SwiftyUserDefaultOptions: OptionSet {
| `- note: consider making struct 'SwiftyUserDefaultOptions' conform to the 'Sendable' protocol
27 |
28 | public static let cached = SwiftyUserDefaultOptions(rawValue: 1 << 0)
29 | public static let observed = SwiftyUserDefaultOptions(rawValue: 1 << 2)
| |- warning: static property 'observed' is not concurrency-safe because non-'Sendable' type 'SwiftyUserDefaultOptions' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'observed' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
30 |
31 | public let rawValue: Int
[14/16] Compiling SwiftyUserDefaults BuiltIns.swift
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:32:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
30 |
31 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>,
32 | options: NSKeyValueObservingOptions = [.new, .old],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
33 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
34 | return defaults.observe(key, options: options, handler: handler)
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:38:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
36 |
37 | func observe<T: DefaultsSerializable>(_ keyPath: KeyPath<KeyStore, DefaultsKey<T>>,
38 | options: NSKeyValueObservingOptions = [.old, .new],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
39 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
40 | return defaults.observe(keyStore[keyPath: keyPath],
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:48:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
46 | public extension UserDefaults {
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
50 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:49:16: error: generic parameter 'T' could not be inferred
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
| |- error: generic parameter 'T' could not be inferred
| `- note: explicitly specify the generic arguments to fix this issue
50 | }
51 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:33:37: note: 'T' declared as parameter to type 'DefaultsObserver'
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' declared as parameter to type 'DefaultsObserver'
34 |
35 | public struct Update {
[15/16] Compiling SwiftyUserDefaults Defaults+Observing.swift
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:32:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
30 |
31 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>,
32 | options: NSKeyValueObservingOptions = [.new, .old],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
33 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
34 | return defaults.observe(key, options: options, handler: handler)
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:38:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
36 |
37 | func observe<T: DefaultsSerializable>(_ keyPath: KeyPath<KeyStore, DefaultsKey<T>>,
38 | options: NSKeyValueObservingOptions = [.old, .new],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
39 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
40 | return defaults.observe(keyStore[keyPath: keyPath],
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:48:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
46 | public extension UserDefaults {
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
50 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:49:16: error: generic parameter 'T' could not be inferred
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
| |- error: generic parameter 'T' could not be inferred
| `- note: explicitly specify the generic arguments to fix this issue
50 | }
51 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:33:37: note: 'T' declared as parameter to type 'DefaultsObserver'
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' declared as parameter to type 'DefaultsObserver'
34 |
35 | public struct Update {
[16/16] Compiling SwiftyUserDefaults DefaultsSerializable.swift
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/14] Compiling SwiftyUserDefaults DefaultsSerializable.swift
[3/14] Compiling SwiftyUserDefaults OptionalType.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/15] Emitting module SwiftyUserDefaults
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:32:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
30 |
31 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>,
32 | options: NSKeyValueObservingOptions = [.new, .old],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
33 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
34 | return defaults.observe(key, options: options, handler: handler)
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:38:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
36 |
37 | func observe<T: DefaultsSerializable>(_ keyPath: KeyPath<KeyStore, DefaultsKey<T>>,
38 | options: NSKeyValueObservingOptions = [.old, .new],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
39 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
40 | return defaults.observe(keyStore[keyPath: keyPath],
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:48:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
46 | public extension UserDefaults {
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
50 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:36:26: error: cannot find type 'NSKeyValueChange' in scope
34 |
35 | public struct Update {
36 | public let kind: NSKeyValueChange
| `- error: cannot find type 'NSKeyValueChange' in scope
37 | public let indexes: IndexSet?
38 | public let isPrior: Bool
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:42:21: error: cannot find type 'NSKeyValueChangeKey' in scope
40 | public let oldValue: T.T?
41 |
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:51:41: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' previously declared here
34 |
35 | public struct Update {
:
49 | }
50 |
51 | private static func deserialize<T: DefaultsSerializable>(_ value: Any?, for key: DefaultsKey<T>) -> T.T? where T.T == T {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
52 | guard let value = value else { return nil }
53 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:88:94: error: cannot find type 'NSKeyValueChangeKey' in scope
86 |
87 | // swiftlint:disable:next block_based_kvo
88 | public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
89 | guard let change = change, object != nil, keyPath == key._key else {
90 | return
[5/15] Compiling SwiftyUserDefaults BuiltIns.swift
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:32:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
30 |
31 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>,
32 | options: NSKeyValueObservingOptions = [.new, .old],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
33 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
34 | return defaults.observe(key, options: options, handler: handler)
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:38:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
36 |
37 | func observe<T: DefaultsSerializable>(_ keyPath: KeyPath<KeyStore, DefaultsKey<T>>,
38 | options: NSKeyValueObservingOptions = [.old, .new],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
39 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
40 | return defaults.observe(keyStore[keyPath: keyPath],
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:48:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
46 | public extension UserDefaults {
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
50 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:49:16: error: generic parameter 'T' could not be inferred
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
| |- error: generic parameter 'T' could not be inferred
| `- note: explicitly specify the generic arguments to fix this issue
50 | }
51 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:33:37: note: 'T' declared as parameter to type 'DefaultsObserver'
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' declared as parameter to type 'DefaultsObserver'
34 |
35 | public struct Update {
[6/15] Compiling SwiftyUserDefaults Defaults+Observing.swift
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:32:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
30 |
31 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>,
32 | options: NSKeyValueObservingOptions = [.new, .old],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
33 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
34 | return defaults.observe(key, options: options, handler: handler)
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:38:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
36 |
37 | func observe<T: DefaultsSerializable>(_ keyPath: KeyPath<KeyStore, DefaultsKey<T>>,
38 | options: NSKeyValueObservingOptions = [.old, .new],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
39 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
40 | return defaults.observe(keyStore[keyPath: keyPath],
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:48:75: error: cannot find type 'NSKeyValueObservingOptions' in scope
46 | public extension UserDefaults {
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
50 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:49:16: error: generic parameter 'T' could not be inferred
47 |
48 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>, options: NSKeyValueObservingOptions = [.old, .new], handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
49 | return DefaultsObserver(key: key, userDefaults: self, options: options, handler: handler)
| |- error: generic parameter 'T' could not be inferred
| `- note: explicitly specify the generic arguments to fix this issue
50 | }
51 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:33:37: note: 'T' declared as parameter to type 'DefaultsObserver'
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' declared as parameter to type 'DefaultsObserver'
34 |
35 | public struct Update {
[7/15] Compiling SwiftyUserDefaults PropertyWrappers.swift
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:32:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
30 |
31 | func observe<T: DefaultsSerializable>(_ key: DefaultsKey<T>,
32 | options: NSKeyValueObservingOptions = [.new, .old],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
33 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
34 | return defaults.observe(key, options: options, handler: handler)
/host/spi-builder-workspace/Sources/Defaults+Observing.swift:38:52: error: cannot find type 'NSKeyValueObservingOptions' in scope
36 |
37 | func observe<T: DefaultsSerializable>(_ keyPath: KeyPath<KeyStore, DefaultsKey<T>>,
38 | options: NSKeyValueObservingOptions = [.old, .new],
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
39 | handler: @escaping (DefaultsObserver<T>.Update) -> Void) -> DefaultsDisposable {
40 | return defaults.observe(keyStore[keyPath: keyPath],
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:66:35: error: cannot call value of non-function type 'Never'
64 |
65 | if options.contains(.observed) {
66 | observation = adapter.observe(key) { [weak self] update in
| `- error: cannot call value of non-function type 'Never'
67 | self?._value = update.newValue
68 | }
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:66:62: error: cannot infer type of closure parameter 'update' without a type annotation
64 |
65 | if options.contains(.observed) {
66 | observation = adapter.observe(key) { [weak self] update in
| `- error: cannot infer type of closure parameter 'update' without a type annotation
67 | self?._value = update.newValue
68 | }
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:77:36: error: cannot call value of non-function type 'Never'
75 |
76 | if options.contains(.observed) {
77 | observation = Defaults.observe(key) { [weak self] update in
| `- error: cannot call value of non-function type 'Never'
78 | self?._value = update.newValue
79 | }
/host/spi-builder-workspace/Sources/PropertyWrappers.swift:77:63: error: cannot infer type of closure parameter 'update' without a type annotation
75 |
76 | if options.contains(.observed) {
77 | observation = Defaults.observe(key) { [weak self] update in
| `- error: cannot infer type of closure parameter 'update' without a type annotation
78 | self?._value = update.newValue
79 | }
[8/15] Compiling SwiftyUserDefaults Defaults.swift
[9/15] Compiling SwiftyUserDefaults DefaultsAdapter.swift
[10/15] Compiling SwiftyUserDefaults Defaults+StringToBool.swift
[11/15] Compiling SwiftyUserDefaults Defaults+Subscripts.swift
[12/15] Compiling SwiftyUserDefaults DefaultsBridges.swift
[13/15] Compiling SwiftyUserDefaults DefaultsKey.swift
[14/15] Compiling SwiftyUserDefaults DefaultsKeys.swift
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:36:26: error: cannot find type 'NSKeyValueChange' in scope
34 |
35 | public struct Update {
36 | public let kind: NSKeyValueChange
| `- error: cannot find type 'NSKeyValueChange' in scope
37 | public let indexes: IndexSet?
38 | public let isPrior: Bool
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:42:21: error: cannot find type 'NSKeyValueChangeKey' in scope
40 | public let oldValue: T.T?
41 |
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:51:41: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' previously declared here
34 |
35 | public struct Update {
:
49 | }
50 |
51 | private static func deserialize<T: DefaultsSerializable>(_ value: Any?, for key: DefaultsKey<T>) -> T.T? where T.T == T {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
52 | guard let value = value else { return nil }
53 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:88:94: error: cannot find type 'NSKeyValueChangeKey' in scope
86 |
87 | // swiftlint:disable:next block_based_kvo
88 | public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
89 | guard let change = change, object != nil, keyPath == key._key else {
90 | return
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:44:20: error: cannot find 'NSKeyValueChange' in scope
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
| `- error: cannot find 'NSKeyValueChange' in scope
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:44:53: error: cannot infer contextual base in reference to member 'kindKey'
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
| `- error: cannot infer contextual base in reference to member 'kindKey'
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:45:29: error: cannot infer contextual base in reference to member 'indexesKey'
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
45 | indexes = dict[.indexesKey] as? IndexSet
| `- error: cannot infer contextual base in reference to member 'indexesKey'
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:46:29: error: cannot infer contextual base in reference to member 'notificationIsPriorKey'
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
| `- error: cannot infer contextual base in reference to member 'notificationIsPriorKey'
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:47:49: error: cannot infer contextual base in reference to member 'oldKey'
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
| `- error: cannot infer contextual base in reference to member 'oldKey'
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
49 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:48:49: error: cannot infer contextual base in reference to member 'newKey'
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
| `- error: cannot infer contextual base in reference to member 'newKey'
49 | }
50 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:80:22: error: value of type 'UserDefaults' has no member 'addObserver'
78 | super.init()
79 |
80 | userDefaults.addObserver(self, forKeyPath: key._key, options: options, context: nil)
| `- error: value of type 'UserDefaults' has no member 'addObserver'
81 | }
82 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:80:89: error: 'nil' requires a contextual type
78 | super.init()
79 |
80 | userDefaults.addObserver(self, forKeyPath: key._key, options: options, context: nil)
| `- error: 'nil' requires a contextual type
81 | }
82 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:103:22: error: value of type 'UserDefaults' has no member 'removeObserver'
101 |
102 | didRemoveObserver = true
103 | userDefaults.removeObserver(self, forKeyPath: key._key, context: nil)
| `- error: value of type 'UserDefaults' has no member 'removeObserver'
104 | }
105 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:103:74: error: 'nil' requires a contextual type
101 |
102 | didRemoveObserver = true
103 | userDefaults.removeObserver(self, forKeyPath: key._key, context: nil)
| `- error: 'nil' requires a contextual type
104 | }
105 | }
[15/15] Compiling SwiftyUserDefaults DefaultsObserver.swift
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:74:68: error: cannot find type 'NSKeyValueObservingOptions' in scope
72 | private var didRemoveObserver = false
73 |
74 | init(key: DefaultsKey<T>, userDefaults: UserDefaults, options: NSKeyValueObservingOptions, handler: @escaping ((Update) -> Void)) {
| `- error: cannot find type 'NSKeyValueObservingOptions' in scope
75 | self.key = key
76 | self.userDefaults = userDefaults
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:36:26: error: cannot find type 'NSKeyValueChange' in scope
34 |
35 | public struct Update {
36 | public let kind: NSKeyValueChange
| `- error: cannot find type 'NSKeyValueChange' in scope
37 | public let indexes: IndexSet?
38 | public let isPrior: Bool
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:42:21: error: cannot find type 'NSKeyValueChangeKey' in scope
40 | public let oldValue: T.T?
41 |
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:51:41: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
31 | #if !os(Linux)
32 |
33 | public final class DefaultsObserver<T: DefaultsSerializable>: NSObject, DefaultsDisposable where T == T.T {
| `- note: 'T' previously declared here
34 |
35 | public struct Update {
:
49 | }
50 |
51 | private static func deserialize<T: DefaultsSerializable>(_ value: Any?, for key: DefaultsKey<T>) -> T.T? where T.T == T {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
52 | guard let value = value else { return nil }
53 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:88:94: error: cannot find type 'NSKeyValueChangeKey' in scope
86 |
87 | // swiftlint:disable:next block_based_kvo
88 | public override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
| `- error: cannot find type 'NSKeyValueChangeKey' in scope
89 | guard let change = change, object != nil, keyPath == key._key else {
90 | return
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:44:20: error: cannot find 'NSKeyValueChange' in scope
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
| `- error: cannot find 'NSKeyValueChange' in scope
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:44:53: error: cannot infer contextual base in reference to member 'kindKey'
42 | init(dict: [NSKeyValueChangeKey: Any], key: DefaultsKey<T>) {
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
| `- error: cannot infer contextual base in reference to member 'kindKey'
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:45:29: error: cannot infer contextual base in reference to member 'indexesKey'
43 | // swiftlint:disable:next force_cast
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
45 | indexes = dict[.indexesKey] as? IndexSet
| `- error: cannot infer contextual base in reference to member 'indexesKey'
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:46:29: error: cannot infer contextual base in reference to member 'notificationIsPriorKey'
44 | kind = NSKeyValueChange(rawValue: dict[.kindKey] as! UInt)!
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
| `- error: cannot infer contextual base in reference to member 'notificationIsPriorKey'
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:47:49: error: cannot infer contextual base in reference to member 'oldKey'
45 | indexes = dict[.indexesKey] as? IndexSet
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
| `- error: cannot infer contextual base in reference to member 'oldKey'
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
49 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:48:49: error: cannot infer contextual base in reference to member 'newKey'
46 | isPrior = dict[.notificationIsPriorKey] as? Bool ?? false
47 | oldValue = Update.deserialize(dict[.oldKey], for: key) ?? key.defaultValue
48 | newValue = Update.deserialize(dict[.newKey], for: key) ?? key.defaultValue
| `- error: cannot infer contextual base in reference to member 'newKey'
49 | }
50 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:80:22: error: value of type 'UserDefaults' has no member 'addObserver'
78 | super.init()
79 |
80 | userDefaults.addObserver(self, forKeyPath: key._key, options: options, context: nil)
| `- error: value of type 'UserDefaults' has no member 'addObserver'
81 | }
82 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:80:89: error: 'nil' requires a contextual type
78 | super.init()
79 |
80 | userDefaults.addObserver(self, forKeyPath: key._key, options: options, context: nil)
| `- error: 'nil' requires a contextual type
81 | }
82 |
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:103:22: error: value of type 'UserDefaults' has no member 'removeObserver'
101 |
102 | didRemoveObserver = true
103 | userDefaults.removeObserver(self, forKeyPath: key._key, context: nil)
| `- error: value of type 'UserDefaults' has no member 'removeObserver'
104 | }
105 | }
/host/spi-builder-workspace/Sources/DefaultsObserver.swift:103:74: error: 'nil' requires a contextual type
101 |
102 | didRemoveObserver = true
103 | userDefaults.removeObserver(self, forKeyPath: key._key, context: nil)
| `- error: 'nil' requires a contextual type
104 | }
105 | }
BUILD FAILURE 6.1 android