Build Information
Failed to build LibDCSwift, reference 1.22.0 (19d0e0), with Swift 6.1 for macOS (SPM) on 19 Nov 2026 21:27:15 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64Build Log
659 | }
660 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:51:48: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
49 | manager.startScanning(omitUnsupportedPeripherals: true)
50 | }
51 | defer { Task { @MainActor [manager] in manager.stopScanning() } }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
52 |
53 | while true {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:41:39: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
39 | public func waitUntilPresent(timeout: TimeInterval?) async throws -> Bool {
40 | let deadline = timeout.map { Date().addingTimeInterval($0) }
41 | while !(await MainActor.run { manager.isBluetoothReady }) {
| |- 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
42 | try Task.checkCancellation()
43 | if let deadline, Date() > deadline { return false }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:48:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
46 |
47 | await MainActor.run {
48 | manager.clearDiscoveredPeripherals()
| |- 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
49 | manager.startScanning(omitUnsupportedPeripherals: true)
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:55:56: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
53 | while true {
54 | try Task.checkCancellation()
55 | if let found = await MainActor.run(body: { findPeripheral() }) {
| |- 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
56 | adopt(found)
57 | return true
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:92:51: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
90 | // openBLEDevice publishes the pointer with an async hop to main; this read is queued behind it.
91 | let manager = self.manager
92 | let devicePtr = DispatchQueue.main.sync { manager.openedDeviceDataPtr }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
93 | guard let devicePtr, let device = devicePtr.pointee.device else {
94 | DispatchQueue.main.sync { manager.close(clearDevicePtr: true) }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:94:39: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
92 | let devicePtr = DispatchQueue.main.sync { manager.openedDeviceDataPtr }
93 | guard let devicePtr, let device = devicePtr.pointee.device else {
94 | DispatchQueue.main.sync { manager.close(clearDevicePtr: true) }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
95 | throw NauticAutoSyncError.connectFailed("\(name) opened without a device")
96 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:101:23: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
99 | let closed: CBPeripheral? = DispatchQueue.main.sync {
100 | // The manager holds one open device; never close another session's.
101 | guard manager.openedDeviceDataPtr?.pointee.device == closing else {
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
102 | logWarning("[NauticAutoSync] \(name)'s link was already replaced; not closing the open device")
103 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:101:70: warning: sending 'closing' risks causing data races; this is an error in the Swift 6 language mode
99 | let closed: CBPeripheral? = DispatchQueue.main.sync {
100 | // The manager holds one open device; never close another session's.
101 | guard manager.openedDeviceDataPtr?.pointee.device == closing else {
| |- warning: sending 'closing' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'closing' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
102 | logWarning("[NauticAutoSync] \(name)'s link was already replaced; not closing the open device")
103 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:119:61: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
117 | let address = currentAddress
118 | DispatchQueue.main.async {
119 | let known = UUID(uuidString: address).flatMap { manager.centralManager.retrievePeripherals(withIdentifiers: [$0]).first }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
120 | guard let peripheral = manager.peripheral ?? known else { return }
121 | logInfo("[NauticAutoSync] Cancelling the pending connection to \(peripheral.name ?? address)")
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:129:36: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
127 | let manager = self.manager
128 | DispatchQueue.main.async {
129 | guard let peripheral = manager.peripheral ?? manager.connectedDevice else { return }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
130 | manager.systemDisconnect(peripheral)
131 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:179:30: 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
177 | stopRequested = false
178 | abortLinkCalls = false
179 | task = Task.detached { [weak self] in await self?.run() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
180 | lock.unlock()
181 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:672:22: warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
670 | private func emit(_ event: Event) {
671 | if case .log(let message) = event { logInfo("[NauticAutoSync] \(message)") }
672 | continuation.yield(event)
| |- warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'event' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
673 | DispatchQueue.main.async { [weak self] in
674 | guard let self else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:674:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
672 | continuation.yield(event)
673 | DispatchQueue.main.async { [weak self] in
674 | guard let self else { return }
| |- 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
675 | self.delegate?.autoSync(self, didEmit: event)
676 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:675:52: warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
673 | DispatchQueue.main.async { [weak self] in
674 | guard let self else { return }
675 | self.delegate?.autoSync(self, didEmit: event)
| |- warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'event' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
676 | }
677 | }
[148/167] Compiling LibDCSwift NauticSyncLink.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/AutoSyncPolicy.swift:33:23: warning: static property 'suuntoApp' is not concurrency-safe because non-'Sendable' type 'ReconnectPolicy' may have shared mutable state; this is an error in the Swift 6 language mode
6 | /// those are used up, and a cool-down when more than 10 disconnects land
7 | /// within 5 minutes.
8 | public struct ReconnectPolicy: Equatable {
| `- note: consider making struct 'ReconnectPolicy' conform to the 'Sendable' protocol
9 | public var retryDelay: TimeInterval
10 | /// Failed attempts that count toward the cool-down; a failure caused by a lost link does not.
:
31 | }
32 |
33 | public static let suuntoApp = ReconnectPolicy()
| |- warning: static property 'suuntoApp' is not concurrency-safe because non-'Sendable' type 'ReconnectPolicy' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'suuntoApp' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:11:23: warning: static property 'serviceUUID' is not concurrency-safe because non-'Sendable' type 'CBUUID' may have shared mutable state; this is an error in the Swift 6 language mode
9 | /// opens it through `DeviceConfiguration.openBLEDevice`.
10 | public final class CoreBluetoothNauticConnector: NauticSyncConnector {
11 | public static let serviceUUID = CBUUID(string: "61353090-8231-49cc-b57a-886370740041")
| `- warning: static property 'serviceUUID' is not concurrency-safe because non-'Sendable' type 'CBUUID' may have shared mutable state; this is an error in the Swift 6 language mode
12 |
13 | public let name: String
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h:85:28: note: class 'CBUUID' does not conform to the 'Sendable' protocol
83 | */
84 | NS_CLASS_AVAILABLE(10_7, 5_0)
85 | CB_EXTERN_CLASS @interface CBUUID : NSObject <NSCopying>
| `- note: class 'CBUUID' does not conform to the 'Sendable' protocol
86 |
87 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
1 | import Foundation
2 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
3 | import Clibdivecomputer
4 | import LibDCBridge
:
9 | /// opens it through `DeviceConfiguration.openBLEDevice`.
10 | public final class CoreBluetoothNauticConnector: NauticSyncConnector {
11 | public static let serviceUUID = CBUUID(string: "61353090-8231-49cc-b57a-886370740041")
| |- note: add '@MainActor' to make static property 'serviceUUID' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 | public let name: String
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:55:44: warning: type 'CBPeripheral' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
53 | while true {
54 | try Task.checkCancellation()
55 | if let found = await MainActor.run(body: { findPeripheral() }) {
| `- warning: type 'CBPeripheral' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
56 | adopt(found)
57 | return true
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheral.h:55:28: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
53 | */
54 | NS_CLASS_AVAILABLE(10_7, 5_0)
55 | CB_EXTERN_CLASS @interface CBPeripheral : CBPeer
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
56 |
57 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:103:27: warning: static property 'live' is not concurrency-safe because non-'Sendable' type 'NauticAutoSync.Environment' may have shared mutable state; this is an error in the Swift 6 language mode
92 | public static let unreachableHint = "watch not reachable; it may be asleep, press a button on the watch"
93 |
94 | public struct Environment {
| `- note: consider making struct 'Environment' conform to the 'Sendable' protocol
95 | public var now: () -> Date
96 | public var sleep: (TimeInterval) async throws -> Void
:
101 | }
102 |
103 | public static let live = Environment(now: Date.init) { seconds in
| |- warning: static property 'live' is not concurrency-safe because non-'Sendable' type 'NauticAutoSync.Environment' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'live' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 | try await Task.sleep(nanoseconds: UInt64(max(0, seconds) * 1_000_000_000))
105 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:744:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'NauticLinkLease' may have shared mutable state; this is an error in the Swift 6 language mode
741 | /// One Suunto Nautic/Ocean link at a time: `CoreBluetoothManager` holds a single open
742 | /// device, so a sync for one watch waits until another's has closed its link.
743 | public final class NauticLinkLease {
| `- note: class 'NauticLinkLease' does not conform to the 'Sendable' protocol
744 | public static let shared = NauticLinkLease()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'NauticLinkLease' 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
745 |
746 | private let lease = DiveComputerSessionLease()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:369:19: warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
367 | // Wall-clock, so a device that slept past the deadline fires as soon as it wakes.
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
| `- warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
:
722 |
723 | /// Settles the race between a connect finishing and its timeout firing.
724 | private final class ConnectAttempt {
| `- note: class 'ConnectAttempt' does not conform to the 'Sendable' protocol
725 | private let lock = NSLock()
726 | private var settled = false
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:370:13: warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
24 | ///
25 | /// Never writes to the watch: dives stay unsynchronised for the Suunto app.
26 | public final class NauticAutoSync {
| `- note: class 'NauticAutoSync' does not conform to the 'Sendable' protocol
27 | public struct Configuration {
28 | public var reconnect: ReconnectPolicy = .suuntoApp
:
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
| `- warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:372:13: warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
| `- warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
373 | }
374 | do {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticSyncLink.swift:29:17: note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
27 |
28 | /// Finds and opens the watch.
29 | public protocol NauticSyncConnector: AnyObject {
| `- note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
30 | /// Returns true once the watch is seen, false after `timeout` (nil waits indefinitely).
31 | func waitUntilPresent(timeout: TimeInterval?) async throws -> Bool
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:652:70: warning: capture of 'body' with non-sendable type '() throws -> T' in a '@Sendable' closure
650 | private func onLinkQueue<T>(_ body: @escaping () throws -> T) async throws -> T {
651 | try await withCheckedThrowingContinuation { continuation in
652 | linkQueue.async { continuation.resume(with: Result { try body() }) }
| |- warning: capture of 'body' with non-sendable type '() throws -> T' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
653 | }
654 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:652:70: warning: capture of 'body' with non-sendable type '() throws -> T' in an isolated closure; this is an error in the Swift 6 language mode
650 | private func onLinkQueue<T>(_ body: @escaping () throws -> T) async throws -> T {
651 | try await withCheckedThrowingContinuation { continuation in
652 | linkQueue.async { continuation.resume(with: Result { try body() }) }
| |- warning: capture of 'body' with non-sendable type '() throws -> T' in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
653 | }
654 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:658:31: warning: capture of 'body' with non-sendable type '() -> Void' in a '@Sendable' closure
656 | private func runOnLinkQueue(_ body: @escaping () -> Void) async {
657 | await withCheckedContinuation { continuation in
658 | linkQueue.async { body(); continuation.resume() }
| |- warning: capture of 'body' with non-sendable type '() -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
659 | }
660 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:51:48: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
49 | manager.startScanning(omitUnsupportedPeripherals: true)
50 | }
51 | defer { Task { @MainActor [manager] in manager.stopScanning() } }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
52 |
53 | while true {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:41:39: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
39 | public func waitUntilPresent(timeout: TimeInterval?) async throws -> Bool {
40 | let deadline = timeout.map { Date().addingTimeInterval($0) }
41 | while !(await MainActor.run { manager.isBluetoothReady }) {
| |- 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
42 | try Task.checkCancellation()
43 | if let deadline, Date() > deadline { return false }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:48:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
46 |
47 | await MainActor.run {
48 | manager.clearDiscoveredPeripherals()
| |- 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
49 | manager.startScanning(omitUnsupportedPeripherals: true)
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:55:56: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
53 | while true {
54 | try Task.checkCancellation()
55 | if let found = await MainActor.run(body: { findPeripheral() }) {
| |- 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
56 | adopt(found)
57 | return true
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:92:51: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
90 | // openBLEDevice publishes the pointer with an async hop to main; this read is queued behind it.
91 | let manager = self.manager
92 | let devicePtr = DispatchQueue.main.sync { manager.openedDeviceDataPtr }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
93 | guard let devicePtr, let device = devicePtr.pointee.device else {
94 | DispatchQueue.main.sync { manager.close(clearDevicePtr: true) }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:94:39: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
92 | let devicePtr = DispatchQueue.main.sync { manager.openedDeviceDataPtr }
93 | guard let devicePtr, let device = devicePtr.pointee.device else {
94 | DispatchQueue.main.sync { manager.close(clearDevicePtr: true) }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
95 | throw NauticAutoSyncError.connectFailed("\(name) opened without a device")
96 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:101:23: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
99 | let closed: CBPeripheral? = DispatchQueue.main.sync {
100 | // The manager holds one open device; never close another session's.
101 | guard manager.openedDeviceDataPtr?.pointee.device == closing else {
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
102 | logWarning("[NauticAutoSync] \(name)'s link was already replaced; not closing the open device")
103 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:101:70: warning: sending 'closing' risks causing data races; this is an error in the Swift 6 language mode
99 | let closed: CBPeripheral? = DispatchQueue.main.sync {
100 | // The manager holds one open device; never close another session's.
101 | guard manager.openedDeviceDataPtr?.pointee.device == closing else {
| |- warning: sending 'closing' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'closing' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
102 | logWarning("[NauticAutoSync] \(name)'s link was already replaced; not closing the open device")
103 | return nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:119:61: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
117 | let address = currentAddress
118 | DispatchQueue.main.async {
119 | let known = UUID(uuidString: address).flatMap { manager.centralManager.retrievePeripherals(withIdentifiers: [$0]).first }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
120 | guard let peripheral = manager.peripheral ?? known else { return }
121 | logInfo("[NauticAutoSync] Cancelling the pending connection to \(peripheral.name ?? address)")
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/CoreBluetoothNauticConnector.swift:129:36: warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
127 | let manager = self.manager
128 | DispatchQueue.main.async {
129 | guard let peripheral = manager.peripheral ?? manager.connectedDevice else { return }
| |- warning: sending 'manager' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'manager' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
130 | manager.systemDisconnect(peripheral)
131 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:179:30: 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
177 | stopRequested = false
178 | abortLinkCalls = false
179 | task = Task.detached { [weak self] in await self?.run() }
| | `- note: closure captures 'self' which is accessible to code in the current 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
180 | lock.unlock()
181 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:672:22: warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
670 | private func emit(_ event: Event) {
671 | if case .log(let message) = event { logInfo("[NauticAutoSync] \(message)") }
672 | continuation.yield(event)
| |- warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'event' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
673 | DispatchQueue.main.async { [weak self] in
674 | guard let self else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:674:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
672 | continuation.yield(event)
673 | DispatchQueue.main.async { [weak self] in
674 | guard let self else { return }
| |- 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
675 | self.delegate?.autoSync(self, didEmit: event)
676 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:675:52: warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
673 | DispatchQueue.main.async { [weak self] in
674 | guard let self else { return }
675 | self.delegate?.autoSync(self, didEmit: event)
| |- warning: sending 'event' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'event' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
676 | }
677 | }
[149/167] Compiling LibDCSwift BLELinkState.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:38:24: warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'CoreBluetoothManager' may have shared mutable state; this is an error in the Swift 6 language mode
34 | /// Manages device discovery, connection, and data transfer with BLE dive computers.
35 | @objc(CoreBluetoothManager)
36 | public class CoreBluetoothManager: NSObject, CoreBluetoothManagerProtocol, ObservableObject, CBCentralManagerDelegate, CBPeripheralDelegate {
| `- note: class 'CoreBluetoothManager' does not conform to the 'Sendable' protocol
37 | // MARK: - Singleton
38 | private static let sharedInstance = CoreBluetoothManager()
| |- warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'CoreBluetoothManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'sharedInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
39 |
40 | @objc public static func shared() -> Any! {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/CableDiscovery.swift:146:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'EndpointClaims' may have shared mutable state; this is an error in the Swift 6 language mode
143 |
144 | /// The serial ports and USB HID devices this process's sessions have open (by `CableEndpoint.claimKey`), so every discovery shows them `.busy`.
145 | final class EndpointClaims {
| `- note: class 'EndpointClaims' does not conform to the 'Sendable' protocol
146 | static let shared = EndpointClaims()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'EndpointClaims' 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
147 |
148 | private final class WeakFeed {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/CableDiscovery.swift:93:27: warning: capture of 'self' with non-sendable type 'CableEndpointFeed?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
45 |
46 | /// A discovery's published endpoints: ports and devices this process has open overlaid as `.busy`, and the sessions to cancel when their endpoint goes.
47 | final class CableEndpointFeed {
| `- note: class 'CableEndpointFeed' does not conform to the 'Sendable' protocol
48 | private final class WeakSession {
49 | weak var session: DiveComputerSession?
:
91 | lock.unlock()
92 | continuation.onTermination = { [weak self] _ in
93 | guard let self else { return }
| `- warning: capture of 'self' with non-sendable type 'CableEndpointFeed?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
94 | self.lock.lock()
95 | self.continuations[id] = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:507:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
505 | private func warnIfCloseStillDeferred(_ devicePtr: UnsafeMutablePointer<device_data_t>) {
506 | DispatchQueue.main.asyncAfter(deadline: .now() + Self.stuckCloseWarningSeconds) { [weak self] in
507 | guard let self, self.isCloseDeferred(devicePtr) else { return }
| |- 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
508 | logWarning("A close has waited \(Int(Self.stuckCloseWarningSeconds)) s for a download to stop; BLE I/O stays cancelled until it does")
509 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:507:50: warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
505 | private func warnIfCloseStillDeferred(_ devicePtr: UnsafeMutablePointer<device_data_t>) {
506 | DispatchQueue.main.asyncAfter(deadline: .now() + Self.stuckCloseWarningSeconds) { [weak self] in
507 | guard let self, self.isCloseDeferred(devicePtr) else { return }
| |- warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'devicePtr' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
508 | logWarning("A close has waited \(Int(Self.stuckCloseWarningSeconds)) s for a download to stop; BLE I/O stays cancelled until it does")
509 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:599:27: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
597 | let generation = linkState.generation
598 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
599 | guard self.linkState.shouldCancel(scheduledIn: generation) else {
| |- 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
600 | logInfo("A connect started since the close; not cancelling \(peripheral.name ?? "the peripheral")")
601 | return
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:600:86: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
598 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
599 | guard self.linkState.shouldCancel(scheduledIn: generation) else {
600 | logInfo("A connect started since the close; not cancelling \(peripheral.name ?? "the 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
601 | return
602 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:616:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
614 | // still need the signal.
615 | DispatchQueue.main.async {
616 | self.isPeripheralReady = false
| |- 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
617 | self.connectedDevice = nil
618 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:622:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
620 |
621 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
622 | self.isDisconnecting = false
| |- 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
623 | }
624 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:653:51: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
651 | let deadline = Date().addingTimeInterval(timeout)
652 | while Date() < deadline {
653 | if DispatchQueue.main.sync(execute: { openedDeviceDataPtr != devicePtr }) { return }
| |- 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
654 | Thread.sleep(forTimeInterval: 0.05)
655 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:653:74: warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
651 | let deadline = Date().addingTimeInterval(timeout)
652 | while Date() < deadline {
653 | if DispatchQueue.main.sync(execute: { openedDeviceDataPtr != devicePtr }) { return }
| |- warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'devicePtr' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
654 | Thread.sleep(forTimeInterval: 0.05)
655 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:662:51: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
660 | let deadline = Date().addingTimeInterval(timeout)
661 | while Date() < deadline {
662 | if DispatchQueue.main.sync(execute: { peripheral.state == .disconnected }) { return }
| |- 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
663 | Thread.sleep(forTimeInterval: 0.05)
664 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:635:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
633 | func closeAndWaitForDisconnect(timeout: TimeInterval = 3) -> String? {
634 | let closed: (name: String, peripheral: CBPeripheral?, held: UnsafeMutablePointer<device_data_t>?)? = DispatchQueue.main.sync {
635 | guard openedDeviceDataPtr != nil || peripheral != nil else { return 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
636 | let open = peripheral
637 | close(clearDevicePtr: true)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:824:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
822 | public func addDiscoveredPeripheral(_ peripheral: CBPeripheral) {
823 | DispatchQueue.main.async {
824 | if !self.discoveredPeripherals.contains(where: { $0.identifier == peripheral.identifier }) {
| |- 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
825 | self.discoveredPeripherals.append(peripheral)
826 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:824:79: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
822 | public func addDiscoveredPeripheral(_ peripheral: CBPeripheral) {
823 | DispatchQueue.main.async {
824 | if !self.discoveredPeripherals.contains(where: { $0.identifier == peripheral.identifier }) {
| |- 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
825 | self.discoveredPeripherals.append(peripheral)
826 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:793:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
791 | public func clearRetrievalState() {
792 | DispatchQueue.main.async { [weak self] in
793 | self?.isRetrievingLogs = false
| |- 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
794 | self?.currentRetrievalDevice = nil
795 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:807:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
805 | logInfo("Performing system-level disconnect for \(peripheral.name ?? "Unknown Device")")
806 | DispatchQueue.main.async {
807 | self.isPeripheralReady = false
| |- 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
808 | self.connectedDevice = nil
809 | self.writeCharacteristic = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:818:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
816 | public func clearDiscoveredPeripherals() {
817 | DispatchQueue.main.async {
818 | self.discoveredPeripherals.removeAll()
| |- 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
819 | }
820 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:897:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
895 | peripheral.delegate = self
896 | DispatchQueue.main.async {
897 | self.isPeripheralReady = true
| |- 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
898 | self.connectedDevice = peripheral
899 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:898:36: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
896 | DispatchQueue.main.async {
897 | self.isPeripheralReady = true
898 | self.connectedDevice = 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
899 | }
900 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:914:30: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
912 | DispatchQueue.main.async {
913 | // A late disconnect from a closed link must not reset a newer connection to another peripheral.
914 | if let current = self.connectedDevice, current.identifier != peripheral.identifier { return }
| |- 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
915 | self.isPeripheralReady = false
916 | self.connectedDevice = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:914:74: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
912 | DispatchQueue.main.async {
913 | // A late disconnect from a closed link must not reset a newer connection to another peripheral.
914 | if let current = self.connectedDevice, current.identifier != peripheral.identifier { return }
| |- 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
915 | self.isPeripheralReady = false
916 | self.connectedDevice = nil
[150/167] Compiling LibDCSwift BLEManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:38:24: warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'CoreBluetoothManager' may have shared mutable state; this is an error in the Swift 6 language mode
34 | /// Manages device discovery, connection, and data transfer with BLE dive computers.
35 | @objc(CoreBluetoothManager)
36 | public class CoreBluetoothManager: NSObject, CoreBluetoothManagerProtocol, ObservableObject, CBCentralManagerDelegate, CBPeripheralDelegate {
| `- note: class 'CoreBluetoothManager' does not conform to the 'Sendable' protocol
37 | // MARK: - Singleton
38 | private static let sharedInstance = CoreBluetoothManager()
| |- warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'CoreBluetoothManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'sharedInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
39 |
40 | @objc public static func shared() -> Any! {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/CableDiscovery.swift:146:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'EndpointClaims' may have shared mutable state; this is an error in the Swift 6 language mode
143 |
144 | /// The serial ports and USB HID devices this process's sessions have open (by `CableEndpoint.claimKey`), so every discovery shows them `.busy`.
145 | final class EndpointClaims {
| `- note: class 'EndpointClaims' does not conform to the 'Sendable' protocol
146 | static let shared = EndpointClaims()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'EndpointClaims' 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
147 |
148 | private final class WeakFeed {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/CableDiscovery.swift:93:27: warning: capture of 'self' with non-sendable type 'CableEndpointFeed?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
45 |
46 | /// A discovery's published endpoints: ports and devices this process has open overlaid as `.busy`, and the sessions to cancel when their endpoint goes.
47 | final class CableEndpointFeed {
| `- note: class 'CableEndpointFeed' does not conform to the 'Sendable' protocol
48 | private final class WeakSession {
49 | weak var session: DiveComputerSession?
:
91 | lock.unlock()
92 | continuation.onTermination = { [weak self] _ in
93 | guard let self else { return }
| `- warning: capture of 'self' with non-sendable type 'CableEndpointFeed?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
94 | self.lock.lock()
95 | self.continuations[id] = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:507:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
505 | private func warnIfCloseStillDeferred(_ devicePtr: UnsafeMutablePointer<device_data_t>) {
506 | DispatchQueue.main.asyncAfter(deadline: .now() + Self.stuckCloseWarningSeconds) { [weak self] in
507 | guard let self, self.isCloseDeferred(devicePtr) else { return }
| |- 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
508 | logWarning("A close has waited \(Int(Self.stuckCloseWarningSeconds)) s for a download to stop; BLE I/O stays cancelled until it does")
509 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:507:50: warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
505 | private func warnIfCloseStillDeferred(_ devicePtr: UnsafeMutablePointer<device_data_t>) {
506 | DispatchQueue.main.asyncAfter(deadline: .now() + Self.stuckCloseWarningSeconds) { [weak self] in
507 | guard let self, self.isCloseDeferred(devicePtr) else { return }
| |- warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'devicePtr' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
508 | logWarning("A close has waited \(Int(Self.stuckCloseWarningSeconds)) s for a download to stop; BLE I/O stays cancelled until it does")
509 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:599:27: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
597 | let generation = linkState.generation
598 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
599 | guard self.linkState.shouldCancel(scheduledIn: generation) else {
| |- 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
600 | logInfo("A connect started since the close; not cancelling \(peripheral.name ?? "the peripheral")")
601 | return
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:600:86: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
598 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
599 | guard self.linkState.shouldCancel(scheduledIn: generation) else {
600 | logInfo("A connect started since the close; not cancelling \(peripheral.name ?? "the 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
601 | return
602 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:616:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
614 | // still need the signal.
615 | DispatchQueue.main.async {
616 | self.isPeripheralReady = false
| |- 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
617 | self.connectedDevice = nil
618 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:622:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
620 |
621 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
622 | self.isDisconnecting = false
| |- 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
623 | }
624 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:653:51: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
651 | let deadline = Date().addingTimeInterval(timeout)
652 | while Date() < deadline {
653 | if DispatchQueue.main.sync(execute: { openedDeviceDataPtr != devicePtr }) { return }
| |- 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
654 | Thread.sleep(forTimeInterval: 0.05)
655 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:653:74: warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
651 | let deadline = Date().addingTimeInterval(timeout)
652 | while Date() < deadline {
653 | if DispatchQueue.main.sync(execute: { openedDeviceDataPtr != devicePtr }) { return }
| |- warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'devicePtr' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
654 | Thread.sleep(forTimeInterval: 0.05)
655 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:662:51: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
660 | let deadline = Date().addingTimeInterval(timeout)
661 | while Date() < deadline {
662 | if DispatchQueue.main.sync(execute: { peripheral.state == .disconnected }) { return }
| |- 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
663 | Thread.sleep(forTimeInterval: 0.05)
664 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:635:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
633 | func closeAndWaitForDisconnect(timeout: TimeInterval = 3) -> String? {
634 | let closed: (name: String, peripheral: CBPeripheral?, held: UnsafeMutablePointer<device_data_t>?)? = DispatchQueue.main.sync {
635 | guard openedDeviceDataPtr != nil || peripheral != nil else { return 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
636 | let open = peripheral
637 | close(clearDevicePtr: true)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:824:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
822 | public func addDiscoveredPeripheral(_ peripheral: CBPeripheral) {
823 | DispatchQueue.main.async {
824 | if !self.discoveredPeripherals.contains(where: { $0.identifier == peripheral.identifier }) {
| |- 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
825 | self.discoveredPeripherals.append(peripheral)
826 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:824:79: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
822 | public func addDiscoveredPeripheral(_ peripheral: CBPeripheral) {
823 | DispatchQueue.main.async {
824 | if !self.discoveredPeripherals.contains(where: { $0.identifier == peripheral.identifier }) {
| |- 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
825 | self.discoveredPeripherals.append(peripheral)
826 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:793:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
791 | public func clearRetrievalState() {
792 | DispatchQueue.main.async { [weak self] in
793 | self?.isRetrievingLogs = false
| |- 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
794 | self?.currentRetrievalDevice = nil
795 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:807:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
805 | logInfo("Performing system-level disconnect for \(peripheral.name ?? "Unknown Device")")
806 | DispatchQueue.main.async {
807 | self.isPeripheralReady = false
| |- 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
808 | self.connectedDevice = nil
809 | self.writeCharacteristic = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:818:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
816 | public func clearDiscoveredPeripherals() {
817 | DispatchQueue.main.async {
818 | self.discoveredPeripherals.removeAll()
| |- 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
819 | }
820 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:897:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
895 | peripheral.delegate = self
896 | DispatchQueue.main.async {
897 | self.isPeripheralReady = true
| |- 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
898 | self.connectedDevice = peripheral
899 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:898:36: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
896 | DispatchQueue.main.async {
897 | self.isPeripheralReady = true
898 | self.connectedDevice = 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
899 | }
900 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:914:30: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
912 | DispatchQueue.main.async {
913 | // A late disconnect from a closed link must not reset a newer connection to another peripheral.
914 | if let current = self.connectedDevice, current.identifier != peripheral.identifier { return }
| |- 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
915 | self.isPeripheralReady = false
916 | self.connectedDevice = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:914:74: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
912 | DispatchQueue.main.async {
913 | // A late disconnect from a closed link must not reset a newer connection to another peripheral.
914 | if let current = self.connectedDevice, current.identifier != peripheral.identifier { return }
| |- 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
915 | self.isPeripheralReady = false
916 | self.connectedDevice = nil
[151/167] Compiling LibDCSwift CableDiscovery.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:38:24: warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'CoreBluetoothManager' may have shared mutable state; this is an error in the Swift 6 language mode
34 | /// Manages device discovery, connection, and data transfer with BLE dive computers.
35 | @objc(CoreBluetoothManager)
36 | public class CoreBluetoothManager: NSObject, CoreBluetoothManagerProtocol, ObservableObject, CBCentralManagerDelegate, CBPeripheralDelegate {
| `- note: class 'CoreBluetoothManager' does not conform to the 'Sendable' protocol
37 | // MARK: - Singleton
38 | private static let sharedInstance = CoreBluetoothManager()
| |- warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'CoreBluetoothManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'sharedInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
39 |
40 | @objc public static func shared() -> Any! {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/CableDiscovery.swift:146:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'EndpointClaims' may have shared mutable state; this is an error in the Swift 6 language mode
143 |
144 | /// The serial ports and USB HID devices this process's sessions have open (by `CableEndpoint.claimKey`), so every discovery shows them `.busy`.
145 | final class EndpointClaims {
| `- note: class 'EndpointClaims' does not conform to the 'Sendable' protocol
146 | static let shared = EndpointClaims()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'EndpointClaims' 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
147 |
148 | private final class WeakFeed {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/CableDiscovery.swift:93:27: warning: capture of 'self' with non-sendable type 'CableEndpointFeed?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
45 |
46 | /// A discovery's published endpoints: ports and devices this process has open overlaid as `.busy`, and the sessions to cancel when their endpoint goes.
47 | final class CableEndpointFeed {
| `- note: class 'CableEndpointFeed' does not conform to the 'Sendable' protocol
48 | private final class WeakSession {
49 | weak var session: DiveComputerSession?
:
91 | lock.unlock()
92 | continuation.onTermination = { [weak self] _ in
93 | guard let self else { return }
| `- warning: capture of 'self' with non-sendable type 'CableEndpointFeed?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
94 | self.lock.lock()
95 | self.continuations[id] = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:507:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
505 | private func warnIfCloseStillDeferred(_ devicePtr: UnsafeMutablePointer<device_data_t>) {
506 | DispatchQueue.main.asyncAfter(deadline: .now() + Self.stuckCloseWarningSeconds) { [weak self] in
507 | guard let self, self.isCloseDeferred(devicePtr) else { return }
| |- 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
508 | logWarning("A close has waited \(Int(Self.stuckCloseWarningSeconds)) s for a download to stop; BLE I/O stays cancelled until it does")
509 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:507:50: warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
505 | private func warnIfCloseStillDeferred(_ devicePtr: UnsafeMutablePointer<device_data_t>) {
506 | DispatchQueue.main.asyncAfter(deadline: .now() + Self.stuckCloseWarningSeconds) { [weak self] in
507 | guard let self, self.isCloseDeferred(devicePtr) else { return }
| |- warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'devicePtr' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
508 | logWarning("A close has waited \(Int(Self.stuckCloseWarningSeconds)) s for a download to stop; BLE I/O stays cancelled until it does")
509 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:599:27: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
597 | let generation = linkState.generation
598 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
599 | guard self.linkState.shouldCancel(scheduledIn: generation) else {
| |- 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
600 | logInfo("A connect started since the close; not cancelling \(peripheral.name ?? "the peripheral")")
601 | return
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:600:86: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
598 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
599 | guard self.linkState.shouldCancel(scheduledIn: generation) else {
600 | logInfo("A connect started since the close; not cancelling \(peripheral.name ?? "the 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
601 | return
602 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:616:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
614 | // still need the signal.
615 | DispatchQueue.main.async {
616 | self.isPeripheralReady = false
| |- 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
617 | self.connectedDevice = nil
618 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:622:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
620 |
621 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
622 | self.isDisconnecting = false
| |- 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
623 | }
624 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:653:51: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
651 | let deadline = Date().addingTimeInterval(timeout)
652 | while Date() < deadline {
653 | if DispatchQueue.main.sync(execute: { openedDeviceDataPtr != devicePtr }) { return }
| |- 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
654 | Thread.sleep(forTimeInterval: 0.05)
655 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:653:74: warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
651 | let deadline = Date().addingTimeInterval(timeout)
652 | while Date() < deadline {
653 | if DispatchQueue.main.sync(execute: { openedDeviceDataPtr != devicePtr }) { return }
| |- warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'devicePtr' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
654 | Thread.sleep(forTimeInterval: 0.05)
655 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:662:51: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
660 | let deadline = Date().addingTimeInterval(timeout)
661 | while Date() < deadline {
662 | if DispatchQueue.main.sync(execute: { peripheral.state == .disconnected }) { return }
| |- 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
663 | Thread.sleep(forTimeInterval: 0.05)
664 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:635:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
633 | func closeAndWaitForDisconnect(timeout: TimeInterval = 3) -> String? {
634 | let closed: (name: String, peripheral: CBPeripheral?, held: UnsafeMutablePointer<device_data_t>?)? = DispatchQueue.main.sync {
635 | guard openedDeviceDataPtr != nil || peripheral != nil else { return 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
636 | let open = peripheral
637 | close(clearDevicePtr: true)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:824:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
822 | public func addDiscoveredPeripheral(_ peripheral: CBPeripheral) {
823 | DispatchQueue.main.async {
824 | if !self.discoveredPeripherals.contains(where: { $0.identifier == peripheral.identifier }) {
| |- 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
825 | self.discoveredPeripherals.append(peripheral)
826 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:824:79: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
822 | public func addDiscoveredPeripheral(_ peripheral: CBPeripheral) {
823 | DispatchQueue.main.async {
824 | if !self.discoveredPeripherals.contains(where: { $0.identifier == peripheral.identifier }) {
| |- 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
825 | self.discoveredPeripherals.append(peripheral)
826 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:793:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
791 | public func clearRetrievalState() {
792 | DispatchQueue.main.async { [weak self] in
793 | self?.isRetrievingLogs = false
| |- 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
794 | self?.currentRetrievalDevice = nil
795 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:807:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
805 | logInfo("Performing system-level disconnect for \(peripheral.name ?? "Unknown Device")")
806 | DispatchQueue.main.async {
807 | self.isPeripheralReady = false
| |- 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
808 | self.connectedDevice = nil
809 | self.writeCharacteristic = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:818:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
816 | public func clearDiscoveredPeripherals() {
817 | DispatchQueue.main.async {
818 | self.discoveredPeripherals.removeAll()
| |- 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
819 | }
820 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:897:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
895 | peripheral.delegate = self
896 | DispatchQueue.main.async {
897 | self.isPeripheralReady = true
| |- 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
898 | self.connectedDevice = peripheral
899 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:898:36: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
896 | DispatchQueue.main.async {
897 | self.isPeripheralReady = true
898 | self.connectedDevice = 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
899 | }
900 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:914:30: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
912 | DispatchQueue.main.async {
913 | // A late disconnect from a closed link must not reset a newer connection to another peripheral.
914 | if let current = self.connectedDevice, current.identifier != peripheral.identifier { return }
| |- 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
915 | self.isPeripheralReady = false
916 | self.connectedDevice = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:914:74: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
912 | DispatchQueue.main.async {
913 | // A late disconnect from a closed link must not reset a newer connection to another peripheral.
914 | if let current = self.connectedDevice, current.identifier != peripheral.identifier { return }
| |- 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
915 | self.isPeripheralReady = false
916 | self.connectedDevice = nil
[152/167] Compiling LibDCSwift CableEndpoint.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:38:24: warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'CoreBluetoothManager' may have shared mutable state; this is an error in the Swift 6 language mode
34 | /// Manages device discovery, connection, and data transfer with BLE dive computers.
35 | @objc(CoreBluetoothManager)
36 | public class CoreBluetoothManager: NSObject, CoreBluetoothManagerProtocol, ObservableObject, CBCentralManagerDelegate, CBPeripheralDelegate {
| `- note: class 'CoreBluetoothManager' does not conform to the 'Sendable' protocol
37 | // MARK: - Singleton
38 | private static let sharedInstance = CoreBluetoothManager()
| |- warning: static property 'sharedInstance' is not concurrency-safe because non-'Sendable' type 'CoreBluetoothManager' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'sharedInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
39 |
40 | @objc public static func shared() -> Any! {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/CableDiscovery.swift:146:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'EndpointClaims' may have shared mutable state; this is an error in the Swift 6 language mode
143 |
144 | /// The serial ports and USB HID devices this process's sessions have open (by `CableEndpoint.claimKey`), so every discovery shows them `.busy`.
145 | final class EndpointClaims {
| `- note: class 'EndpointClaims' does not conform to the 'Sendable' protocol
146 | static let shared = EndpointClaims()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'EndpointClaims' 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
147 |
148 | private final class WeakFeed {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/CableDiscovery.swift:93:27: warning: capture of 'self' with non-sendable type 'CableEndpointFeed?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
45 |
46 | /// A discovery's published endpoints: ports and devices this process has open overlaid as `.busy`, and the sessions to cancel when their endpoint goes.
47 | final class CableEndpointFeed {
| `- note: class 'CableEndpointFeed' does not conform to the 'Sendable' protocol
48 | private final class WeakSession {
49 | weak var session: DiveComputerSession?
:
91 | lock.unlock()
92 | continuation.onTermination = { [weak self] _ in
93 | guard let self else { return }
| `- warning: capture of 'self' with non-sendable type 'CableEndpointFeed?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
94 | self.lock.lock()
95 | self.continuations[id] = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:507:23: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
505 | private func warnIfCloseStillDeferred(_ devicePtr: UnsafeMutablePointer<device_data_t>) {
506 | DispatchQueue.main.asyncAfter(deadline: .now() + Self.stuckCloseWarningSeconds) { [weak self] in
507 | guard let self, self.isCloseDeferred(devicePtr) else { return }
| |- 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
508 | logWarning("A close has waited \(Int(Self.stuckCloseWarningSeconds)) s for a download to stop; BLE I/O stays cancelled until it does")
509 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:507:50: warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
505 | private func warnIfCloseStillDeferred(_ devicePtr: UnsafeMutablePointer<device_data_t>) {
506 | DispatchQueue.main.asyncAfter(deadline: .now() + Self.stuckCloseWarningSeconds) { [weak self] in
507 | guard let self, self.isCloseDeferred(devicePtr) else { return }
| |- warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'devicePtr' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
508 | logWarning("A close has waited \(Int(Self.stuckCloseWarningSeconds)) s for a download to stop; BLE I/O stays cancelled until it does")
509 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:599:27: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
597 | let generation = linkState.generation
598 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
599 | guard self.linkState.shouldCancel(scheduledIn: generation) else {
| |- 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
600 | logInfo("A connect started since the close; not cancelling \(peripheral.name ?? "the peripheral")")
601 | return
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:600:86: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
598 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
599 | guard self.linkState.shouldCancel(scheduledIn: generation) else {
600 | logInfo("A connect started since the close; not cancelling \(peripheral.name ?? "the 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
601 | return
602 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:616:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
614 | // still need the signal.
615 | DispatchQueue.main.async {
616 | self.isPeripheralReady = false
| |- 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
617 | self.connectedDevice = nil
618 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:622:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
620 |
621 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
622 | self.isDisconnecting = false
| |- 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
623 | }
624 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:653:51: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
651 | let deadline = Date().addingTimeInterval(timeout)
652 | while Date() < deadline {
653 | if DispatchQueue.main.sync(execute: { openedDeviceDataPtr != devicePtr }) { return }
| |- 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
654 | Thread.sleep(forTimeInterval: 0.05)
655 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:653:74: warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
651 | let deadline = Date().addingTimeInterval(timeout)
652 | while Date() < deadline {
653 | if DispatchQueue.main.sync(execute: { openedDeviceDataPtr != devicePtr }) { return }
| |- warning: sending 'devicePtr' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'devicePtr' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
654 | Thread.sleep(forTimeInterval: 0.05)
655 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:662:51: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
660 | let deadline = Date().addingTimeInterval(timeout)
661 | while Date() < deadline {
662 | if DispatchQueue.main.sync(execute: { peripheral.state == .disconnected }) { return }
| |- 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
663 | Thread.sleep(forTimeInterval: 0.05)
664 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:635:19: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
633 | func closeAndWaitForDisconnect(timeout: TimeInterval = 3) -> String? {
634 | let closed: (name: String, peripheral: CBPeripheral?, held: UnsafeMutablePointer<device_data_t>?)? = DispatchQueue.main.sync {
635 | guard openedDeviceDataPtr != nil || peripheral != nil else { return 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
636 | let open = peripheral
637 | close(clearDevicePtr: true)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:824:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
822 | public func addDiscoveredPeripheral(_ peripheral: CBPeripheral) {
823 | DispatchQueue.main.async {
824 | if !self.discoveredPeripherals.contains(where: { $0.identifier == peripheral.identifier }) {
| |- 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
825 | self.discoveredPeripherals.append(peripheral)
826 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:824:79: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
822 | public func addDiscoveredPeripheral(_ peripheral: CBPeripheral) {
823 | DispatchQueue.main.async {
824 | if !self.discoveredPeripherals.contains(where: { $0.identifier == peripheral.identifier }) {
| |- 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
825 | self.discoveredPeripherals.append(peripheral)
826 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:793:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
791 | public func clearRetrievalState() {
792 | DispatchQueue.main.async { [weak self] in
793 | self?.isRetrievingLogs = false
| |- 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
794 | self?.currentRetrievalDevice = nil
795 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:807:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
805 | logInfo("Performing system-level disconnect for \(peripheral.name ?? "Unknown Device")")
806 | DispatchQueue.main.async {
807 | self.isPeripheralReady = false
| |- 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
808 | self.connectedDevice = nil
809 | self.writeCharacteristic = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:818:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
816 | public func clearDiscoveredPeripherals() {
817 | DispatchQueue.main.async {
818 | self.discoveredPeripherals.removeAll()
| |- 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
819 | }
820 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:897:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
895 | peripheral.delegate = self
896 | DispatchQueue.main.async {
897 | self.isPeripheralReady = true
| |- 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
898 | self.connectedDevice = peripheral
899 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:898:36: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
896 | DispatchQueue.main.async {
897 | self.isPeripheralReady = true
898 | self.connectedDevice = 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
899 | }
900 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:914:30: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
912 | DispatchQueue.main.async {
913 | // A late disconnect from a closed link must not reset a newer connection to another peripheral.
914 | if let current = self.connectedDevice, current.identifier != peripheral.identifier { return }
| |- 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
915 | self.isPeripheralReady = false
916 | self.connectedDevice = nil
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/BLEManager.swift:914:74: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
912 | DispatchQueue.main.async {
913 | // A late disconnect from a closed link must not reset a newer connection to another peripheral.
914 | if let current = self.connectedDevice, current.identifier != peripheral.identifier { return }
| |- 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
915 | self.isPeripheralReady = false
916 | self.connectedDevice = nil
[153/167] Compiling LibDCSwift DeviceCatalog.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:68:29: warning: static property 'activeInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
66 |
67 | private let fingerprintKey = "DeviceFingerprints"
68 | private static weak var activeInstance: DiveDataViewModel?
| |- warning: static property 'activeInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'activeInstance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'activeInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
69 | public weak var persistence: DiveDataPersistence?
70 | /// Test seam: an isolated store instead of `DeviceFingerprintStorage.shared`. Session downloads keep their rejected dives here too.
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:294:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
292 | )
293 | DispatchQueue.main.async {
294 | self.dives.append(dive)
| |- 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
295 | if case .inProgress = self.progress {
296 | self.progress = .inProgress(self.dives.count)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:304:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
302 | public func updateStatus(_ newStatus: String) {
303 | DispatchQueue.main.async {
304 | self.status = newStatus
| |- 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
305 | }
306 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:310:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
308 | public func updateProgress(_ progress: DownloadProgress) {
309 | DispatchQueue.main.async {
310 | self.progress = progress
| |- 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
311 | }
312 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:310:29: warning: sending 'progress' risks causing data races; this is an error in the Swift 6 language mode
308 | public func updateProgress(_ progress: DownloadProgress) {
309 | DispatchQueue.main.async {
310 | self.progress = progress
| |- warning: sending 'progress' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'progress' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
311 | }
312 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:316:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
314 | public func updateProgress(count: Int) {
315 | DispatchQueue.main.async {
316 | self.applyProgressCount(count)
| |- 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
317 | }
318 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:342:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
340 | public func setError(_ message: String) {
341 | DispatchQueue.main.async {
342 | self.progress = .failed(message)
| |- 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
343 | }
344 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:348:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
346 | public func clear() {
347 | DispatchQueue.main.async {
348 | self.dives.removeAll()
| |- 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
349 | self.hasNewDives = false
350 | self.resetProgress()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:464:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
462 | public func resetProgress() {
463 | DispatchQueue.main.async {
464 | self.applyResetProgress()
| |- 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
465 | }
466 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:397:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
395 | }
396 |
397 | self.progress = .failed(errorMessage)
| |- 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
398 | }
399 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:403:17: warning: sending 'newDives' risks causing data races; this is an error in the Swift 6 language mode
401 | public func appendDives(_ newDives: [DiveData]) {
402 | DispatchQueue.main.async {
403 | if !newDives.isEmpty {
| |- warning: sending 'newDives' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newDives' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
404 | self.hasNewDives = true
405 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:404:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
402 | DispatchQueue.main.async {
403 | if !newDives.isEmpty {
404 | self.hasNewDives = true
| |- 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
405 | }
406 | self.dives.append(contentsOf: newDives)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:418:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
416 | public func finalizeDiveNumbering() {
417 | DispatchQueue.main.async {
418 | self.applyDiveNumbering()
| |- 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
419 | }
420 | }
[154/167] Compiling LibDCSwift DiveComputerIdentity.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:68:29: warning: static property 'activeInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
66 |
67 | private let fingerprintKey = "DeviceFingerprints"
68 | private static weak var activeInstance: DiveDataViewModel?
| |- warning: static property 'activeInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'activeInstance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'activeInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
69 | public weak var persistence: DiveDataPersistence?
70 | /// Test seam: an isolated store instead of `DeviceFingerprintStorage.shared`. Session downloads keep their rejected dives here too.
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:294:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
292 | )
293 | DispatchQueue.main.async {
294 | self.dives.append(dive)
| |- 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
295 | if case .inProgress = self.progress {
296 | self.progress = .inProgress(self.dives.count)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:304:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
302 | public func updateStatus(_ newStatus: String) {
303 | DispatchQueue.main.async {
304 | self.status = newStatus
| |- 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
305 | }
306 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:310:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
308 | public func updateProgress(_ progress: DownloadProgress) {
309 | DispatchQueue.main.async {
310 | self.progress = progress
| |- 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
311 | }
312 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:310:29: warning: sending 'progress' risks causing data races; this is an error in the Swift 6 language mode
308 | public func updateProgress(_ progress: DownloadProgress) {
309 | DispatchQueue.main.async {
310 | self.progress = progress
| |- warning: sending 'progress' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'progress' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
311 | }
312 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:316:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
314 | public func updateProgress(count: Int) {
315 | DispatchQueue.main.async {
316 | self.applyProgressCount(count)
| |- 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
317 | }
318 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:342:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
340 | public func setError(_ message: String) {
341 | DispatchQueue.main.async {
342 | self.progress = .failed(message)
| |- 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
343 | }
344 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:348:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
346 | public func clear() {
347 | DispatchQueue.main.async {
348 | self.dives.removeAll()
| |- 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
349 | self.hasNewDives = false
350 | self.resetProgress()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:464:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
462 | public func resetProgress() {
463 | DispatchQueue.main.async {
464 | self.applyResetProgress()
| |- 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
465 | }
466 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:397:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
395 | }
396 |
397 | self.progress = .failed(errorMessage)
| |- 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
398 | }
399 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:403:17: warning: sending 'newDives' risks causing data races; this is an error in the Swift 6 language mode
401 | public func appendDives(_ newDives: [DiveData]) {
402 | DispatchQueue.main.async {
403 | if !newDives.isEmpty {
| |- warning: sending 'newDives' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newDives' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
404 | self.hasNewDives = true
405 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:404:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
402 | DispatchQueue.main.async {
403 | if !newDives.isEmpty {
404 | self.hasNewDives = true
| |- 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
405 | }
406 | self.dives.append(contentsOf: newDives)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:418:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
416 | public func finalizeDiveNumbering() {
417 | DispatchQueue.main.async {
418 | self.applyDiveNumbering()
| |- 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
419 | }
420 | }
[155/167] Compiling LibDCSwift DiveDataViewModel.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:68:29: warning: static property 'activeInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
66 |
67 | private let fingerprintKey = "DeviceFingerprints"
68 | private static weak var activeInstance: DiveDataViewModel?
| |- warning: static property 'activeInstance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'activeInstance' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'activeInstance' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
69 | public weak var persistence: DiveDataPersistence?
70 | /// Test seam: an isolated store instead of `DeviceFingerprintStorage.shared`. Session downloads keep their rejected dives here too.
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:294:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
292 | )
293 | DispatchQueue.main.async {
294 | self.dives.append(dive)
| |- 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
295 | if case .inProgress = self.progress {
296 | self.progress = .inProgress(self.dives.count)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:304:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
302 | public func updateStatus(_ newStatus: String) {
303 | DispatchQueue.main.async {
304 | self.status = newStatus
| |- 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
305 | }
306 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:310:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
308 | public func updateProgress(_ progress: DownloadProgress) {
309 | DispatchQueue.main.async {
310 | self.progress = progress
| |- 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
311 | }
312 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:310:29: warning: sending 'progress' risks causing data races; this is an error in the Swift 6 language mode
308 | public func updateProgress(_ progress: DownloadProgress) {
309 | DispatchQueue.main.async {
310 | self.progress = progress
| |- warning: sending 'progress' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'progress' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
311 | }
312 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:316:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
314 | public func updateProgress(count: Int) {
315 | DispatchQueue.main.async {
316 | self.applyProgressCount(count)
| |- 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
317 | }
318 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:342:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
340 | public func setError(_ message: String) {
341 | DispatchQueue.main.async {
342 | self.progress = .failed(message)
| |- 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
343 | }
344 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:348:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
346 | public func clear() {
347 | DispatchQueue.main.async {
348 | self.dives.removeAll()
| |- 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
349 | self.hasNewDives = false
350 | self.resetProgress()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:464:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
462 | public func resetProgress() {
463 | DispatchQueue.main.async {
464 | self.applyResetProgress()
| |- 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
465 | }
466 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:397:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
395 | }
396 |
397 | self.progress = .failed(errorMessage)
| |- 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
398 | }
399 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:403:17: warning: sending 'newDives' risks causing data races; this is an error in the Swift 6 language mode
401 | public func appendDives(_ newDives: [DiveData]) {
402 | DispatchQueue.main.async {
403 | if !newDives.isEmpty {
| |- warning: sending 'newDives' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newDives' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
404 | self.hasNewDives = true
405 | }
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:404:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
402 | DispatchQueue.main.async {
403 | if !newDives.isEmpty {
404 | self.hasNewDives = true
| |- 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
405 | }
406 | self.dives.append(contentsOf: newDives)
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/ViewModels/DiveDataViewModel.swift:418:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
416 | public func finalizeDiveNumbering() {
417 | DispatchQueue.main.async {
418 | self.applyDiveNumbering()
| |- 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
419 | }
420 | }
[156/167] Compiling LibDCSwift IOKitCableDiscovery.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:265:24: warning: static property 'lastHIDLog' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
263 | /// (a sandbox without device.usb, say) from "enumerated but not a known model". Logged only when it changes.
264 | private static let hidLogLock = NSLock()
265 | private static var lastHIDLog = ""
| |- warning: static property 'lastHIDLog' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastHIDLog' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'lastHIDLog' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
266 |
267 | static func logHIDMatches(_ snapshot: RegistrySnapshot) {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:46:23: warning: capture of 'source' with non-sendable type 'any RegistrySource' in a '@Sendable' closure
12 |
13 | /// Where `IOKitCableDiscovery` reads the registry; tests pass a fake that serves `RegistrySnapshot` fixtures.
14 | public protocol RegistrySource: AnyObject {
| `- note: protocol 'RegistrySource' does not conform to the 'Sendable' protocol
15 | func snapshot() -> RegistrySnapshot
16 | /// Calls `changed` on `queue` as serial ports, known cables, HID devices and raw USB computers come and go, until `stopWatching()`; false if it can't watch.
:
44 | deinit {
45 | let source = source
46 | queue.async { source.stopWatching() }
| `- warning: capture of 'source' with non-sendable type 'any RegistrySource' in a '@Sendable' closure
47 | }
48 |
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:108:27: warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
20 |
21 | /// Serial ports, known USB-serial cables, and USB HID and raw USB dive computers, following hot-plug; it never opens a port or device. A cable missing altogether may be held back by an Apple silicon laptop's "Allow accessory to connect?" prompt.
22 | public final class IOKitCableDiscovery: CableDiscovering {
| `- note: class 'IOKitCableDiscovery' does not conform to the 'Sendable' protocol
23 | private let source: RegistrySource
24 | private let settle: DispatchTimeInterval
:
106 | refreshPending = true
107 | queue.asyncAfter(deadline: .now() + settle) { [weak self] in
108 | guard let self else { return }
| `- warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
109 | self.refreshPending = false
110 | self.refreshNow()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:136:23: warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
20 |
21 | /// Serial ports, known USB-serial cables, and USB HID and raw USB dive computers, following hot-plug; it never opens a port or device. A cable missing altogether may be held back by an Apple silicon laptop's "Allow accessory to connect?" prompt.
22 | public final class IOKitCableDiscovery: CableDiscovering {
| `- note: class 'IOKitCableDiscovery' does not conform to the 'Sendable' protocol
23 | private let source: RegistrySource
24 | private let settle: DispatchTimeInterval
:
134 | recheckAt = deadline
135 | queue.asyncAfter(deadline: deadline) { [weak self] in
136 | guard let self, self.recheckAt == deadline else { return }
| `- warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
137 | self.recheckAt = nil
138 | self.refreshNow()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/SerialCableSession.swift:231:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SerialOpensInFlight' may have shared mutable state; this is an error in the Swift 6 language mode
228 |
229 | /// The ports a serial open is in progress on: a second open of one would block in the same open(2) as the first.
230 | final class SerialOpensInFlight {
| `- note: class 'SerialOpensInFlight' does not conform to the 'Sendable' protocol
231 | static let shared = SerialOpensInFlight()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SerialOpensInFlight' 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
232 |
233 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/SerialCableSession.swift:208:23: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
206 | self.continuation = nil
207 | lock.unlock()
208 | continuation?.resume(with: result)
| |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
209 | return true
210 | }
[157/167] Compiling LibDCSwift SerialCableSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:265:24: warning: static property 'lastHIDLog' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
263 | /// (a sandbox without device.usb, say) from "enumerated but not a known model". Logged only when it changes.
264 | private static let hidLogLock = NSLock()
265 | private static var lastHIDLog = ""
| |- warning: static property 'lastHIDLog' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastHIDLog' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'lastHIDLog' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
266 |
267 | static func logHIDMatches(_ snapshot: RegistrySnapshot) {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:46:23: warning: capture of 'source' with non-sendable type 'any RegistrySource' in a '@Sendable' closure
12 |
13 | /// Where `IOKitCableDiscovery` reads the registry; tests pass a fake that serves `RegistrySnapshot` fixtures.
14 | public protocol RegistrySource: AnyObject {
| `- note: protocol 'RegistrySource' does not conform to the 'Sendable' protocol
15 | func snapshot() -> RegistrySnapshot
16 | /// Calls `changed` on `queue` as serial ports, known cables, HID devices and raw USB computers come and go, until `stopWatching()`; false if it can't watch.
:
44 | deinit {
45 | let source = source
46 | queue.async { source.stopWatching() }
| `- warning: capture of 'source' with non-sendable type 'any RegistrySource' in a '@Sendable' closure
47 | }
48 |
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:108:27: warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
20 |
21 | /// Serial ports, known USB-serial cables, and USB HID and raw USB dive computers, following hot-plug; it never opens a port or device. A cable missing altogether may be held back by an Apple silicon laptop's "Allow accessory to connect?" prompt.
22 | public final class IOKitCableDiscovery: CableDiscovering {
| `- note: class 'IOKitCableDiscovery' does not conform to the 'Sendable' protocol
23 | private let source: RegistrySource
24 | private let settle: DispatchTimeInterval
:
106 | refreshPending = true
107 | queue.asyncAfter(deadline: .now() + settle) { [weak self] in
108 | guard let self else { return }
| `- warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
109 | self.refreshPending = false
110 | self.refreshNow()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:136:23: warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
20 |
21 | /// Serial ports, known USB-serial cables, and USB HID and raw USB dive computers, following hot-plug; it never opens a port or device. A cable missing altogether may be held back by an Apple silicon laptop's "Allow accessory to connect?" prompt.
22 | public final class IOKitCableDiscovery: CableDiscovering {
| `- note: class 'IOKitCableDiscovery' does not conform to the 'Sendable' protocol
23 | private let source: RegistrySource
24 | private let settle: DispatchTimeInterval
:
134 | recheckAt = deadline
135 | queue.asyncAfter(deadline: deadline) { [weak self] in
136 | guard let self, self.recheckAt == deadline else { return }
| `- warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
137 | self.recheckAt = nil
138 | self.refreshNow()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/SerialCableSession.swift:231:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SerialOpensInFlight' may have shared mutable state; this is an error in the Swift 6 language mode
228 |
229 | /// The ports a serial open is in progress on: a second open of one would block in the same open(2) as the first.
230 | final class SerialOpensInFlight {
| `- note: class 'SerialOpensInFlight' does not conform to the 'Sendable' protocol
231 | static let shared = SerialOpensInFlight()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SerialOpensInFlight' 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
232 |
233 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/SerialCableSession.swift:208:23: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
206 | self.continuation = nil
207 | lock.unlock()
208 | continuation?.resume(with: result)
| |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
209 | return true
210 | }
[158/167] Compiling LibDCSwift USBCableSession.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:265:24: warning: static property 'lastHIDLog' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
263 | /// (a sandbox without device.usb, say) from "enumerated but not a known model". Logged only when it changes.
264 | private static let hidLogLock = NSLock()
265 | private static var lastHIDLog = ""
| |- warning: static property 'lastHIDLog' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastHIDLog' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'lastHIDLog' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
266 |
267 | static func logHIDMatches(_ snapshot: RegistrySnapshot) {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:46:23: warning: capture of 'source' with non-sendable type 'any RegistrySource' in a '@Sendable' closure
12 |
13 | /// Where `IOKitCableDiscovery` reads the registry; tests pass a fake that serves `RegistrySnapshot` fixtures.
14 | public protocol RegistrySource: AnyObject {
| `- note: protocol 'RegistrySource' does not conform to the 'Sendable' protocol
15 | func snapshot() -> RegistrySnapshot
16 | /// Calls `changed` on `queue` as serial ports, known cables, HID devices and raw USB computers come and go, until `stopWatching()`; false if it can't watch.
:
44 | deinit {
45 | let source = source
46 | queue.async { source.stopWatching() }
| `- warning: capture of 'source' with non-sendable type 'any RegistrySource' in a '@Sendable' closure
47 | }
48 |
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:108:27: warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
20 |
21 | /// Serial ports, known USB-serial cables, and USB HID and raw USB dive computers, following hot-plug; it never opens a port or device. A cable missing altogether may be held back by an Apple silicon laptop's "Allow accessory to connect?" prompt.
22 | public final class IOKitCableDiscovery: CableDiscovering {
| `- note: class 'IOKitCableDiscovery' does not conform to the 'Sendable' protocol
23 | private let source: RegistrySource
24 | private let settle: DispatchTimeInterval
:
106 | refreshPending = true
107 | queue.asyncAfter(deadline: .now() + settle) { [weak self] in
108 | guard let self else { return }
| `- warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
109 | self.refreshPending = false
110 | self.refreshNow()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:136:23: warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
20 |
21 | /// Serial ports, known USB-serial cables, and USB HID and raw USB dive computers, following hot-plug; it never opens a port or device. A cable missing altogether may be held back by an Apple silicon laptop's "Allow accessory to connect?" prompt.
22 | public final class IOKitCableDiscovery: CableDiscovering {
| `- note: class 'IOKitCableDiscovery' does not conform to the 'Sendable' protocol
23 | private let source: RegistrySource
24 | private let settle: DispatchTimeInterval
:
134 | recheckAt = deadline
135 | queue.asyncAfter(deadline: deadline) { [weak self] in
136 | guard let self, self.recheckAt == deadline else { return }
| `- warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
137 | self.recheckAt = nil
138 | self.refreshNow()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/SerialCableSession.swift:231:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SerialOpensInFlight' may have shared mutable state; this is an error in the Swift 6 language mode
228 |
229 | /// The ports a serial open is in progress on: a second open of one would block in the same open(2) as the first.
230 | final class SerialOpensInFlight {
| `- note: class 'SerialOpensInFlight' does not conform to the 'Sendable' protocol
231 | static let shared = SerialOpensInFlight()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SerialOpensInFlight' 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
232 |
233 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/SerialCableSession.swift:208:23: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
206 | self.continuation = nil
207 | lock.unlock()
208 | continuation?.resume(with: result)
| |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
209 | return true
210 | }
[159/167] Compiling LibDCSwift USBComputers.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:265:24: warning: static property 'lastHIDLog' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
263 | /// (a sandbox without device.usb, say) from "enumerated but not a known model". Logged only when it changes.
264 | private static let hidLogLock = NSLock()
265 | private static var lastHIDLog = ""
| |- warning: static property 'lastHIDLog' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'lastHIDLog' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'lastHIDLog' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
266 |
267 | static func logHIDMatches(_ snapshot: RegistrySnapshot) {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:46:23: warning: capture of 'source' with non-sendable type 'any RegistrySource' in a '@Sendable' closure
12 |
13 | /// Where `IOKitCableDiscovery` reads the registry; tests pass a fake that serves `RegistrySnapshot` fixtures.
14 | public protocol RegistrySource: AnyObject {
| `- note: protocol 'RegistrySource' does not conform to the 'Sendable' protocol
15 | func snapshot() -> RegistrySnapshot
16 | /// Calls `changed` on `queue` as serial ports, known cables, HID devices and raw USB computers come and go, until `stopWatching()`; false if it can't watch.
:
44 | deinit {
45 | let source = source
46 | queue.async { source.stopWatching() }
| `- warning: capture of 'source' with non-sendable type 'any RegistrySource' in a '@Sendable' closure
47 | }
48 |
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:108:27: warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
20 |
21 | /// Serial ports, known USB-serial cables, and USB HID and raw USB dive computers, following hot-plug; it never opens a port or device. A cable missing altogether may be held back by an Apple silicon laptop's "Allow accessory to connect?" prompt.
22 | public final class IOKitCableDiscovery: CableDiscovering {
| `- note: class 'IOKitCableDiscovery' does not conform to the 'Sendable' protocol
23 | private let source: RegistrySource
24 | private let settle: DispatchTimeInterval
:
106 | refreshPending = true
107 | queue.asyncAfter(deadline: .now() + settle) { [weak self] in
108 | guard let self else { return }
| `- warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
109 | self.refreshPending = false
110 | self.refreshNow()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/IOKitCableDiscovery.swift:136:23: warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
20 |
21 | /// Serial ports, known USB-serial cables, and USB HID and raw USB dive computers, following hot-plug; it never opens a port or device. A cable missing altogether may be held back by an Apple silicon laptop's "Allow accessory to connect?" prompt.
22 | public final class IOKitCableDiscovery: CableDiscovering {
| `- note: class 'IOKitCableDiscovery' does not conform to the 'Sendable' protocol
23 | private let source: RegistrySource
24 | private let settle: DispatchTimeInterval
:
134 | recheckAt = deadline
135 | queue.asyncAfter(deadline: deadline) { [weak self] in
136 | guard let self, self.recheckAt == deadline else { return }
| `- warning: capture of 'self' with non-sendable type 'IOKitCableDiscovery?' in a '@Sendable' closure
137 | self.recheckAt = nil
138 | self.refreshNow()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/SerialCableSession.swift:231:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SerialOpensInFlight' may have shared mutable state; this is an error in the Swift 6 language mode
228 |
229 | /// The ports a serial open is in progress on: a second open of one would block in the same open(2) as the first.
230 | final class SerialOpensInFlight {
| `- note: class 'SerialOpensInFlight' does not conform to the 'Sendable' protocol
231 | static let shared = SerialOpensInFlight()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'SerialOpensInFlight' 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
232 |
233 | private let lock = NSLock()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Cable/SerialCableSession.swift:208:23: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
206 | self.continuation = nil
207 | lock.unlock()
208 | continuation?.resume(with: result)
| |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses
209 | return true
210 | }
[160/167] Compiling LibDCSwift CableError.swift
[161/167] Compiling LibDCSwift HIDCableSession.swift
[162/167] Compiling LibDCSwift HIDDeviceIO.swift
[163/167] Compiling LibDCSwift HIDStream.swift
[164/167] Compiling LibDCSwift DeviceFingerprint.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Models/DeviceFingerprint.swift:42:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceFingerprintStorage' may have shared mutable state; this is an error in the Swift 6 language mode
39 |
40 | /// Manages persistent storage of device fingerprints
41 | public class DeviceFingerprintStorage {
| `- note: class 'DeviceFingerprintStorage' does not conform to the 'Sendable' protocol
42 | public static let shared = DeviceFingerprintStorage()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceFingerprintStorage' 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
43 | private let fingerprintKey = "DeviceFingerprints"
44 | private let rejectedDivesKey = "RejectedDiveFingerprints"
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Models/StoredDevice.swift:101:22: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceStorage' may have shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | @objc public class DeviceStorage: NSObject {
| `- note: class 'DeviceStorage' does not conform to the 'Sendable' protocol
101 | public static let shared = DeviceStorage()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceStorage' 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
102 |
103 | private let defaults: UserDefaults
[165/167] Compiling LibDCSwift DiveData.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Models/DeviceFingerprint.swift:42:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceFingerprintStorage' may have shared mutable state; this is an error in the Swift 6 language mode
39 |
40 | /// Manages persistent storage of device fingerprints
41 | public class DeviceFingerprintStorage {
| `- note: class 'DeviceFingerprintStorage' does not conform to the 'Sendable' protocol
42 | public static let shared = DeviceFingerprintStorage()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceFingerprintStorage' 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
43 | private let fingerprintKey = "DeviceFingerprints"
44 | private let rejectedDivesKey = "RejectedDiveFingerprints"
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Models/StoredDevice.swift:101:22: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceStorage' may have shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | @objc public class DeviceStorage: NSObject {
| `- note: class 'DeviceStorage' does not conform to the 'Sendable' protocol
101 | public static let shared = DeviceStorage()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceStorage' 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
102 |
103 | private let defaults: UserDefaults
[166/167] Compiling LibDCSwift SampleData.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Models/DeviceFingerprint.swift:42:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceFingerprintStorage' may have shared mutable state; this is an error in the Swift 6 language mode
39 |
40 | /// Manages persistent storage of device fingerprints
41 | public class DeviceFingerprintStorage {
| `- note: class 'DeviceFingerprintStorage' does not conform to the 'Sendable' protocol
42 | public static let shared = DeviceFingerprintStorage()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceFingerprintStorage' 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
43 | private let fingerprintKey = "DeviceFingerprints"
44 | private let rejectedDivesKey = "RejectedDiveFingerprints"
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Models/StoredDevice.swift:101:22: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceStorage' may have shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | @objc public class DeviceStorage: NSObject {
| `- note: class 'DeviceStorage' does not conform to the 'Sendable' protocol
101 | public static let shared = DeviceStorage()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceStorage' 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
102 |
103 | private let defaults: UserDefaults
[167/167] Compiling LibDCSwift StoredDevice.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Models/DeviceFingerprint.swift:42:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceFingerprintStorage' may have shared mutable state; this is an error in the Swift 6 language mode
39 |
40 | /// Manages persistent storage of device fingerprints
41 | public class DeviceFingerprintStorage {
| `- note: class 'DeviceFingerprintStorage' does not conform to the 'Sendable' protocol
42 | public static let shared = DeviceFingerprintStorage()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceFingerprintStorage' 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
43 | private let fingerprintKey = "DeviceFingerprints"
44 | private let rejectedDivesKey = "RejectedDiveFingerprints"
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Models/StoredDevice.swift:101:22: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceStorage' may have shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | @objc public class DeviceStorage: NSObject {
| `- note: class 'DeviceStorage' does not conform to the 'Sendable' protocol
101 | public static let shared = DeviceStorage()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'DeviceStorage' 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
102 |
103 | private let defaults: UserDefaults
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
[1/1] Compiling plugin ClibdcVerGeneratorPlugin
Building for debugging...
[1/3] Write swift-version-2F0A5646E1D333AE.txt
[2/3] Linking libLibDCBridge.dylib
[4/39] Compiling LibDCSwift CableError.swift
[5/39] Compiling LibDCSwift HIDCableSession.swift
[6/39] Compiling LibDCSwift HIDDeviceIO.swift
[7/39] Compiling LibDCSwift HIDStream.swift
[8/42] Emitting module LibDCSwift
[9/42] Compiling LibDCSwift GenericParser.swift
[10/42] Compiling LibDCSwift RetrievalCloseCoordinator.swift
[11/42] Compiling LibDCSwift DiveComputerSession.swift
[12/42] Compiling LibDCSwift DCCustomStream.swift
[13/42] Compiling LibDCSwift IOKitCableDiscovery.swift
[14/42] Compiling LibDCSwift SerialCableSession.swift
[15/42] Compiling LibDCSwift USBCableSession.swift
[16/42] Compiling LibDCSwift USBComputers.swift
[17/42] Compiling LibDCSwift DeviceFingerprint.swift
[18/42] Compiling LibDCSwift DiveData.swift
[19/42] Compiling LibDCSwift SampleData.swift
[20/42] Compiling LibDCSwift StoredDevice.swift
[21/42] Compiling LibDCSwift AutoSyncPolicy.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:369:19: warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
367 | // Wall-clock, so a device that slept past the deadline fires as soon as it wakes.
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
| `- warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
:
722 |
723 | /// Settles the race between a connect finishing and its timeout firing.
724 | private final class ConnectAttempt {
| `- note: class 'ConnectAttempt' does not conform to the 'Sendable' protocol
725 | private let lock = NSLock()
726 | private var settled = false
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:370:13: warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
24 | ///
25 | /// Never writes to the watch: dives stay unsynchronised for the Suunto app.
26 | public final class NauticAutoSync {
| `- note: class 'NauticAutoSync' does not conform to the 'Sendable' protocol
27 | public struct Configuration {
28 | public var reconnect: ReconnectPolicy = .suuntoApp
:
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
| `- warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:372:13: warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
| `- warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
373 | }
374 | do {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticSyncLink.swift:29:17: note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
27 |
28 | /// Finds and opens the watch.
29 | public protocol NauticSyncConnector: AnyObject {
| `- note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
30 | /// Returns true once the watch is seen, false after `timeout` (nil waits indefinitely).
31 | func waitUntilPresent(timeout: TimeInterval?) async throws -> Bool
[22/42] Compiling LibDCSwift CoreBluetoothNauticConnector.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:369:19: warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
367 | // Wall-clock, so a device that slept past the deadline fires as soon as it wakes.
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
| `- warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
:
722 |
723 | /// Settles the race between a connect finishing and its timeout firing.
724 | private final class ConnectAttempt {
| `- note: class 'ConnectAttempt' does not conform to the 'Sendable' protocol
725 | private let lock = NSLock()
726 | private var settled = false
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:370:13: warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
24 | ///
25 | /// Never writes to the watch: dives stay unsynchronised for the Suunto app.
26 | public final class NauticAutoSync {
| `- note: class 'NauticAutoSync' does not conform to the 'Sendable' protocol
27 | public struct Configuration {
28 | public var reconnect: ReconnectPolicy = .suuntoApp
:
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
| `- warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:372:13: warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
| `- warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
373 | }
374 | do {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticSyncLink.swift:29:17: note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
27 |
28 | /// Finds and opens the watch.
29 | public protocol NauticSyncConnector: AnyObject {
| `- note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
30 | /// Returns true once the watch is seen, false after `timeout` (nil waits indefinitely).
31 | func waitUntilPresent(timeout: TimeInterval?) async throws -> Bool
[23/42] Compiling LibDCSwift NauticAutoSync.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:369:19: warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
367 | // Wall-clock, so a device that slept past the deadline fires as soon as it wakes.
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
| `- warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
:
722 |
723 | /// Settles the race between a connect finishing and its timeout firing.
724 | private final class ConnectAttempt {
| `- note: class 'ConnectAttempt' does not conform to the 'Sendable' protocol
725 | private let lock = NSLock()
726 | private var settled = false
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:370:13: warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
24 | ///
25 | /// Never writes to the watch: dives stay unsynchronised for the Suunto app.
26 | public final class NauticAutoSync {
| `- note: class 'NauticAutoSync' does not conform to the 'Sendable' protocol
27 | public struct Configuration {
28 | public var reconnect: ReconnectPolicy = .suuntoApp
:
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
| `- warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:372:13: warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
| `- warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
373 | }
374 | do {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticSyncLink.swift:29:17: note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
27 |
28 | /// Finds and opens the watch.
29 | public protocol NauticSyncConnector: AnyObject {
| `- note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
30 | /// Returns true once the watch is seen, false after `timeout` (nil waits indefinitely).
31 | func waitUntilPresent(timeout: TimeInterval?) async throws -> Bool
[24/42] Compiling LibDCSwift NauticSyncLink.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:369:19: warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
367 | // Wall-clock, so a device that slept past the deadline fires as soon as it wakes.
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
| `- warning: capture of 'attempt' with non-sendable type 'ConnectAttempt' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
:
722 |
723 | /// Settles the race between a connect finishing and its timeout firing.
724 | private final class ConnectAttempt {
| `- note: class 'ConnectAttempt' does not conform to the 'Sendable' protocol
725 | private let lock = NSLock()
726 | private var settled = false
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:370:13: warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
24 | ///
25 | /// Never writes to the watch: dives stay unsynchronised for the Suunto app.
26 | public final class NauticAutoSync {
| `- note: class 'NauticAutoSync' does not conform to the 'Sendable' protocol
27 | public struct Configuration {
28 | public var reconnect: ReconnectPolicy = .suuntoApp
:
368 | DispatchQueue.global().asyncAfter(wallDeadline: .now() + timeout) { [weak self, connector = self.connector] in
369 | guard attempt.expire() else { return }
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
| `- warning: capture of 'self' with non-sendable type 'NauticAutoSync?' in a '@Sendable' closure
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticAutoSync.swift:372:13: warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
370 | self?.emit(.log("No connection after \(Int(timeout)) s: \(Self.unreachableHint)"))
371 | self?.emit(.watchUnreachable(after: timeout))
372 | connector.cancelConnect()
| `- warning: capture of 'connector' with non-sendable type 'any NauticSyncConnector' in a '@Sendable' closure
373 | }
374 | do {
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/AutoSync/NauticSyncLink.swift:29:17: note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
27 |
28 | /// Finds and opens the watch.
29 | public protocol NauticSyncConnector: AnyObject {
| `- note: protocol 'NauticSyncConnector' does not conform to the 'Sendable' protocol
30 | /// Returns true once the watch is seen, false after `timeout` (nil waits indefinitely).
31 | func waitUntilPresent(timeout: TimeInterval?) async throws -> Bool
[25/42] Compiling LibDCSwift SuuntoNauticExplorer.swift
[26/42] Compiling LibDCSwift SuuntoNauticResume.swift
[27/42] Compiling LibDCSwift DCTransport.swift
[28/42] Compiling LibDCSwift DiveLogRetriever.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/DiveLogRetriever.swift:794:24: warning: capture of 'devicePtr' with non-sendable type 'UnsafeMutablePointer<device_data_t>' in an isolated closure; this is an error in the Swift 6 language mode
792 | progressTimer.schedule(deadline: .now(), repeating: 0.25)
793 | progressTimer.setEventHandler {
794 | if devicePtr.pointee.have_progress != 0 {
| `- warning: capture of 'devicePtr' with non-sendable type 'UnsafeMutablePointer<device_data_t>' in an isolated closure; this is an error in the Swift 6 language mode
795 | onProgress?(Int(devicePtr.pointee.progress.current), Int(devicePtr.pointee.progress.maximum))
796 | }
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
| `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 | public let _rawValue: Builtin.RawPointer
3 | public init(_ _rawValue: Builtin.RawPointer)
[29/42] Compiling LibDCSwift LibDCSwift.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/DiveLogRetriever.swift:794:24: warning: capture of 'devicePtr' with non-sendable type 'UnsafeMutablePointer<device_data_t>' in an isolated closure; this is an error in the Swift 6 language mode
792 | progressTimer.schedule(deadline: .now(), repeating: 0.25)
793 | progressTimer.setEventHandler {
794 | if devicePtr.pointee.have_progress != 0 {
| `- warning: capture of 'devicePtr' with non-sendable type 'UnsafeMutablePointer<device_data_t>' in an isolated closure; this is an error in the Swift 6 language mode
795 | onProgress?(Int(devicePtr.pointee.progress.current), Int(devicePtr.pointee.progress.maximum))
796 | }
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
| `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 | public let _rawValue: Builtin.RawPointer
3 | public init(_ _rawValue: Builtin.RawPointer)
[30/42] Compiling LibDCSwift Logger.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/DiveLogRetriever.swift:794:24: warning: capture of 'devicePtr' with non-sendable type 'UnsafeMutablePointer<device_data_t>' in an isolated closure; this is an error in the Swift 6 language mode
792 | progressTimer.schedule(deadline: .now(), repeating: 0.25)
793 | progressTimer.setEventHandler {
794 | if devicePtr.pointee.have_progress != 0 {
| `- warning: capture of 'devicePtr' with non-sendable type 'UnsafeMutablePointer<device_data_t>' in an isolated closure; this is an error in the Swift 6 language mode
795 | onProgress?(Int(devicePtr.pointee.progress.current), Int(devicePtr.pointee.progress.maximum))
796 | }
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
| `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 | public let _rawValue: Builtin.RawPointer
3 | public init(_ _rawValue: Builtin.RawPointer)
[31/42] Compiling LibDCSwift DeviceConfiguration.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/DiveLogRetriever.swift:794:24: warning: capture of 'devicePtr' with non-sendable type 'UnsafeMutablePointer<device_data_t>' in an isolated closure; this is an error in the Swift 6 language mode
792 | progressTimer.schedule(deadline: .now(), repeating: 0.25)
793 | progressTimer.setEventHandler {
794 | if devicePtr.pointee.have_progress != 0 {
| `- warning: capture of 'devicePtr' with non-sendable type 'UnsafeMutablePointer<device_data_t>' in an isolated closure; this is an error in the Swift 6 language mode
795 | onProgress?(Int(devicePtr.pointee.progress.current), Int(devicePtr.pointee.progress.maximum))
796 | }
Swift.UnsafeMutablePointer:1:23: note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
1 | @frozen public struct UnsafeMutablePointer<Pointee> : Copyable where Pointee : ~Copyable {
| `- note: generic struct 'UnsafeMutablePointer' does not conform to the 'Sendable' protocol
2 | public let _rawValue: Builtin.RawPointer
3 | public init(_ _rawValue: Builtin.RawPointer)
[32/42] Compiling LibDCSwift BLELinkState.swift
[33/42] Compiling LibDCSwift BLEManager.swift
[34/42] Compiling LibDCSwift CableDiscovery.swift
[35/42] Compiling LibDCSwift CableEndpoint.swift
[36/42] Compiling LibDCSwift DCIOStreamBackend.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Streams/TapStream.swift:121:62: error: value of optional type 'Int32?' must be unwrapped to a value of type 'Int32'
119 | public func setTimeout(_ timeout: Int32) -> dc_status_t {
120 | let effective = readTimeoutFloor.map { timeout > 0 ? max(timeout, $0) : timeout } ?? timeout
121 | let status = inner.map { dc_iostream_set_timeout($0, effective) } ?? DC_STATUS_IO
| |- error: value of optional type 'Int32?' must be unwrapped to a value of type 'Int32'
| |- note: coalesce using '??' to provide a default when the optional value contains 'nil'
| `- note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
122 | if status == DC_STATUS_SUCCESS {
123 | self.timeout = effective
[37/42] Compiling LibDCSwift DCRecording.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Streams/TapStream.swift:121:62: error: value of optional type 'Int32?' must be unwrapped to a value of type 'Int32'
119 | public func setTimeout(_ timeout: Int32) -> dc_status_t {
120 | let effective = readTimeoutFloor.map { timeout > 0 ? max(timeout, $0) : timeout } ?? timeout
121 | let status = inner.map { dc_iostream_set_timeout($0, effective) } ?? DC_STATUS_IO
| |- error: value of optional type 'Int32?' must be unwrapped to a value of type 'Int32'
| |- note: coalesce using '??' to provide a default when the optional value contains 'nil'
| `- note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
122 | if status == DC_STATUS_SUCCESS {
123 | self.timeout = effective
[38/42] Compiling LibDCSwift ScriptedStream.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Streams/TapStream.swift:121:62: error: value of optional type 'Int32?' must be unwrapped to a value of type 'Int32'
119 | public func setTimeout(_ timeout: Int32) -> dc_status_t {
120 | let effective = readTimeoutFloor.map { timeout > 0 ? max(timeout, $0) : timeout } ?? timeout
121 | let status = inner.map { dc_iostream_set_timeout($0, effective) } ?? DC_STATUS_IO
| |- error: value of optional type 'Int32?' must be unwrapped to a value of type 'Int32'
| |- note: coalesce using '??' to provide a default when the optional value contains 'nil'
| `- note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
122 | if status == DC_STATUS_SUCCESS {
123 | self.timeout = effective
[39/42] Compiling LibDCSwift TapStream.swift
/Users/admin/builder/spi-builder-workspace/Sources/LibDCSwift/Streams/TapStream.swift:121:62: error: value of optional type 'Int32?' must be unwrapped to a value of type 'Int32'
119 | public func setTimeout(_ timeout: Int32) -> dc_status_t {
120 | let effective = readTimeoutFloor.map { timeout > 0 ? max(timeout, $0) : timeout } ?? timeout
121 | let status = inner.map { dc_iostream_set_timeout($0, effective) } ?? DC_STATUS_IO
| |- error: value of optional type 'Int32?' must be unwrapped to a value of type 'Int32'
| |- note: coalesce using '??' to provide a default when the optional value contains 'nil'
| `- note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
122 | if status == DC_STATUS_SUCCESS {
123 | self.timeout = effective
[40/42] Compiling LibDCSwift DeviceCatalog.swift
[41/42] Compiling LibDCSwift DiveComputerIdentity.swift
[42/42] Compiling LibDCSwift DiveDataViewModel.swift
BUILD FAILURE 6.1 macosSpm