The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Successful build of AsyncBluetooth, reference 6.0.0 (10c00f), with Swift 6.0 for macOS (SPM) on 5 Apr 2025 21:14:27 UTC.

Swift 6 data race errors: 26

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures

Build Log

========================================
RunAll
========================================
Builder version: 4.60.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/manolofdez/AsyncBluetooth.git
Reference: 6.0.0
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/manolofdez/AsyncBluetooth
 * tag               6.0.0      -> FETCH_HEAD
HEAD is now at 10c00f6 [Feature] Cancel peripheral operations on disconnect (#78)
Cloned https://github.com/manolofdez/AsyncBluetooth.git
Revision (git rev-parse @):
10c00f6d7af8264bc9f4ce1c20a6544dbf6a2147
SUCCESS checkout https://github.com/manolofdez/AsyncBluetooth.git at 6.0.0
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
  "identity": ".resolve-product-dependencies",
  "name": "resolve-dependencies",
  "url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "version": "unspecified",
  "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "dependencies": [
    {
      "identity": "asyncbluetooth",
      "name": "AsyncBluetooth",
      "url": "https://github.com/manolofdez/AsyncBluetooth.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/AsyncBluetooth",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/manolofdez/AsyncBluetooth.git
[1/1059] Fetching asyncbluetooth
Fetched https://github.com/manolofdez/AsyncBluetooth.git from cache (0.84s)
Creating working copy for https://github.com/manolofdez/AsyncBluetooth.git
Working copy of https://github.com/manolofdez/AsyncBluetooth.git resolved at 6.0.0 (10c00f6)
warning: '.resolve-product-dependencies': dependency 'asyncbluetooth' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/manolofdez/AsyncBluetooth.git
https://github.com/manolofdez/AsyncBluetooth.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "AsyncBluetooth",
  "name" : "AsyncBluetooth",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "11.0"
    },
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "watchos",
      "version" : "7.0"
    }
  ],
  "products" : [
    {
      "name" : "AsyncBluetooth",
      "targets" : [
        "AsyncBluetooth"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "AsyncBluetoothTests",
      "module_type" : "SwiftTarget",
      "name" : "AsyncBluetoothTests",
      "path" : "Tests",
      "sources" : [
        "AsyncExecutorMapTests.swift",
        "AsyncSerailExecutorTests.swift",
        "CentralManagerUtilsTests.swift",
        "PeripheralDataConversionTests.swift"
      ],
      "target_dependencies" : [
        "AsyncBluetooth"
      ],
      "type" : "test"
    },
    {
      "c99name" : "AsyncBluetooth",
      "module_type" : "SwiftTarget",
      "name" : "AsyncBluetooth",
      "path" : "Sources",
      "product_memberships" : [
        "AsyncBluetooth"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/PrivacyInfo.xcprivacy",
          "rule" : {
            "copy" : {
            }
          }
        }
      ],
      "sources" : [
        "AsyncBluetooth.swift",
        "CentralManager/CentralManager.swift",
        "CentralManager/CentralManagerContext.swift",
        "CentralManager/CentralManagerEvent.swift",
        "CentralManager/ScanData.swift",
        "DataConversion/PeripheralDataConvertible.swift",
        "Peripheral/BluetoothError.swift",
        "Peripheral/Characteristic.swift",
        "Peripheral/CharacteristicValueUpdateEventData.swift",
        "Peripheral/Descriptor.swift",
        "Peripheral/Extensions/Characteristic+DataConversion.swift",
        "Peripheral/Extensions/CharacteristicValueUpdateData+DataConversion.swift",
        "Peripheral/Extensions/Peripheral+ReadWrite.swift",
        "Peripheral/Peripheral.swift",
        "Peripheral/PeripheralContext.swift",
        "Peripheral/PeripheralDelegate.swift",
        "Peripheral/Service.swift",
        "Utils/AsyncBluetoothLogging.swift",
        "Utils/AsyncExecutorMap.swift",
        "Utils/AsyncSerialExecutor.swift",
        "Utils/AsyncSerialExecutorConstants.swift",
        "Utils/CallbackUtils.swift",
        "Utils/CentralManagerUtils.swift",
        "Utils/Extensions/AsyncExecutor+Flushable.swift",
        "Utils/Extensions/CBUUID+Sendable.swift",
        "Utils/FlushableExecutor.swift",
        "Utils/ThreadSafeArray.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/3] Write sources
[1/3] Copying PrivacyInfo.xcprivacy
[2/3] Write swift-version-5BDAB9E9C0126B9D.txt
[4/30] Emitting module AsyncBluetooth
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:238:24: warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
236 |     private typealias Utils = CentralManagerUtils
237 |
238 |     private static var logger: Logger = {
    |                        |- warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'logger' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
239 |         CentralManager.logger
240 |     }()
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:29:13: warning: no 'async' operations occur within 'await' expression
27 |     private(set) lazy var scanForPeripheralsContext = ScanForPeripheralsContext { [weak self] isScanning in
28 |         Task { [weak self] in
29 |             await self?.updateIsScanning(isScanning)
   |             `- warning: no 'async' operations occur within 'await' expression
30 |         }
31 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:27:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
25 |     private(set) var isScanning = false
26 |
27 |     private(set) lazy var scanForPeripheralsContext = ScanForPeripheralsContext { [weak self] isScanning in
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
28 |         Task { [weak self] in
29 |             await self?.updateIsScanning(isScanning)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:35:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
33 |     nonisolated private(set) lazy var eventSubject = PassthroughSubject<CentralManagerEvent, Never>()
34 |
35 |     private(set) lazy var waitUntilReadyExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
36 |         let executor = AsyncSerialExecutor<Void>()
37 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:41:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
39 |     }()
40 |
41 |     private(set) lazy var scanForPeripheralsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
42 |         let executor = AsyncSerialExecutor<Void>()
43 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:47:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
45 |     }()
46 |
47 |     private(set) lazy var connectToPeripheralExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
48 |         let executor = AsyncExecutorMap<UUID, Void>()
49 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:53:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
51 |     }()
52 |
53 |     private(set) lazy var cancelPeripheralConnectionExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
54 |         let executor = AsyncExecutorMap<UUID, Void>()
55 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/BluetoothError.swift:13:10: warning: associated value 'bluetoothUnavailable' of 'Sendable'-conforming enum 'BluetoothError' has non-sendable type 'BluetoothUnavailableReason'; this is an error in the Swift 6 language mode
 3 | import Foundation
 4 |
 5 | public enum BluetoothUnavailableReason {
   |             `- note: consider making enum 'BluetoothUnavailableReason' conform to the 'Sendable' protocol
 6 |     case poweredOff
 7 |     case unauthorized
   :
11 |
12 | public enum BluetoothError: Error {
13 |     case bluetoothUnavailable(BluetoothUnavailableReason)
   |          `- warning: associated value 'bluetoothUnavailable' of 'Sendable'-conforming enum 'BluetoothError' has non-sendable type 'BluetoothUnavailableReason'; this is an error in the Swift 6 language mode
14 |     case connectingInProgress
15 |     case disconnectingInProgress
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:12:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
10 |     nonisolated private(set) lazy var invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
11 |
12 |     private(set) lazy var readRSSIExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
13 |         let executor = AsyncSerialExecutor<NSNumber>()
14 |         Task {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:20:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
18 |     }()
19 |
20 |     private(set) lazy var discoverServiceExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
21 |         let executor = AsyncSerialExecutor<Void>()
22 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:26:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
24 |     }()
25 |
26 |     private(set) lazy var discoverIncludedServicesExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
27 |         let executor = AsyncExecutorMap<CBUUID, Void>()
28 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:32:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
30 |     }()
31 |
32 |     private(set) lazy var discoverCharacteristicsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
33 |         let executor = AsyncExecutorMap<CBUUID, Void>()
34 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:38:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
36 |     }()
37 |
38 |     private(set) lazy var readCharacteristicValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
39 |         let executor = AsyncExecutorMap<CBUUID, Void>()
40 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:44:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
42 |     }()
43 |
44 |     private(set) lazy var writeCharacteristicValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
45 |         let executor = AsyncExecutorMap<CBUUID, Void>()
46 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:50:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
48 |     }()
49 |
50 |     private(set) lazy var setNotifyValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
51 |         let executor = AsyncExecutorMap<CBUUID, Void>()
52 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:56:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
54 |     }()
55 |
56 |     private(set) lazy var discoverDescriptorsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
57 |         let executor = AsyncExecutorMap<CBUUID, Void>()
58 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:62:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
60 |     }()
61 |
62 |     private(set) lazy var readDescriptorValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
63 |         let executor = AsyncExecutorMap<CBUUID, Void>()
64 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:68:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
66 |     }()
67 |
68 |     private(set) lazy var writeDescriptorValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
69 |         let executor = AsyncExecutorMap<CBUUID, Void>()
70 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:74:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
72 |     }()
73 |
74 |     private(set) lazy var openL2CAPChannelExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
75 |         let executor = AsyncSerialExecutor<CBL2CAPChannel?>()
76 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncBluetoothLogging.swift:8:29: warning: static property 'isEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 | public final class AsyncBluetoothLogging: Sendable {
 7 |
 8 |     private(set) static var isEnabled = true
   |                             |- warning: static property 'isEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                             |- note: convert 'isEnabled' to a 'let' constant to make 'Sendable' shared state immutable
   |                             |- note: annotate 'isEnabled' with '@MainActor' if property should only be accessed from the main actor
   |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |
10 |     private static var loggers: [String: Logger] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncBluetoothLogging.swift:10:24: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 8 |     private(set) static var isEnabled = true
 9 |
10 |     private static var loggers: [String: Logger] = [:]
   |                        |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 |     private static let disabledLogger = Logger(OSLog.disabled)
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:47:5: warning: non-sendable type 'Self.ArrayLiteralElement...' in parameter of the protocol requirement satisfied by nonisolated initializer 'init(arrayLiteral:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 |
46 | extension ThreadSafeArray: ExpressibleByArrayLiteral {
47 |     init(arrayLiteral elements: Element...) {
   |     `- warning: non-sendable type 'Self.ArrayLiteralElement...' in parameter of the protocol requirement satisfied by nonisolated initializer 'init(arrayLiteral:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 |         self.init(array: elements)
49 |     }
[5/32] Compiling AsyncBluetooth Descriptor.swift
[6/32] Compiling AsyncBluetooth Characteristic+DataConversion.swift
[7/32] Compiling AsyncBluetooth CharacteristicValueUpdateData+DataConversion.swift
[8/32] Compiling AsyncBluetooth CentralManagerEvent.swift
[9/32] Compiling AsyncBluetooth ScanData.swift
[10/32] Compiling AsyncBluetooth PeripheralDataConvertible.swift
[11/32] Compiling AsyncBluetooth ThreadSafeArray.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:47:5: warning: non-sendable type 'Self.ArrayLiteralElement...' in parameter of the protocol requirement satisfied by nonisolated initializer 'init(arrayLiteral:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 |
46 | extension ThreadSafeArray: ExpressibleByArrayLiteral {
47 |     init(arrayLiteral elements: Element...) {
   |     `- warning: non-sendable type 'Self.ArrayLiteralElement...' in parameter of the protocol requirement satisfied by nonisolated initializer 'init(arrayLiteral:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 |         self.init(array: elements)
49 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:35:50: warning: non-sendable type '[Element]' in implicitly asynchronous access to actor-isolated property 'array' cannot cross actor boundary; this is an error in the Swift 6 language mode
 3 | import Foundation
 4 |
 5 | actor ThreadSafeArray<Element> {
   |                       `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 6 |
 7 |     private var array: [Element]
   :
33 |         mutating func next() async -> Element? {
34 |             if iterator == nil {
35 |                 iterator = await threadSafeArray.array.makeIterator()
   |                                                  `- warning: non-sendable type '[Element]' in implicitly asynchronous access to actor-isolated property 'array' cannot cross actor boundary; this is an error in the Swift 6 language mode
36 |             }
37 |             return iterator?.next()
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:14:14: 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
12 |
13 |     nonisolated func append(_ element: Element) {
14 |         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
15 |             await self.append(element)
   |                               `- note: closure captures 'element' which is accessible to code in the current task
16 |         }
17 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:15:24: warning: sending 'element' risks causing data races; this is an error in the Swift 6 language mode
13 |     nonisolated func append(_ element: Element) {
14 |         Task {
15 |             await self.append(element)
   |                        |- warning: sending 'element' risks causing data races; this is an error in the Swift 6 language mode
   |                        `- note: sending task-isolated 'element' to actor-isolated instance method 'append' risks causing data races between actor-isolated and task-isolated uses
16 |         }
17 |     }
[12/32] Compiling AsyncBluetooth resource_bundle_accessor.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:47:5: warning: non-sendable type 'Self.ArrayLiteralElement...' in parameter of the protocol requirement satisfied by nonisolated initializer 'init(arrayLiteral:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 |
46 | extension ThreadSafeArray: ExpressibleByArrayLiteral {
47 |     init(arrayLiteral elements: Element...) {
   |     `- warning: non-sendable type 'Self.ArrayLiteralElement...' in parameter of the protocol requirement satisfied by nonisolated initializer 'init(arrayLiteral:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 |         self.init(array: elements)
49 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:35:50: warning: non-sendable type '[Element]' in implicitly asynchronous access to actor-isolated property 'array' cannot cross actor boundary; this is an error in the Swift 6 language mode
 3 | import Foundation
 4 |
 5 | actor ThreadSafeArray<Element> {
   |                       `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 6 |
 7 |     private var array: [Element]
   :
33 |         mutating func next() async -> Element? {
34 |             if iterator == nil {
35 |                 iterator = await threadSafeArray.array.makeIterator()
   |                                                  `- warning: non-sendable type '[Element]' in implicitly asynchronous access to actor-isolated property 'array' cannot cross actor boundary; this is an error in the Swift 6 language mode
36 |             }
37 |             return iterator?.next()
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:14:14: 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
12 |
13 |     nonisolated func append(_ element: Element) {
14 |         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
15 |             await self.append(element)
   |                               `- note: closure captures 'element' which is accessible to code in the current task
16 |         }
17 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:15:24: warning: sending 'element' risks causing data races; this is an error in the Swift 6 language mode
13 |     nonisolated func append(_ element: Element) {
14 |         Task {
15 |             await self.append(element)
   |                        |- warning: sending 'element' risks causing data races; this is an error in the Swift 6 language mode
   |                        `- note: sending task-isolated 'element' to actor-isolated instance method 'append' risks causing data races between actor-isolated and task-isolated uses
16 |         }
17 |     }
[13/32] Compiling AsyncBluetooth CallbackUtils.swift
[14/32] Compiling AsyncBluetooth CentralManagerUtils.swift
[15/32] Compiling AsyncBluetooth AsyncExecutor+Flushable.swift
[16/32] Compiling AsyncBluetooth Peripheral+ReadWrite.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:12:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
10 |     nonisolated private(set) lazy var invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
11 |
12 |     private(set) lazy var readRSSIExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
13 |         let executor = AsyncSerialExecutor<NSNumber>()
14 |         Task {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:20:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
18 |     }()
19 |
20 |     private(set) lazy var discoverServiceExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
21 |         let executor = AsyncSerialExecutor<Void>()
22 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:26:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
24 |     }()
25 |
26 |     private(set) lazy var discoverIncludedServicesExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
27 |         let executor = AsyncExecutorMap<CBUUID, Void>()
28 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:32:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
30 |     }()
31 |
32 |     private(set) lazy var discoverCharacteristicsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
33 |         let executor = AsyncExecutorMap<CBUUID, Void>()
34 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:38:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
36 |     }()
37 |
38 |     private(set) lazy var readCharacteristicValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
39 |         let executor = AsyncExecutorMap<CBUUID, Void>()
40 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:44:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
42 |     }()
43 |
44 |     private(set) lazy var writeCharacteristicValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
45 |         let executor = AsyncExecutorMap<CBUUID, Void>()
46 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:50:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
48 |     }()
49 |
50 |     private(set) lazy var setNotifyValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
51 |         let executor = AsyncExecutorMap<CBUUID, Void>()
52 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:56:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
54 |     }()
55 |
56 |     private(set) lazy var discoverDescriptorsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
57 |         let executor = AsyncExecutorMap<CBUUID, Void>()
58 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:62:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
60 |     }()
61 |
62 |     private(set) lazy var readDescriptorValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
63 |         let executor = AsyncExecutorMap<CBUUID, Void>()
64 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:68:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
66 |     }()
67 |
68 |     private(set) lazy var writeDescriptorValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
69 |         let executor = AsyncExecutorMap<CBUUID, Void>()
70 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:74:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
72 |     }()
73 |
74 |     private(set) lazy var openL2CAPChannelExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
75 |         let executor = AsyncSerialExecutor<CBL2CAPChannel?>()
76 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:178:60: warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
176 |     /// Retrieves the value of a specified characteristic descriptor.
177 |     public func readValue(for descriptor: Descriptor) async throws {
178 |         try await self.context.readDescriptorValueExecutor.enqueue(withKey: descriptor.uuid) { [weak self] in
    |                                                            `- warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
179 |             self?.cbPeripheral.readValue(for: descriptor.cbDescriptor)
180 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:185:61: warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
183 |     /// Writes the value of a characteristic descriptor.
184 |     public func writeValue(_ data: Data, for descriptor: Descriptor) async throws {
185 |         try await self.context.writeDescriptorValueExecutor.enqueue(withKey: descriptor.uuid) { [weak self] in
    |                                                             `- warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
186 |             self?.cbPeripheral.writeValue(data, for: descriptor.cbDescriptor)
187 |         }
[17/32] Compiling AsyncBluetooth Peripheral.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:12:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
10 |     nonisolated private(set) lazy var invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
11 |
12 |     private(set) lazy var readRSSIExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
13 |         let executor = AsyncSerialExecutor<NSNumber>()
14 |         Task {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:20:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
18 |     }()
19 |
20 |     private(set) lazy var discoverServiceExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
21 |         let executor = AsyncSerialExecutor<Void>()
22 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:26:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
24 |     }()
25 |
26 |     private(set) lazy var discoverIncludedServicesExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
27 |         let executor = AsyncExecutorMap<CBUUID, Void>()
28 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:32:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
30 |     }()
31 |
32 |     private(set) lazy var discoverCharacteristicsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
33 |         let executor = AsyncExecutorMap<CBUUID, Void>()
34 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:38:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
36 |     }()
37 |
38 |     private(set) lazy var readCharacteristicValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
39 |         let executor = AsyncExecutorMap<CBUUID, Void>()
40 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:44:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
42 |     }()
43 |
44 |     private(set) lazy var writeCharacteristicValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
45 |         let executor = AsyncExecutorMap<CBUUID, Void>()
46 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:50:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
48 |     }()
49 |
50 |     private(set) lazy var setNotifyValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
51 |         let executor = AsyncExecutorMap<CBUUID, Void>()
52 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:56:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
54 |     }()
55 |
56 |     private(set) lazy var discoverDescriptorsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
57 |         let executor = AsyncExecutorMap<CBUUID, Void>()
58 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:62:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
60 |     }()
61 |
62 |     private(set) lazy var readDescriptorValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
63 |         let executor = AsyncExecutorMap<CBUUID, Void>()
64 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:68:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
66 |     }()
67 |
68 |     private(set) lazy var writeDescriptorValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
69 |         let executor = AsyncExecutorMap<CBUUID, Void>()
70 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:74:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
72 |     }()
73 |
74 |     private(set) lazy var openL2CAPChannelExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
75 |         let executor = AsyncSerialExecutor<CBL2CAPChannel?>()
76 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:178:60: warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
176 |     /// Retrieves the value of a specified characteristic descriptor.
177 |     public func readValue(for descriptor: Descriptor) async throws {
178 |         try await self.context.readDescriptorValueExecutor.enqueue(withKey: descriptor.uuid) { [weak self] in
    |                                                            `- warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
179 |             self?.cbPeripheral.readValue(for: descriptor.cbDescriptor)
180 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:185:61: warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
183 |     /// Writes the value of a characteristic descriptor.
184 |     public func writeValue(_ data: Data, for descriptor: Descriptor) async throws {
185 |         try await self.context.writeDescriptorValueExecutor.enqueue(withKey: descriptor.uuid) { [weak self] in
    |                                                             `- warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
186 |             self?.cbPeripheral.writeValue(data, for: descriptor.cbDescriptor)
187 |         }
[18/32] Compiling AsyncBluetooth PeripheralContext.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:12:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
10 |     nonisolated private(set) lazy var invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
11 |
12 |     private(set) lazy var readRSSIExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
13 |         let executor = AsyncSerialExecutor<NSNumber>()
14 |         Task {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:20:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
18 |     }()
19 |
20 |     private(set) lazy var discoverServiceExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
21 |         let executor = AsyncSerialExecutor<Void>()
22 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:26:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
24 |     }()
25 |
26 |     private(set) lazy var discoverIncludedServicesExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
27 |         let executor = AsyncExecutorMap<CBUUID, Void>()
28 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:32:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
30 |     }()
31 |
32 |     private(set) lazy var discoverCharacteristicsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
33 |         let executor = AsyncExecutorMap<CBUUID, Void>()
34 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:38:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
36 |     }()
37 |
38 |     private(set) lazy var readCharacteristicValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
39 |         let executor = AsyncExecutorMap<CBUUID, Void>()
40 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:44:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
42 |     }()
43 |
44 |     private(set) lazy var writeCharacteristicValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
45 |         let executor = AsyncExecutorMap<CBUUID, Void>()
46 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:50:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
48 |     }()
49 |
50 |     private(set) lazy var setNotifyValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
51 |         let executor = AsyncExecutorMap<CBUUID, Void>()
52 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:56:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
54 |     }()
55 |
56 |     private(set) lazy var discoverDescriptorsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
57 |         let executor = AsyncExecutorMap<CBUUID, Void>()
58 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:62:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
60 |     }()
61 |
62 |     private(set) lazy var readDescriptorValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
63 |         let executor = AsyncExecutorMap<CBUUID, Void>()
64 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:68:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
66 |     }()
67 |
68 |     private(set) lazy var writeDescriptorValueExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
69 |         let executor = AsyncExecutorMap<CBUUID, Void>()
70 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:74:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
72 |     }()
73 |
74 |     private(set) lazy var openL2CAPChannelExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
75 |         let executor = AsyncSerialExecutor<CBL2CAPChannel?>()
76 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:178:60: warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
176 |     /// Retrieves the value of a specified characteristic descriptor.
177 |     public func readValue(for descriptor: Descriptor) async throws {
178 |         try await self.context.readDescriptorValueExecutor.enqueue(withKey: descriptor.uuid) { [weak self] in
    |                                                            `- warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
179 |             self?.cbPeripheral.readValue(for: descriptor.cbDescriptor)
180 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:185:61: warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
183 |     /// Writes the value of a characteristic descriptor.
184 |     public func writeValue(_ data: Data, for descriptor: Descriptor) async throws {
185 |         try await self.context.writeDescriptorValueExecutor.enqueue(withKey: descriptor.uuid) { [weak self] in
    |                                                             `- warning: sending task-isolated value of type '() -> Void' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
186 |             self?.cbPeripheral.writeValue(data, for: descriptor.cbDescriptor)
187 |         }
[19/32] Compiling AsyncBluetooth AsyncBluetooth.swift
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:238:24: warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
236 |     private typealias Utils = CentralManagerUtils
237 |
238 |     private static var logger: Logger = {
    |                        |- warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'logger' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
239 |         CentralManager.logger
240 |     }()
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:264:32: warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
262 |         let scanData = ScanData(
263 |             peripheral: Peripheral(cbPeripheral),
264 |             advertisementData: advertisementData,
    |                                `- warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
265 |             rssi: RSSI
266 |         )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:29:13: warning: no 'async' operations occur within 'await' expression
27 |     private(set) lazy var scanForPeripheralsContext = ScanForPeripheralsContext { [weak self] isScanning in
28 |         Task { [weak self] in
29 |             await self?.updateIsScanning(isScanning)
   |             `- warning: no 'async' operations occur within 'await' expression
30 |         }
31 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:27:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
25 |     private(set) var isScanning = false
26 |
27 |     private(set) lazy var scanForPeripheralsContext = ScanForPeripheralsContext { [weak self] isScanning in
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
28 |         Task { [weak self] in
29 |             await self?.updateIsScanning(isScanning)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:35:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
33 |     nonisolated private(set) lazy var eventSubject = PassthroughSubject<CentralManagerEvent, Never>()
34 |
35 |     private(set) lazy var waitUntilReadyExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
36 |         let executor = AsyncSerialExecutor<Void>()
37 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:41:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
39 |     }()
40 |
41 |     private(set) lazy var scanForPeripheralsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
42 |         let executor = AsyncSerialExecutor<Void>()
43 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:47:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
45 |     }()
46 |
47 |     private(set) lazy var connectToPeripheralExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
48 |         let executor = AsyncExecutorMap<UUID, Void>()
49 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:53:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
51 |     }()
52 |
53 |     private(set) lazy var cancelPeripheralConnectionExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
54 |         let executor = AsyncExecutorMap<UUID, Void>()
55 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:222:18: 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
220 |             }
221 |
222 |             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
223 |                 await self.context.scanForPeripheralsContext.setContinuation(continuation)
224 |
225 |                 self.cbCentralManager.scanForPeripherals(withServices: serviceUUIDs, options: options)
    |                                                                                               `- note: closure captures 'options' which is accessible to code in the current task
226 |
227 |                 Self.logger.info("Scanning for peripherals...")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:245:14: 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
243 |         self.context.eventSubject.send(.didUpdateState(state: central.state))
244 |
245 |         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
246 |             guard let isBluetoothReadyResult = Utils.isBluetoothReady(central.state) else { return }
247 |
248 |             await self.context.waitUntilReadyExecutor.flush(isBluetoothReadyResult)
    |                   `- note: closure captures 'self' which is accessible to code in the current task
