Build Information
Successful build of VanMoofKit, reference main (d258b2
), with Swift 6.1 for macOS (SPM) on 29 Apr 2025 06:11:06 UTC.
Swift 6 data race errors: 7
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -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
Build Log
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[97/117] Compiling VanMoofKit VanMoof+Bike+BluetoothServices+Defence+AlarmModeCharacteristic.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:164:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
162 | DispatchQueue.main.async { [weak self] in
163 | // Send didAuthenticated
164 | self?.send(
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:166:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
164 | self?.send(
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'peripheral' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | characteristic: characteristic,
168 | error: error
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:167:41: warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
167 | characteristic: characteristic,
| |- warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[98/117] Compiling VanMoofKit VanMoof+Bike+BluetoothServices+Defence+AlarmStateCharacteristic.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:164:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
162 | DispatchQueue.main.async { [weak self] in
163 | // Send didAuthenticated
164 | self?.send(
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:166:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
164 | self?.send(
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'peripheral' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | characteristic: characteristic,
168 | error: error
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:167:41: warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
167 | characteristic: characteristic,
| |- warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[99/117] Compiling VanMoofKit VanMoof+Bike+BluetoothServices+Defence+LockStateCharacteristic.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:164:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
162 | DispatchQueue.main.async { [weak self] in
163 | // Send didAuthenticated
164 | self?.send(
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:166:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
164 | self?.send(
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'peripheral' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | characteristic: characteristic,
168 | error: error
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:167:41: warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
167 | characteristic: characteristic,
| |- warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[100/117] Compiling VanMoofKit VanMoof+Bike+BluetoothServices+Defence+UnlockRequestCharacteristic.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:164:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
162 | DispatchQueue.main.async { [weak self] in
163 | // Send didAuthenticated
164 | self?.send(
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:166:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
164 | self?.send(
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'peripheral' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | characteristic: characteristic,
168 | error: error
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:167:41: warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
167 | characteristic: characteristic,
| |- warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[101/117] Compiling VanMoofKit VanMoof+Bike+BluetoothServices+Defence.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:164:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
162 | DispatchQueue.main.async { [weak self] in
163 | // Send didAuthenticated
164 | self?.send(
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:166:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
164 | self?.send(
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'peripheral' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | characteristic: characteristic,
168 | error: error
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:167:41: warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
167 | characteristic: characteristic,
| |- warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[102/117] Compiling VanMoofKit VanMoof+Bike+BluetoothServices+Firmware+BlockCharacteristic.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:164:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
162 | DispatchQueue.main.async { [weak self] in
163 | // Send didAuthenticated
164 | self?.send(
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:166:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
164 | self?.send(
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'peripheral' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | characteristic: characteristic,
168 | error: error
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:167:41: warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
167 | characteristic: characteristic,
| |- warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[103/117] Compiling VanMoofKit VanMoof+Bike+BluetoothServices+Firmware+MetadataCharacteristic.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:164:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
162 | DispatchQueue.main.async { [weak self] in
163 | // Send didAuthenticated
164 | self?.send(
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:166:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
164 | self?.send(
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'peripheral' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | characteristic: characteristic,
168 | error: error
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:167:41: warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
167 | characteristic: characteristic,
| |- warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[104/117] Compiling VanMoofKit VanMoof+Bike+BluetoothServices+Firmware.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:164:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
162 | DispatchQueue.main.async { [weak self] in
163 | // Send didAuthenticated
164 | self?.send(
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:166:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
164 | self?.send(
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'peripheral' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
167 | characteristic: characteristic,
168 | error: error
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:167:41: warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
165 | .didAuthenticatedPeripheral(
166 | peripheral: peripheral,
167 | characteristic: characteristic,
| |- warning: sending 'characteristic' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'characteristic' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
168 | error: error
169 | )
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift:175:22: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | if error != nil {
174 | // Perform Task
175 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | // Disconnect as authentication failed
177 | try await self.disconnect()
| `- note: closure captures 'self' which is accessible to code in the current task
178 | }
179 | }
[105/117] Compiling VanMoofKit VanMoof+Bike.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[106/117] Compiling VanMoofKit InMemoryVanMoofTokenStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[107/117] Compiling VanMoofKit KeychainVanMoofTokenStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[108/117] Compiling VanMoofKit LARightVanMoofTokenStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[109/117] Compiling VanMoofKit NSUbiquitousVanMoofTokenStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[110/117] Compiling VanMoofKit ObservableObjectVanMoofTokenMediator.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[111/117] Compiling VanMoofKit UserDefaultsVanMoofTokenStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[112/117] Compiling VanMoofKit VanMoofTokenStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[113/117] Compiling VanMoofKit VanMoof+User.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[114/117] Compiling VanMoofKit VanMoof.swift
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | /// An InMemory based VanMoofTokenStore
6 | public final class InMemoryVanMoofTokenStore: ObservableObject {
| `- note: class 'InMemoryVanMoofTokenStore' does not conform to the 'Sendable' protocol
7 |
8 | // MARK: Static-Properties
9 |
10 | /// The shared `InMemoryVanMoofTokenStore` instance
11 | public static let shared = InMemoryVanMoofTokenStore()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'InMemoryVanMoofTokenStore' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:54: warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| `- warning: type 'LAPersistedRight' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
77 | return authorizedRight
78 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPersistedRight.h:14:12: note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
12 | /// @brief A type of right that, when authorized, grants access to a key and secret
13 | API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(watchos, tvos)
14 | @interface LAPersistedRight: LARight
| `- note: class 'LAPersistedRight' does not conform to the 'Sendable' protocol
15 |
16 | /// @brief Managed private key
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:3:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
1 | #if os(iOS) || os(macOS)
2 | import Foundation
3 | import LocalAuthentication
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'LocalAuthentication'
4 |
5 | // MARK: - LARightVanMoofTokenStore
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:12:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | /// The default `VanMoof` instance
12 | public static var `default` = VanMoof()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 |
14 | // MARK: Properties
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/Bike/VanMoof+Bike.swift:64:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
62 | }
63 | // Reconnect
64 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
65 | try await self.connect()
| `- note: closure captures 'self' which is accessible to code in the current task
66 | }
67 | default:
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:38:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
36 | public func token() async throws -> VanMoof.Token? {
37 | await MainActor.run {
38 | self.token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
39 | }
40 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:46:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
44 | public func save(token: VanMoof.Token) async throws {
45 | await MainActor.run {
46 | self.token = token
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
47 | }
48 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/InMemoryVanMoofTokenStore.swift:53:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
51 | public func removeToken() async throws {
52 | await MainActor.run {
53 | self.token = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:183:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
181 | await MainActor.run {
182 | // Send object will change
183 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
184 | }
185 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/KeychainVanMoofTokenStore.swift:203:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
201 | await MainActor.run {
202 | // Send object will change
203 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
204 | }
205 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:40: warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'right' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'right' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
| `- note: access can happen concurrently
89 | }() else {
90 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:76:66: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | public func token() async throws -> VanMoof.Token? {
75 | guard let authorizedRight: LAPersistedRight = try await {
76 | if let authorizedRight = await MainActor.run(body: { self.authorizedRight }) {
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | return authorizedRight
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:86:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
84 | )
85 | await MainActor.run {
86 | self.authorizedRight = right
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
87 | }
88 | return right
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:108:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
106 | )
107 | _ = await MainActor.run {
108 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
109 | }
110 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/LARightVanMoofTokenStore.swift:118:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
116 | )
117 | _ = await MainActor.run {
118 | self.authorizedRight = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
119 | }
120 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:76:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
74 | )
75 | await MainActor.run {
76 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
77 | }
78 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/NSUbiquitousVanMoofTokenStore.swift:84:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
82 | self.keyValueStore.removeObject(forKey: self.key)
83 | await MainActor.run {
84 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
85 | }
86 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/ObservableObjectVanMoofTokenMediator.swift:81:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
79 | await MainActor.run {
80 | // Send changes
81 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
82 | }
83 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:64:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
62 | )
63 | await MainActor.run {
64 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/TokenStore/UserDefaultsVanMoofTokenStore.swift:72:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
70 | self.userDefaults.removeObject(forKey: self.key)
71 | await MainActor.run {
72 | self.objectWillChange.send()
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
73 | }
74 | }
/Users/admin/builder/spi-builder-workspace/Sources/VanMoofKit/VanMoof.swift:85:26: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
83 | .flatMap {
84 | Future { promise in
85 | Task { [weak self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
86 | guard let self = self else {
| `- note: closure captures non-Sendable 'self'
87 | return promise(.success(nil))
| `- note: closure captures non-Sendable 'promise'
88 | }
89 | promise(.success(await self.authenticationState))
[115/119] Compiling VanMoofCLI VanMoofCLI.swift
[116/119] Emitting module VanMoofCLI
[116/119] Write Objects.LinkFileList
[117/119] Linking vanmoof
[118/119] Applying vanmoof
Build complete! (6.60s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "VanMoofKit",
"name" : "VanMoofKit",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "15.0"
},
{
"name" : "tvos",
"version" : "15.0"
},
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "watchos",
"version" : "9.0"
},
{
"name" : "visionos",
"version" : "1.0"
}
],
"products" : [
{
"name" : "VanMoofKit",
"targets" : [
"VanMoofKit"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "vanmoof",
"targets" : [
"VanMoofCLI"
],
"type" : {
"executable" : null
}
}
],
"targets" : [
{
"c99name" : "VanMoofKitTests",
"module_type" : "SwiftTarget",
"name" : "VanMoofKitTests",
"path" : "Tests/VanMoofKitTests",
"sources" : [
"VanMoofTests.swift"
],
"target_dependencies" : [
"VanMoofKit"
],
"type" : "test"
},
{
"c99name" : "VanMoofKit",
"module_type" : "SwiftTarget",
"name" : "VanMoofKit",
"path" : "Sources/VanMoofKit",
"product_memberships" : [
"VanMoofKit",
"vanmoof"
],
"sources" : [
"Authentication/VanMoof+AuthenticationState.swift",
"Authentication/VanMoof+Credentials.swift",
"Authentication/VanMoof+Token+Key.swift",
"Authentication/VanMoof+Token+MissingError.swift",
"Authentication/VanMoof+Token.swift",
"Bike/API/VanMoof+Bike+AlarmMode.swift",
"Bike/API/VanMoof+Bike+AlarmState.swift",
"Bike/API/VanMoof+Bike+BatteryLevel.swift",
"Bike/API/VanMoof+Bike+BatteryState.swift",
"Bike/API/VanMoof+Bike+BellSound.swift",
"Bike/API/VanMoof+Bike+ClockDate.swift",
"Bike/API/VanMoof+Bike+CommunicationError.swift",
"Bike/API/VanMoof+Bike+Connect.swift",
"Bike/API/VanMoof+Bike+ConnectionState.swift",
"Bike/API/VanMoof+Bike+Disconnect.swift",
"Bike/API/VanMoof+Bike+ErrorCode.swift",
"Bike/API/VanMoof+Bike+Execute.swift",
"Bike/API/VanMoof+Bike+FirmwareVersions.swift",
"Bike/API/VanMoof+Bike+LightMode.swift",
"Bike/API/VanMoof+Bike+LockState.swift",
"Bike/API/VanMoof+Bike+ModuleState.swift",
"Bike/API/VanMoof+Bike+PlaySound.swift",
"Bike/API/VanMoof+Bike+PowerLevel.swift",
"Bike/API/VanMoof+Bike+SignalStrength.swift",
"Bike/API/VanMoof+Bike+SoundVolume.swift",
"Bike/API/VanMoof+Bike+Speed.swift",
"Bike/API/VanMoof+Bike+SpeedLimit.swift",
"Bike/API/VanMoof+Bike+TotalDistance.swift",
"Bike/API/VanMoof+Bike+UnitSystem.swift",
"Bike/Bluetooth/Crypto/VanMoof+Bike+BluetoothCrypto.swift",
"Bike/Bluetooth/Data/VanMoof+Bike+BluetoothData.swift",
"Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager+API.swift",
"Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager+CBCentralManagerDelegate.swift",
"Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager+CBPeripheralDelegate.swift",
"Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager+Event.swift",
"Bike/Bluetooth/Manager/VanMoof+Bike+BluetoothManager.swift",
"Bike/Bluetooth/Services/Defence/VanMoof+Bike+BluetoothServices+Defence+AlarmModeCharacteristic.swift",
"Bike/Bluetooth/Services/Defence/VanMoof+Bike+BluetoothServices+Defence+AlarmStateCharacteristic.swift",
"Bike/Bluetooth/Services/Defence/VanMoof+Bike+BluetoothServices+Defence+LockStateCharacteristic.swift",
"Bike/Bluetooth/Services/Defence/VanMoof+Bike+BluetoothServices+Defence+UnlockRequestCharacteristic.swift",
"Bike/Bluetooth/Services/Defence/VanMoof+Bike+BluetoothServices+Defence.swift",
"Bike/Bluetooth/Services/Firmware/VanMoof+Bike+BluetoothServices+Firmware+BlockCharacteristic.swift",
"Bike/Bluetooth/Services/Firmware/VanMoof+Bike+BluetoothServices+Firmware+MetadataCharacteristic.swift",
"Bike/Bluetooth/Services/Firmware/VanMoof+Bike+BluetoothServices+Firmware.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+BLEChipFirmwareVersionCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+BatteryFirmwareVersionCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+BikeFirmwareVersionCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+ControllerFirmwareVersionCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+EShifterFirmwareVersionCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+GSMFirmwareVersionCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+ModuleBatteryLevelCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+ModuleBatteryStateCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+MotorBatteryLevelCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+MotorBatteryStateCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info+PCBAHardwareVersionCharacteristic.swift",
"Bike/Bluetooth/Services/Info/VanMoof+Bike+BluetoothServices+Info.swift",
"Bike/Bluetooth/Services/Light/VanMoof+Bike+BluetoothServices+Light+ModeCharacteristic.swift",
"Bike/Bluetooth/Services/Light/VanMoof+Bike+BluetoothServices+Light.swift",
"Bike/Bluetooth/Services/Maintenance/VanMoof+Bike+BluetoothServices+Maintenance+LogBlockCharacteristic.swift",
"Bike/Bluetooth/Services/Maintenance/VanMoof+Bike+BluetoothServices+Maintenance+LogModeCharacteristic.swift",
"Bike/Bluetooth/Services/Maintenance/VanMoof+Bike+BluetoothServices+Maintenance+LogSizeCharacteristic.swift",
"Bike/Bluetooth/Services/Maintenance/VanMoof+Bike+BluetoothServices+Maintenance.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement+DistanceCharacteristic.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement+EShifterGearCharacteristic.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement+EShifterModeCharacteristic.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement+EShiftingPointsCharacteristic.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement+PowerLevelCharacteristic.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement+SpeedCharacteristic.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement+SpeedLimitCharacteristic.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement+UnitSystemCharacteristic.swift",
"Bike/Bluetooth/Services/Movement/VanMoof+Bike+BluetoothServices+Movement.swift",
"Bike/Bluetooth/Services/Security/VanMoof+Bike+BluetoothServices+Security+BackupCodeCharacteristic.swift",
"Bike/Bluetooth/Services/Security/VanMoof+Bike+BluetoothServices+Security+BikeMessageCharacteristic.swift",
"Bike/Bluetooth/Services/Security/VanMoof+Bike+BluetoothServices+Security+ChallengeCharacteristic.swift",
"Bike/Bluetooth/Services/Security/VanMoof+Bike+BluetoothServices+Security+KeyIndexCharacteristic.swift",
"Bike/Bluetooth/Services/Security/VanMoof+Bike+BluetoothServices+Security.swift",
"Bike/Bluetooth/Services/Sound/VanMoof+Bike+BluetoothServices+Sound+BellSoundCharacteristic.swift",
"Bike/Bluetooth/Services/Sound/VanMoof+Bike+BluetoothServices+Sound+PlaySoundCharacteristic.swift",
"Bike/Bluetooth/Services/Sound/VanMoof+Bike+BluetoothServices+Sound+SoundVolumeCharacteristic.swift",
"Bike/Bluetooth/Services/Sound/VanMoof+Bike+BluetoothServices+Sound.swift",
"Bike/Bluetooth/Services/State/VanMoof+Bike+BluetoothServices+State+ClockCharacteristic.swift",
"Bike/Bluetooth/Services/State/VanMoof+Bike+BluetoothServices+State+ErrorsCharacteristic.swift",
"Bike/Bluetooth/Services/State/VanMoof+Bike+BluetoothServices+State+ModuleModeCharacteristic.swift",
"Bike/Bluetooth/Services/State/VanMoof+Bike+BluetoothServices+State+ModuleStateCharacteristic.swift",
"Bike/Bluetooth/Services/State/VanMoof+Bike+BluetoothServices+State+WheelSizeCharacteristic.swift",
"Bike/Bluetooth/Services/State/VanMoof+Bike+BluetoothServices+State.swift",
"Bike/Bluetooth/Services/VanMoof+Bike+BluetoothServices.swift",
"Bike/Bluetooth/Services/VanMoofBikeBluetoothCharacteristic.swift",
"Bike/Bluetooth/Services/VanMoofBikeBluetoothService.swift",
"Bike/Configuration/VanMoof+Bike+Configuration.swift",
"Bike/Details/VanMoof+Bike+Details+CustomerRole.swift",
"Bike/Details/VanMoof+Bike+Details+Key.swift",
"Bike/Details/VanMoof+Bike+Details+Links.swift",
"Bike/Details/VanMoof+Bike+Details+ModelColor.swift",
"Bike/Details/VanMoof+Bike+Details+ModelDetails.swift",
"Bike/Details/VanMoof+Bike+Details+Permission.swift",
"Bike/Details/VanMoof+Bike+Details.swift",
"Bike/Error/VanMoof+Bike+Error.swift",
"Bike/Log/VanMoof+Bike+Log.swift",
"Bike/VanMoof+Bike.swift",
"TokenStore/InMemoryVanMoofTokenStore.swift",
"TokenStore/KeychainVanMoofTokenStore.swift",
"TokenStore/LARightVanMoofTokenStore.swift",
"TokenStore/NSUbiquitousVanMoofTokenStore.swift",
"TokenStore/ObservableObjectVanMoofTokenMediator.swift",
"TokenStore/UserDefaultsVanMoofTokenStore.swift",
"TokenStore/VanMoofTokenStore.swift",
"User/VanMoof+User.swift",
"VanMoof.swift"
],
"type" : "library"
},
{
"c99name" : "VanMoofCLI",
"module_type" : "SwiftTarget",
"name" : "VanMoofCLI",
"path" : "Sources/VanMoofCLI",
"product_memberships" : [
"vanmoof"
],
"sources" : [
"VanMoofCLI.swift"
],
"target_dependencies" : [
"VanMoofKit"
],
"type" : "executable"
}
],
"tools_version" : "5.9"
}
Done.