249 |         }
250 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:268:14: 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
266 |         )
267 |
268 |         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
269 |             guard let continuation = await self.context.scanForPeripheralsContext.continuation else {
    |                                            `- note: closure captures 'self' which is accessible to code in the current task
270 |                 let peripherlName = scanData.peripheral.name ?? "unknown"
271 |                 Self.logger.info("Ignoring peripheral '\(peripherlName, privacy: .private)' because the central manager is not scanning")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:281:14: 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
279 |
280 |     func centralManager(_ cbCentralManager: CBCentralManager, didConnect peripheral: CBPeripheral) {
281 |         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
282 |             Self.logger.info("Connected to peripheral \(peripheral.identifier)")
283 |
284 |             do {
285 |                 try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
286 |                     peripheral.identifier, result:.success(())
287 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:326:14: 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
324 |         error: Error?
325 |     ) {
326 |         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
327 |             Self.logger.warning(
328 |                 "Failed to connect to peripheral \(peripheral.identifier) - error: \(error?.localizedDescription ?? "")"
    :
330 |
331 |             do {
332 |                 try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
333 |                     peripheral.identifier, result: .failure(BluetoothError.errorConnectingToPeripheral(error: error))
334 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:350:14: 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
348 |         let peripheral = Peripheral(cbPeripheral)
349 |
350 |         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
351 |             await peripheral.cancelAllOperations()
352 |
353 |             do {
354 |                 let result = CallbackUtils.result(for: (), error: error)
355 |                 try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
356 |                     peripheral.identifier, result: result
357 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:374:14: 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
372 |         error: Error?
373 |     ) {
374 |         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
375 |             do {
376 |                 let result = CallbackUtils.result(for: (), error: error)
377 |                 try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
378 |                     peripheral.identifier, result: result
379 |                 )
[20/32] Compiling AsyncBluetooth CentralManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:238:24: warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
236 |     private typealias Utils = CentralManagerUtils
237 |
238 |     private static var logger: Logger = {
    |                        |- warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'logger' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
239 |         CentralManager.logger
240 |     }()
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:264:32: warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
262 |         let scanData = ScanData(
263 |             peripheral: Peripheral(cbPeripheral),
264 |             advertisementData: advertisementData,
    |                                `- warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
265 |             rssi: RSSI
266 |         )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:29:13: warning: no 'async' operations occur within 'await' expression
27 |     private(set) lazy var scanForPeripheralsContext = ScanForPeripheralsContext { [weak self] isScanning in
28 |         Task { [weak self] in
29 |             await self?.updateIsScanning(isScanning)
   |             `- warning: no 'async' operations occur within 'await' expression
30 |         }
31 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:27:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
25 |     private(set) var isScanning = false
26 |
27 |     private(set) lazy var scanForPeripheralsContext = ScanForPeripheralsContext { [weak self] isScanning in
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
28 |         Task { [weak self] in
29 |             await self?.updateIsScanning(isScanning)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:35:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
33 |     nonisolated private(set) lazy var eventSubject = PassthroughSubject<CentralManagerEvent, Never>()
34 |
35 |     private(set) lazy var waitUntilReadyExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
36 |         let executor = AsyncSerialExecutor<Void>()
37 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:41:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
39 |     }()
40 |
41 |     private(set) lazy var scanForPeripheralsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
42 |         let executor = AsyncSerialExecutor<Void>()
43 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:47:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
45 |     }()
46 |
47 |     private(set) lazy var connectToPeripheralExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
48 |         let executor = AsyncExecutorMap<UUID, Void>()
49 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:53:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
51 |     }()
52 |
53 |     private(set) lazy var cancelPeripheralConnectionExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
54 |         let executor = AsyncExecutorMap<UUID, Void>()
55 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:222:18: 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
220 |             }
221 |
222 |             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
223 |                 await self.context.scanForPeripheralsContext.setContinuation(continuation)
224 |
225 |                 self.cbCentralManager.scanForPeripherals(withServices: serviceUUIDs, options: options)
    |                                                                                               `- note: closure captures 'options' which is accessible to code in the current task
226 |
227 |                 Self.logger.info("Scanning for peripherals...")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:245:14: 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
243 |         self.context.eventSubject.send(.didUpdateState(state: central.state))
244 |
245 |         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
246 |             guard let isBluetoothReadyResult = Utils.isBluetoothReady(central.state) else { return }
247 |
248 |             await self.context.waitUntilReadyExecutor.flush(isBluetoothReadyResult)
    |                   `- note: closure captures 'self' which is accessible to code in the current task
249 |         }
250 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:268:14: 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
266 |         )
267 |
268 |         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
269 |             guard let continuation = await self.context.scanForPeripheralsContext.continuation else {
    |                                            `- note: closure captures 'self' which is accessible to code in the current task
270 |                 let peripherlName = scanData.peripheral.name ?? "unknown"
271 |                 Self.logger.info("Ignoring peripheral '\(peripherlName, privacy: .private)' because the central manager is not scanning")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:281:14: 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
279 |
280 |     func centralManager(_ cbCentralManager: CBCentralManager, didConnect peripheral: CBPeripheral) {
281 |         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
282 |             Self.logger.info("Connected to peripheral \(peripheral.identifier)")
283 |
284 |             do {
285 |                 try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
286 |                     peripheral.identifier, result:.success(())
287 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:326:14: 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
324 |         error: Error?
325 |     ) {
326 |         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
327 |             Self.logger.warning(
328 |                 "Failed to connect to peripheral \(peripheral.identifier) - error: \(error?.localizedDescription ?? "")"
    :
330 |
331 |             do {
332 |                 try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
333 |                     peripheral.identifier, result: .failure(BluetoothError.errorConnectingToPeripheral(error: error))
334 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:350:14: 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
348 |         let peripheral = Peripheral(cbPeripheral)
349 |
350 |         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
351 |             await peripheral.cancelAllOperations()
352 |
353 |             do {
354 |                 let result = CallbackUtils.result(for: (), error: error)
355 |                 try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
356 |                     peripheral.identifier, result: result
357 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:374:14: 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
372 |         error: Error?
373 |     ) {
374 |         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
375 |             do {
376 |                 let result = CallbackUtils.result(for: (), error: error)
377 |                 try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
378 |                     peripheral.identifier, result: result
379 |                 )
[21/32] Compiling AsyncBluetooth CentralManagerContext.swift
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:238:24: warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
236 |     private typealias Utils = CentralManagerUtils
237 |
238 |     private static var logger: Logger = {
    |                        |- warning: static property 'logger' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'logger' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'logger' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
239 |         CentralManager.logger
240 |     }()
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:264:32: warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
262 |         let scanData = ScanData(
263 |             peripheral: Peripheral(cbPeripheral),
264 |             advertisementData: advertisementData,
    |                                `- warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
265 |             rssi: RSSI
266 |         )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:29:13: warning: no 'async' operations occur within 'await' expression
27 |     private(set) lazy var scanForPeripheralsContext = ScanForPeripheralsContext { [weak self] isScanning in
28 |         Task { [weak self] in
29 |             await self?.updateIsScanning(isScanning)
   |             `- warning: no 'async' operations occur within 'await' expression
30 |         }
31 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:27:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
25 |     private(set) var isScanning = false
26 |
27 |     private(set) lazy var scanForPeripheralsContext = ScanForPeripheralsContext { [weak self] isScanning in
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
28 |         Task { [weak self] in
29 |             await self?.updateIsScanning(isScanning)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:35:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
33 |     nonisolated private(set) lazy var eventSubject = PassthroughSubject<CentralManagerEvent, Never>()
34 |
35 |     private(set) lazy var waitUntilReadyExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
36 |         let executor = AsyncSerialExecutor<Void>()
37 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:41:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
39 |     }()
40 |
41 |     private(set) lazy var scanForPeripheralsExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
42 |         let executor = AsyncSerialExecutor<Void>()
43 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:47:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
45 |     }()
46 |
47 |     private(set) lazy var connectToPeripheralExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
48 |         let executor = AsyncExecutorMap<UUID, Void>()
49 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:53:27: warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
51 |     }()
52 |
53 |     private(set) lazy var cancelPeripheralConnectionExecutor = {
   |                           `- warning: actor-isolated default value in a actor-isolated context; this is an error in the Swift 6 language mode
54 |         let executor = AsyncExecutorMap<UUID, Void>()
55 |         flushableExecutors.append(executor)
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:222:18: 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
220 |             }
221 |
222 |             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
223 |                 await self.context.scanForPeripheralsContext.setContinuation(continuation)
224 |
225 |                 self.cbCentralManager.scanForPeripherals(withServices: serviceUUIDs, options: options)
    |                                                                                               `- note: closure captures 'options' which is accessible to code in the current task
226 |
227 |                 Self.logger.info("Scanning for peripherals...")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:245:14: 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
243 |         self.context.eventSubject.send(.didUpdateState(state: central.state))
244 |
245 |         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
246 |             guard let isBluetoothReadyResult = Utils.isBluetoothReady(central.state) else { return }
247 |
248 |             await self.context.waitUntilReadyExecutor.flush(isBluetoothReadyResult)
    |                   `- note: closure captures 'self' which is accessible to code in the current task
249 |         }
250 |     }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:268:14: 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
266 |         )
267 |
268 |         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
269 |             guard let continuation = await self.context.scanForPeripheralsContext.continuation else {
    |                                            `- note: closure captures 'self' which is accessible to code in the current task
270 |                 let peripherlName = scanData.peripheral.name ?? "unknown"
271 |                 Self.logger.info("Ignoring peripheral '\(peripherlName, privacy: .private)' because the central manager is not scanning")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:281:14: 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
279 |
280 |     func centralManager(_ cbCentralManager: CBCentralManager, didConnect peripheral: CBPeripheral) {
281 |         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
282 |             Self.logger.info("Connected to peripheral \(peripheral.identifier)")
283 |
284 |             do {
285 |                 try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
286 |                     peripheral.identifier, result:.success(())
287 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:326:14: 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
324 |         error: Error?
325 |     ) {
326 |         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
327 |             Self.logger.warning(
328 |                 "Failed to connect to peripheral \(peripheral.identifier) - error: \(error?.localizedDescription ?? "")"
    :
330 |
331 |             do {
332 |                 try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
333 |                     peripheral.identifier, result: .failure(BluetoothError.errorConnectingToPeripheral(error: error))
334 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:350:14: 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
348 |         let peripheral = Peripheral(cbPeripheral)
349 |
350 |         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
351 |             await peripheral.cancelAllOperations()
352 |
353 |             do {
354 |                 let result = CallbackUtils.result(for: (), error: error)
355 |                 try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
356 |                     peripheral.identifier, result: result
357 |                 )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:374:14: 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
372 |         error: Error?
373 |     ) {
374 |         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
375 |             do {
376 |                 let result = CallbackUtils.result(for: (), error: error)
377 |                 try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
    |                           `- note: closure captures 'self' which is accessible to code in the current task
378 |                     peripheral.identifier, result: result
379 |                 )
[22/32] Compiling AsyncBluetooth AsyncExecutorMap.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:35:35: warning: non-sendable type 'Value' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
 7 | /// After work for a given key has started, this class will await until the client completes it before taking
 8 | /// on the next work for that key.
 9 | actor AsyncExecutorMap<Key, Value> where Key: Hashable {
   |                             `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
10 |
11 |     private static var logger: Logger {
   :
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   `- warning: non-sendable type 'Value' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:35:35: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
   |                                   `- note: sending 'self'-isolated 'block' to actor-isolated instance method 'enqueue' risks causing data races between actor-isolated and 'self'-isolated uses
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:31:28: warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
29 |         let executor = self.executors[key] ?? {
30 |             let executor = AsyncSerialExecutor<Value>()
31 |             self.executors[key] = executor
   |                            |- warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
   |                            `- note: 'self'-isolated 'key' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
32 |             return executor
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   `- note: access can happen concurrently
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:44:28: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
42 |         }
43 |
44 |         try await executor.setWorkCompletedWithResult(result)
   |                            |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
   |                            `- note: sending 'self'-isolated 'result' to actor-isolated instance method 'setWorkCompletedWithResult' risks causing data races between actor-isolated and 'self'-isolated uses
45 |
46 |         guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:57:24: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
55 |         }
56 |
57 |         await executor.flush(result)
   |                        |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
   |                        `- note: sending 'self'-isolated 'result' to actor-isolated instance method 'flush' risks causing data races between actor-isolated and 'self'-isolated uses
58 |
59 |         guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:54:71: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
 50 |         let queuedWorkID = UUID()
 51 |
 52 |         return try await withTaskCancellationHandler {
    |                          `- note: access can happen concurrently
 53 |             try await withCheckedThrowingContinuation { continuation in
 54 |                 self.queue.append(QueuedWork(id: queuedWorkID, block: block, continuation: continuation))
    |                                                                       |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                       `- note: 'self'-isolated 'block' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
 55 |                 self.scheduleDequeue()
 56 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:54:71: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
 51 |
 52 |         return try await withTaskCancellationHandler {
 53 |             try await withCheckedThrowingContinuation { continuation in
    |                       `- note: access can happen concurrently
 54 |                 self.queue.append(QueuedWork(id: queuedWorkID, block: block, continuation: continuation))
    |                                                                       |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                       `- note: 'self'-isolated 'block' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
 55 |                 self.scheduleDequeue()
 56 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:74:34: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 72 |         }
 73 |
 74 |         currentWork.continuation.resume(with: result)
    |                                  |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                  `- note: 'self'-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
 75 |
 76 |         self.currentWork = nil
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:84:40: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 82 |         self.queue.removeAll()
 83 |
 84 |         self.currentWork?.continuation.resume(with: result)
    |                                        |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                        `- note: 'self'-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
 85 |         self.currentWork = nil
 86 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:87:41: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 85 |         self.currentWork = nil
 86 |
 87 |         queue.forEach { $0.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
 88 |     }
 89 |
[23/32] Compiling AsyncBluetooth AsyncSerialExecutor.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:35:35: warning: non-sendable type 'Value' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
 7 | /// After work for a given key has started, this class will await until the client completes it before taking
 8 | /// on the next work for that key.
 9 | actor AsyncExecutorMap<Key, Value> where Key: Hashable {
   |                             `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
10 |
11 |     private static var logger: Logger {
   :
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   `- warning: non-sendable type 'Value' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:35:35: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
   |                                   `- note: sending 'self'-isolated 'block' to actor-isolated instance method 'enqueue' risks causing data races between actor-isolated and 'self'-isolated uses
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:31:28: warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
29 |         let executor = self.executors[key] ?? {
30 |             let executor = AsyncSerialExecutor<Value>()
31 |             self.executors[key] = executor
   |                            |- warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
   |                            `- note: 'self'-isolated 'key' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
32 |             return executor
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   `- note: access can happen concurrently
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:44:28: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
42 |         }
43 |
44 |         try await executor.setWorkCompletedWithResult(result)
   |                            |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
   |                            `- note: sending 'self'-isolated 'result' to actor-isolated instance method 'setWorkCompletedWithResult' risks causing data races between actor-isolated and 'self'-isolated uses
45 |
46 |         guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:57:24: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
55 |         }
56 |
57 |         await executor.flush(result)
   |                        |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
   |                        `- note: sending 'self'-isolated 'result' to actor-isolated instance method 'flush' risks causing data races between actor-isolated and 'self'-isolated uses
58 |
59 |         guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:54:71: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
 50 |         let queuedWorkID = UUID()
 51 |
 52 |         return try await withTaskCancellationHandler {
    |                          `- note: access can happen concurrently
 53 |             try await withCheckedThrowingContinuation { continuation in
 54 |                 self.queue.append(QueuedWork(id: queuedWorkID, block: block, continuation: continuation))
    |                                                                       |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                       `- note: 'self'-isolated 'block' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
 55 |                 self.scheduleDequeue()
 56 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:54:71: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
 51 |
 52 |         return try await withTaskCancellationHandler {
 53 |             try await withCheckedThrowingContinuation { continuation in
    |                       `- note: access can happen concurrently
 54 |                 self.queue.append(QueuedWork(id: queuedWorkID, block: block, continuation: continuation))
    |                                                                       |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                       `- note: 'self'-isolated 'block' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
 55 |                 self.scheduleDequeue()
 56 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:74:34: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 72 |         }
 73 |
 74 |         currentWork.continuation.resume(with: result)
    |                                  |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                  `- note: 'self'-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
 75 |
 76 |         self.currentWork = nil
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:84:40: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 82 |         self.queue.removeAll()
 83 |
 84 |         self.currentWork?.continuation.resume(with: result)
    |                                        |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                        `- note: 'self'-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
 85 |         self.currentWork = nil
 86 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:87:41: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 85 |         self.currentWork = nil
 86 |
 87 |         queue.forEach { $0.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
 88 |     }
 89 |
[24/32] Compiling AsyncBluetooth AsyncSerialExecutorConstants.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:35:35: warning: non-sendable type 'Value' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
 7 | /// After work for a given key has started, this class will await until the client completes it before taking
 8 | /// on the next work for that key.
 9 | actor AsyncExecutorMap<Key, Value> where Key: Hashable {
   |                             `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
10 |
11 |     private static var logger: Logger {
   :
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   `- warning: non-sendable type 'Value' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:35:35: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
   |                                   `- note: sending 'self'-isolated 'block' to actor-isolated instance method 'enqueue' risks causing data races between actor-isolated and 'self'-isolated uses
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:31:28: warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
29 |         let executor = self.executors[key] ?? {
30 |             let executor = AsyncSerialExecutor<Value>()
31 |             self.executors[key] = executor
   |                            |- warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
   |                            `- note: 'self'-isolated 'key' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
32 |             return executor
33 |         }()
34 |
35 |         return try await executor.enqueue(block)
   |                                   `- note: access can happen concurrently
36 |     }
37 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:44:28: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
42 |         }
43 |
44 |         try await executor.setWorkCompletedWithResult(result)
   |                            |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
   |                            `- note: sending 'self'-isolated 'result' to actor-isolated instance method 'setWorkCompletedWithResult' risks causing data races between actor-isolated and 'self'-isolated uses
45 |
46 |         guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:57:24: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
55 |         }
56 |
57 |         await executor.flush(result)
   |                        |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
   |                        `- note: sending 'self'-isolated 'result' to actor-isolated instance method 'flush' risks causing data races between actor-isolated and 'self'-isolated uses
58 |
59 |         guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:54:71: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
 50 |         let queuedWorkID = UUID()
 51 |
 52 |         return try await withTaskCancellationHandler {
    |                          `- note: access can happen concurrently
 53 |             try await withCheckedThrowingContinuation { continuation in
 54 |                 self.queue.append(QueuedWork(id: queuedWorkID, block: block, continuation: continuation))
    |                                                                       |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                       `- note: 'self'-isolated 'block' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
 55 |                 self.scheduleDequeue()
 56 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:54:71: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
 51 |
 52 |         return try await withTaskCancellationHandler {
 53 |             try await withCheckedThrowingContinuation { continuation in
    |                       `- note: access can happen concurrently
 54 |                 self.queue.append(QueuedWork(id: queuedWorkID, block: block, continuation: continuation))
    |                                                                       |- warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                       `- note: 'self'-isolated 'block' is captured by a actor-isolated closure. actor-isolated uses in closure may race against later nonisolated uses
 55 |                 self.scheduleDequeue()
 56 |             }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:74:34: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 72 |         }
 73 |
 74 |         currentWork.continuation.resume(with: result)
    |                                  |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                  `- note: 'self'-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
 75 |
 76 |         self.currentWork = nil
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:84:40: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 82 |         self.queue.removeAll()
 83 |
 84 |         self.currentWork?.continuation.resume(with: result)
    |                                        |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                        `- note: 'self'-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
 85 |         self.currentWork = nil
 86 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncSerialExecutor.swift:87:41: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
 85 |         self.currentWork = nil
 86 |
 87 |         queue.forEach { $0.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
 88 |     }
 89 |
[25/32] Compiling AsyncBluetooth CBUUID+Sendable.swift
[26/32] Compiling AsyncBluetooth FlushableExecutor.swift
[27/32] Compiling AsyncBluetooth PeripheralDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncBluetoothLogging.swift:8:29: warning: static property 'isEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 | public final class AsyncBluetoothLogging: Sendable {
 7 |
 8 |     private(set) static var isEnabled = true
   |                             |- warning: static property 'isEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                             |- note: convert 'isEnabled' to a 'let' constant to make 'Sendable' shared state immutable
   |                             |- note: annotate 'isEnabled' with '@MainActor' if property should only be accessed from the main actor
   |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |
10 |     private static var loggers: [String: Logger] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncBluetoothLogging.swift:10:24: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 8 |     private(set) static var isEnabled = true
 9 |
10 |     private static var loggers: [String: Logger] = [:]
   |                        |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 |     private static let disabledLogger = Logger(OSLog.disabled)
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:42:14: 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
 40 |
 41 |     func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverIncludedServicesFor service: CBService, error: Error?) {
 42 |         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
 43 |             do {
 44 |                 let result = CallbackUtils.result(for: (), error: error)
 45 |                 try await self.context.discoverIncludedServicesExecutor.setWorkCompletedForKey(
 46 |                     service.uuid, result: result
    |                     `- note: closure captures 'service' which is accessible to code in the current task
 47 |                 )
 48 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:55:14: 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
 53 |
 54 |     func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
 55 |         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
 56 |             do {
 57 |                 let result = CallbackUtils.result(for: (), error: error)
 58 |                 try await self.context.discoverCharacteristicsExecutor.setWorkCompletedForKey(
 59 |                     service.uuid, result: result
    |                     `- note: closure captures 'service' which is accessible to code in the current task
 60 |                 )
 61 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:74:14: 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
 72 |         }
 73 |
 74 |         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
 75 |             do {
 76 |                 let result = CallbackUtils.result(for: (), error: error)
 77 |                 try await self.context.readCharacteristicValueExecutor.setWorkCompletedForKey(
 78 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
 79 |                 )
 80 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:88:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 86 |
 87 |     func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) {
 88 |         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
 89 |             do {
 90 |                 let result = CallbackUtils.result(for: (), error: error)
 91 |                 try await self.context.writeCharacteristicValueExecutor.setWorkCompletedForKey(
 92 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
 93 |                 )
 94 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:105:14: 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
103 |         error: Error?
104 |     ) {
105 |         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
106 |             do {
107 |                 let result = CallbackUtils.result(for: (), error: error)
108 |                 try await self.context.setNotifyValueExecutor.setWorkCompletedForKey(
109 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
110 |                 )
111 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:122:14: 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
120 |         error: Error?
121 |     ) {
122 |         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
123 |             do {
124 |                 let result = CallbackUtils.result(for: (), error: error)
125 |                 try await self.context.discoverDescriptorsExecutor.setWorkCompletedForKey(
126 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
127 |                 )
128 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:135:14: 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
133 |
134 |     func peripheral(_ cbPeripheral: CBPeripheral, didUpdateValueFor descriptor: CBDescriptor, error: Error?) {
135 |         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
136 |             do {
137 |                 let result = CallbackUtils.result(for: (), error: error)
138 |                 try await self.context.readDescriptorValueExecutor.setWorkCompletedForKey(
139 |                     descriptor.uuid, result: result
    |                     `- note: closure captures 'descriptor' which is accessible to code in the current task
140 |                 )
141 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:148:14: 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
146 |
147 |     func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor descriptor: CBDescriptor, error: Error?) {
148 |         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
149 |             do {
150 |                 let result = CallbackUtils.result(for: (), error: error)
151 |                 try await self.context.writeDescriptorValueExecutor.setWorkCompletedForKey(
152 |                     descriptor.uuid, result: result
    |                     `- note: closure captures 'descriptor' which is accessible to code in the current task
153 |                 )
154 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:161:14: 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
159 |
160 |     func peripheral(_ cbPeripheral: CBPeripheral, didOpen channel: CBL2CAPChannel?, error: Error?) {
161 |         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
162 |             do {
163 |                 let result = CallbackUtils.result(for: channel, error: error)
    |                                                        `- note: closure captures 'channel' which is accessible to code in the current task
164 |                 try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
165 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:164:65: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
162 |             do {
163 |                 let result = CallbackUtils.result(for: channel, error: error)
164 |                 try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
    |                                                                 |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                 `- note: sending task-isolated 'result' to actor-isolated instance method 'setWorkCompletedWithResult' risks causing data races between actor-isolated and task-isolated uses
165 |             } catch {
166 |                 Self.logger.warning("Received OpenChannel result without a continuation")
[28/32] Compiling AsyncBluetooth Service.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncBluetoothLogging.swift:8:29: warning: static property 'isEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 | public final class AsyncBluetoothLogging: Sendable {
 7 |
 8 |     private(set) static var isEnabled = true
   |                             |- warning: static property 'isEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                             |- note: convert 'isEnabled' to a 'let' constant to make 'Sendable' shared state immutable
   |                             |- note: annotate 'isEnabled' with '@MainActor' if property should only be accessed from the main actor
   |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |
10 |     private static var loggers: [String: Logger] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncBluetoothLogging.swift:10:24: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 8 |     private(set) static var isEnabled = true
 9 |
10 |     private static var loggers: [String: Logger] = [:]
   |                        |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 |     private static let disabledLogger = Logger(OSLog.disabled)
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:42:14: 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
 40 |
 41 |     func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverIncludedServicesFor service: CBService, error: Error?) {
 42 |         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
 43 |             do {
 44 |                 let result = CallbackUtils.result(for: (), error: error)
 45 |                 try await self.context.discoverIncludedServicesExecutor.setWorkCompletedForKey(
 46 |                     service.uuid, result: result
    |                     `- note: closure captures 'service' which is accessible to code in the current task
 47 |                 )
 48 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:55:14: 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
 53 |
 54 |     func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
 55 |         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
 56 |             do {
 57 |                 let result = CallbackUtils.result(for: (), error: error)
 58 |                 try await self.context.discoverCharacteristicsExecutor.setWorkCompletedForKey(
 59 |                     service.uuid, result: result
    |                     `- note: closure captures 'service' which is accessible to code in the current task
 60 |                 )
 61 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:74:14: 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
 72 |         }
 73 |
 74 |         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
 75 |             do {
 76 |                 let result = CallbackUtils.result(for: (), error: error)
 77 |                 try await self.context.readCharacteristicValueExecutor.setWorkCompletedForKey(
 78 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
 79 |                 )
 80 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:88:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 86 |
 87 |     func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) {
 88 |         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
 89 |             do {
 90 |                 let result = CallbackUtils.result(for: (), error: error)
 91 |                 try await self.context.writeCharacteristicValueExecutor.setWorkCompletedForKey(
 92 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
 93 |                 )
 94 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:105:14: 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
103 |         error: Error?
104 |     ) {
105 |         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
106 |             do {
107 |                 let result = CallbackUtils.result(for: (), error: error)
108 |                 try await self.context.setNotifyValueExecutor.setWorkCompletedForKey(
109 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
110 |                 )
111 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:122:14: 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
120 |         error: Error?
121 |     ) {
122 |         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
123 |             do {
124 |                 let result = CallbackUtils.result(for: (), error: error)
125 |                 try await self.context.discoverDescriptorsExecutor.setWorkCompletedForKey(
126 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
127 |                 )
128 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:135:14: 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
133 |
134 |     func peripheral(_ cbPeripheral: CBPeripheral, didUpdateValueFor descriptor: CBDescriptor, error: Error?) {
135 |         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
136 |             do {
137 |                 let result = CallbackUtils.result(for: (), error: error)
138 |                 try await self.context.readDescriptorValueExecutor.setWorkCompletedForKey(
139 |                     descriptor.uuid, result: result
    |                     `- note: closure captures 'descriptor' which is accessible to code in the current task
140 |                 )
141 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:148:14: 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
146 |
147 |     func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor descriptor: CBDescriptor, error: Error?) {
148 |         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
149 |             do {
150 |                 let result = CallbackUtils.result(for: (), error: error)
151 |                 try await self.context.writeDescriptorValueExecutor.setWorkCompletedForKey(
152 |                     descriptor.uuid, result: result
    |                     `- note: closure captures 'descriptor' which is accessible to code in the current task
153 |                 )
154 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:161:14: 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
159 |
160 |     func peripheral(_ cbPeripheral: CBPeripheral, didOpen channel: CBL2CAPChannel?, error: Error?) {
161 |         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
162 |             do {
163 |                 let result = CallbackUtils.result(for: channel, error: error)
    |                                                        `- note: closure captures 'channel' which is accessible to code in the current task
164 |                 try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
165 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:164:65: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
162 |             do {
163 |                 let result = CallbackUtils.result(for: channel, error: error)
164 |                 try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
    |                                                                 |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                 `- note: sending task-isolated 'result' to actor-isolated instance method 'setWorkCompletedWithResult' risks causing data races between actor-isolated and task-isolated uses
165 |             } catch {
166 |                 Self.logger.warning("Received OpenChannel result without a continuation")
[29/32] Compiling AsyncBluetooth AsyncBluetoothLogging.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncBluetoothLogging.swift:8:29: warning: static property 'isEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 | public final class AsyncBluetoothLogging: Sendable {
 7 |
 8 |     private(set) static var isEnabled = true
   |                             |- warning: static property 'isEnabled' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                             |- note: convert 'isEnabled' to a 'let' constant to make 'Sendable' shared state immutable
   |                             |- note: annotate 'isEnabled' with '@MainActor' if property should only be accessed from the main actor
   |                             `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |
10 |     private static var loggers: [String: Logger] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncBluetoothLogging.swift:10:24: warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 8 |     private(set) static var isEnabled = true
 9 |
10 |     private static var loggers: [String: Logger] = [:]
   |                        |- warning: static property 'loggers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert 'loggers' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: annotate 'loggers' with '@MainActor' if property should only be accessed from the main actor
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 |     private static let disabledLogger = Logger(OSLog.disabled)
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:42:14: 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
 40 |
 41 |     func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverIncludedServicesFor service: CBService, error: Error?) {
 42 |         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
 43 |             do {
 44 |                 let result = CallbackUtils.result(for: (), error: error)
 45 |                 try await self.context.discoverIncludedServicesExecutor.setWorkCompletedForKey(
 46 |                     service.uuid, result: result
    |                     `- note: closure captures 'service' which is accessible to code in the current task
 47 |                 )
 48 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:55:14: 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
 53 |
 54 |     func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
 55 |         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
 56 |             do {
 57 |                 let result = CallbackUtils.result(for: (), error: error)
 58 |                 try await self.context.discoverCharacteristicsExecutor.setWorkCompletedForKey(
 59 |                     service.uuid, result: result
    |                     `- note: closure captures 'service' which is accessible to code in the current task
 60 |                 )
 61 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:74:14: 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
 72 |         }
 73 |
 74 |         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
 75 |             do {
 76 |                 let result = CallbackUtils.result(for: (), error: error)
 77 |                 try await self.context.readCharacteristicValueExecutor.setWorkCompletedForKey(
 78 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
 79 |                 )
 80 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:88:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 86 |
 87 |     func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) {
 88 |         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
 89 |             do {
 90 |                 let result = CallbackUtils.result(for: (), error: error)
 91 |                 try await self.context.writeCharacteristicValueExecutor.setWorkCompletedForKey(
 92 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
 93 |                 )
 94 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:105:14: 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
103 |         error: Error?
104 |     ) {
105 |         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
106 |             do {
107 |                 let result = CallbackUtils.result(for: (), error: error)
108 |                 try await self.context.setNotifyValueExecutor.setWorkCompletedForKey(
109 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
110 |                 )
111 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:122:14: 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
120 |         error: Error?
121 |     ) {
122 |         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
123 |             do {
124 |                 let result = CallbackUtils.result(for: (), error: error)
125 |                 try await self.context.discoverDescriptorsExecutor.setWorkCompletedForKey(
126 |                     characteristic.uuid, result: result
    |                     `- note: closure captures 'characteristic' which is accessible to code in the current task
127 |                 )
128 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:135:14: 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
133 |
134 |     func peripheral(_ cbPeripheral: CBPeripheral, didUpdateValueFor descriptor: CBDescriptor, error: Error?) {
135 |         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
136 |             do {
137 |                 let result = CallbackUtils.result(for: (), error: error)
138 |                 try await self.context.readDescriptorValueExecutor.setWorkCompletedForKey(
139 |                     descriptor.uuid, result: result
    |                     `- note: closure captures 'descriptor' which is accessible to code in the current task
140 |                 )
141 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:148:14: 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
146 |
147 |     func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor descriptor: CBDescriptor, error: Error?) {
148 |         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
149 |             do {
150 |                 let result = CallbackUtils.result(for: (), error: error)
151 |                 try await self.context.writeDescriptorValueExecutor.setWorkCompletedForKey(
152 |                     descriptor.uuid, result: result
    |                     `- note: closure captures 'descriptor' which is accessible to code in the current task
153 |                 )
154 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:161:14: 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
159 |
160 |     func peripheral(_ cbPeripheral: CBPeripheral, didOpen channel: CBL2CAPChannel?, error: Error?) {
161 |         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
162 |             do {
163 |                 let result = CallbackUtils.result(for: channel, error: error)
    |                                                        `- note: closure captures 'channel' which is accessible to code in the current task
164 |                 try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
165 |             } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:164:65: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
162 |             do {
163 |                 let result = CallbackUtils.result(for: channel, error: error)
164 |                 try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
    |                                                                 |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                                                                 `- note: sending task-isolated 'result' to actor-isolated instance method 'setWorkCompletedWithResult' risks causing data races between actor-isolated and task-isolated uses
165 |             } catch {
166 |                 Self.logger.warning("Received OpenChannel result without a continuation")
[30/32] Compiling AsyncBluetooth BluetoothError.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/BluetoothError.swift:13:10: warning: associated value 'bluetoothUnavailable' of 'Sendable'-conforming enum 'BluetoothError' has non-sendable type 'BluetoothUnavailableReason'; this is an error in the Swift 6 language mode
 3 | import Foundation
 4 |
 5 | public enum BluetoothUnavailableReason {
   |             `- note: consider making enum 'BluetoothUnavailableReason' conform to the 'Sendable' protocol
 6 |     case poweredOff
 7 |     case unauthorized
   :
11 |
12 | public enum BluetoothError: Error {
13 |     case bluetoothUnavailable(BluetoothUnavailableReason)
   |          `- warning: associated value 'bluetoothUnavailable' of 'Sendable'-conforming enum 'BluetoothError' has non-sendable type 'BluetoothUnavailableReason'; this is an error in the Swift 6 language mode
14 |     case connectingInProgress
15 |     case disconnectingInProgress
[31/32] Compiling AsyncBluetooth Characteristic.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/BluetoothError.swift:13:10: warning: associated value 'bluetoothUnavailable' of 'Sendable'-conforming enum 'BluetoothError' has non-sendable type 'BluetoothUnavailableReason'; this is an error in the Swift 6 language mode
 3 | import Foundation
 4 |
 5 | public enum BluetoothUnavailableReason {
   |             `- note: consider making enum 'BluetoothUnavailableReason' conform to the 'Sendable' protocol
 6 |     case poweredOff
 7 |     case unauthorized
   :
11 |
12 | public enum BluetoothError: Error {
13 |     case bluetoothUnavailable(BluetoothUnavailableReason)
   |          `- warning: associated value 'bluetoothUnavailable' of 'Sendable'-conforming enum 'BluetoothError' has non-sendable type 'BluetoothUnavailableReason'; this is an error in the Swift 6 language mode
14 |     case connectingInProgress
15 |     case disconnectingInProgress
[32/32] Compiling AsyncBluetooth CharacteristicValueUpdateEventData.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/BluetoothError.swift:13:10: warning: associated value 'bluetoothUnavailable' of 'Sendable'-conforming enum 'BluetoothError' has non-sendable type 'BluetoothUnavailableReason'; this is an error in the Swift 6 language mode
 3 | import Foundation
 4 |
 5 | public enum BluetoothUnavailableReason {
   |             `- note: consider making enum 'BluetoothUnavailableReason' conform to the 'Sendable' protocol
 6 |     case poweredOff
 7 |     case unauthorized
   :
11 |
12 | public enum BluetoothError: Error {
13 |     case bluetoothUnavailable(BluetoothUnavailableReason)
   |          `- warning: associated value 'bluetoothUnavailable' of 'Sendable'-conforming enum 'BluetoothError' has non-sendable type 'BluetoothUnavailableReason'; this is an error in the Swift 6 language mode
14 |     case connectingInProgress
15 |     case disconnectingInProgress
Build complete! (17.73s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "AsyncBluetooth",
  "name" : "AsyncBluetooth",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "11.0"
    },
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "watchos",
      "version" : "7.0"
    }
  ],
  "products" : [
    {
      "name" : "AsyncBluetooth",
      "targets" : [
        "AsyncBluetooth"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "AsyncBluetoothTests",
      "module_type" : "SwiftTarget",
      "name" : "AsyncBluetoothTests",
      "path" : "Tests",
      "sources" : [
        "AsyncExecutorMapTests.swift",
        "AsyncSerailExecutorTests.swift",
        "CentralManagerUtilsTests.swift",
        "PeripheralDataConversionTests.swift"
      ],
      "target_dependencies" : [
        "AsyncBluetooth"
      ],
      "type" : "test"
    },
    {
      "c99name" : "AsyncBluetooth",
      "module_type" : "SwiftTarget",
      "name" : "AsyncBluetooth",
      "path" : "Sources",
      "product_memberships" : [
        "AsyncBluetooth"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/PrivacyInfo.xcprivacy",
          "rule" : {
            "copy" : {
            }
          }
        }
      ],
      "sources" : [
        "AsyncBluetooth.swift",
        "CentralManager/CentralManager.swift",
        "CentralManager/CentralManagerContext.swift",
        "CentralManager/CentralManagerEvent.swift",
        "CentralManager/ScanData.swift",
        "DataConversion/PeripheralDataConvertible.swift",
        "Peripheral/BluetoothError.swift",
        "Peripheral/Characteristic.swift",
        "Peripheral/CharacteristicValueUpdateEventData.swift",
        "Peripheral/Descriptor.swift",
        "Peripheral/Extensions/Characteristic+DataConversion.swift",
        "Peripheral/Extensions/CharacteristicValueUpdateData+DataConversion.swift",
        "Peripheral/Extensions/Peripheral+ReadWrite.swift",
        "Peripheral/Peripheral.swift",
        "Peripheral/PeripheralContext.swift",
        "Peripheral/PeripheralDelegate.swift",
        "Peripheral/Service.swift",
        "Utils/AsyncBluetoothLogging.swift",
        "Utils/AsyncExecutorMap.swift",
        "Utils/AsyncSerialExecutor.swift",
        "Utils/AsyncSerialExecutorConstants.swift",
        "Utils/CallbackUtils.swift",
        "Utils/CentralManagerUtils.swift",
        "Utils/Extensions/AsyncExecutor+Flushable.swift",
        "Utils/Extensions/CBUUID+Sendable.swift",
        "Utils/FlushableExecutor.swift",
        "Utils/ThreadSafeArray.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.3"
}
Done.