Build Information
Successful build of AsyncBluetooth, reference 6.2.1 (cef759), with Swift 6.1 for macOS (SPM) on 25 Jan 2026 20:38:27 UTC.
Swift 6 data race errors: 21
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCapturesBuild Log
========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/manolofdez/AsyncBluetooth.git
Reference: 6.2.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/manolofdez/AsyncBluetooth
* tag 6.2.1 -> FETCH_HEAD
HEAD is now at cef7597 [Maintenance] Fix random crashes when accessing loggers when enabled #87
Cloned https://github.com/manolofdez/AsyncBluetooth.git
Revision (git rev-parse @):
cef7597680aa2c9fef62907529c8e57dda33ca20
SUCCESS checkout https://github.com/manolofdez/AsyncBluetooth.git at 6.2.1
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
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" : "6.0"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/3] Write sources
[1/3] Copying PrivacyInfo.xcprivacy
[2/3] Write swift-version-2F0A5646E1D333AE.txt
[4/30] Emitting module AsyncBluetooth
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:236: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
234 | private typealias Utils = CentralManagerUtils
235 |
236 | 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: add '@MainActor' to make static property 'logger' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
237 | CentralManager.logger
238 | }()
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:33:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CentralManagerEvent, Never>'; this is an error in the Swift 6 language mode
31 | }
32 |
33 | nonisolated let eventSubject = PassthroughSubject<CentralManagerEvent, Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CentralManagerEvent, Never>'; this is an error in the Swift 6 language mode
34 |
35 | private(set) lazy var waitUntilReadyExecutor = {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 |
7 | /// Contains the objects necessary to track a Central Manager's commands.
/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 let 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:9:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>'; this is an error in the Swift 6 language mode
7 | /// Contains the objects necessary to track a Peripheral's commands.
8 | actor PeripheralContext {
9 | nonisolated let characteristicValueUpdatedSubject = PassthroughSubject<CharacteristicValueUpdateEventData, Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>'; this is an error in the Swift 6 language mode
10 | nonisolated let invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
11 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 |
7 | /// Contains the objects necessary to track a Peripheral's commands.
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:10:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<[Service], Never>'; this is an error in the Swift 6 language mode
8 | actor PeripheralContext {
9 | nonisolated let characteristicValueUpdatedSubject = PassthroughSubject<CharacteristicValueUpdateEventData, Never>()
10 | nonisolated let invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<[Service], Never>'; this is an error in the Swift 6 language mode
11 |
12 | private(set) lazy var readRSSIExecutor = {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/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: add '@MainActor' to make static property 'isEnabled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
9 |
10 | private static let disabledLogger = Logger(OSLog.disabled)
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:47:5: warning: non-sendable parameter type 'Self.ArrayLiteralElement...' cannot be sent from caller of protocol requirement 'init(arrayLiteral:)' into nonisolated implementation; this is an error in the Swift 6 language mode
45 |
46 | extension ThreadSafeArray: ExpressibleByArrayLiteral {
47 | init(arrayLiteral elements: Element...) {
| `- warning: non-sendable parameter type 'Self.ArrayLiteralElement...' cannot be sent from caller of protocol requirement 'init(arrayLiteral:)' into nonisolated implementation; this is an error in the Swift 6 language mode
48 | self.init(array: elements)
49 | }
[5/32] Compiling AsyncBluetooth ThreadSafeArray.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:47:5: warning: non-sendable parameter type 'Self.ArrayLiteralElement...' cannot be sent from caller of protocol requirement 'init(arrayLiteral:)' into nonisolated implementation; this is an error in the Swift 6 language mode
45 |
46 | extension ThreadSafeArray: ExpressibleByArrayLiteral {
47 | init(arrayLiteral elements: Element...) {
| `- warning: non-sendable parameter type 'Self.ArrayLiteralElement...' cannot be sent from caller of protocol requirement 'init(arrayLiteral:)' into nonisolated implementation; 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]' of property 'array' cannot exit actor-isolated context; 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]' of property 'array' cannot exit actor-isolated context; 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 | }
[6/32] Compiling AsyncBluetooth resource_bundle_accessor.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/ThreadSafeArray.swift:47:5: warning: non-sendable parameter type 'Self.ArrayLiteralElement...' cannot be sent from caller of protocol requirement 'init(arrayLiteral:)' into nonisolated implementation; this is an error in the Swift 6 language mode
45 |
46 | extension ThreadSafeArray: ExpressibleByArrayLiteral {
47 | init(arrayLiteral elements: Element...) {
| `- warning: non-sendable parameter type 'Self.ArrayLiteralElement...' cannot be sent from caller of protocol requirement 'init(arrayLiteral:)' into nonisolated implementation; 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]' of property 'array' cannot exit actor-isolated context; 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]' of property 'array' cannot exit actor-isolated context; 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 | }
[7/32] Compiling AsyncBluetooth AsyncBluetooth.swift
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:236: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
234 | private typealias Utils = CentralManagerUtils
235 |
236 | 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: add '@MainActor' to make static property 'logger' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
237 | CentralManager.logger
238 | }()
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:35:26: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
33 | public var eventPublisher: AnyPublisher<CentralManagerEvent, Never> {
34 | get {
35 | self.context.eventSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | @preconcurrency import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 | import os.log
7 |
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:241:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
239 |
240 | func centralManagerDidUpdateState(_ central: CBCentralManager) {
241 | self.context.eventSubject.send(.didUpdateState(state: central.state))
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
242 |
243 | Task {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:251:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
249 |
250 | func centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any]) {
251 | self.context.eventSubject.send(.willRestoreState(state: dict))
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
252 | }
253 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:262:32: warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
260 | let scanData = ScanData(
261 | peripheral: Peripheral(cbPeripheral),
262 | advertisementData: advertisementData,
| `- warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
263 | rssi: RSSI
264 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:291:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
289 | }
290 |
291 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
292 | .didConnectPeripheral(peripheral: Peripheral(peripheral))
293 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:362:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
360 | }
361 |
362 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
363 | .didDisconnectPeripheral(peripheral: peripheral, isReconnecting: isReconnecting, error: error)
364 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:384:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
382 | }
383 |
384 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
385 | .didDisconnectPeripheral(peripheral: Peripheral(peripheral), isReconnecting: false, error: error)
386 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:33:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CentralManagerEvent, Never>'; this is an error in the Swift 6 language mode
31 | }
32 |
33 | nonisolated let eventSubject = PassthroughSubject<CentralManagerEvent, Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CentralManagerEvent, Never>'; this is an error in the Swift 6 language mode
34 |
35 | private(set) lazy var waitUntilReadyExecutor = {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 |
7 | /// Contains the objects necessary to track a Central Manager's commands.
/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 let 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:220: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
218 | }
219 |
220 | 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
221 | await self.context.scanForPeripheralsContext.setContinuation(continuation)
222 |
223 | self.cbCentralManager.scanForPeripherals(withServices: serviceUUIDs, options: options)
| `- note: closure captures 'options' which is accessible to code in the current task
224 |
225 | Self.logger.info("Scanning for peripherals...")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:243: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
241 | self.context.eventSubject.send(.didUpdateState(state: central.state))
242 |
243 | 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
244 | guard let isBluetoothReadyResult = Utils.isBluetoothReady(central.state) else { return }
245 |
246 | await self.context.waitUntilReadyExecutor.flush(isBluetoothReadyResult)
| `- note: closure captures 'self' which is accessible to code in the current task
247 | }
248 | }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:266: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
264 | )
265 |
266 | 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
267 | guard let continuation = await self.context.scanForPeripheralsContext.continuation else {
| `- note: closure captures 'self' which is accessible to code in the current task
268 | let peripherlName = scanData.peripheral.name ?? "unknown"
269 | 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:279: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
277 |
278 | func centralManager(_ cbCentralManager: CBCentralManager, didConnect peripheral: CBPeripheral) {
279 | 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
280 | Self.logger.info("Connected to peripheral \(peripheral.identifier)")
281 |
282 | do {
283 | try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
284 | peripheral.identifier, result:.success(())
285 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:324: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
322 | error: Error?
323 | ) {
324 | 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
325 | Self.logger.warning(
326 | "Failed to connect to peripheral \(peripheral.identifier) - error: \(error?.localizedDescription ?? "")"
:
328 |
329 | do {
330 | try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
331 | peripheral.identifier, result: .failure(BluetoothError.errorConnectingToPeripheral(error: error))
332 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:348: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
346 | let peripheral = Peripheral(cbPeripheral)
347 |
348 | 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
349 | await peripheral.cancelAllOperations()
350 |
351 | do {
352 | let result = CallbackUtils.result(for: (), error: error)
353 | try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
354 | peripheral.identifier, result: result
355 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:372: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
370 | error: Error?
371 | ) {
372 | 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
373 | do {
374 | let result = CallbackUtils.result(for: (), error: error)
375 | try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
376 | peripheral.identifier, result: result
377 | )
[8/32] Compiling AsyncBluetooth CentralManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:236: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
234 | private typealias Utils = CentralManagerUtils
235 |
236 | 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: add '@MainActor' to make static property 'logger' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
237 | CentralManager.logger
238 | }()
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:35:26: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
33 | public var eventPublisher: AnyPublisher<CentralManagerEvent, Never> {
34 | get {
35 | self.context.eventSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | @preconcurrency import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 | import os.log
7 |
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:241:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
239 |
240 | func centralManagerDidUpdateState(_ central: CBCentralManager) {
241 | self.context.eventSubject.send(.didUpdateState(state: central.state))
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
242 |
243 | Task {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:251:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
249 |
250 | func centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any]) {
251 | self.context.eventSubject.send(.willRestoreState(state: dict))
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
252 | }
253 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:262:32: warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
260 | let scanData = ScanData(
261 | peripheral: Peripheral(cbPeripheral),
262 | advertisementData: advertisementData,
| `- warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
263 | rssi: RSSI
264 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:291:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
289 | }
290 |
291 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
292 | .didConnectPeripheral(peripheral: Peripheral(peripheral))
293 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:362:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
360 | }
361 |
362 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
363 | .didDisconnectPeripheral(peripheral: peripheral, isReconnecting: isReconnecting, error: error)
364 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:384:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
382 | }
383 |
384 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
385 | .didDisconnectPeripheral(peripheral: Peripheral(peripheral), isReconnecting: false, error: error)
386 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:33:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CentralManagerEvent, Never>'; this is an error in the Swift 6 language mode
31 | }
32 |
33 | nonisolated let eventSubject = PassthroughSubject<CentralManagerEvent, Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CentralManagerEvent, Never>'; this is an error in the Swift 6 language mode
34 |
35 | private(set) lazy var waitUntilReadyExecutor = {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 |
7 | /// Contains the objects necessary to track a Central Manager's commands.
/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 let 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:220: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
218 | }
219 |
220 | 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
221 | await self.context.scanForPeripheralsContext.setContinuation(continuation)
222 |
223 | self.cbCentralManager.scanForPeripherals(withServices: serviceUUIDs, options: options)
| `- note: closure captures 'options' which is accessible to code in the current task
224 |
225 | Self.logger.info("Scanning for peripherals...")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:243: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
241 | self.context.eventSubject.send(.didUpdateState(state: central.state))
242 |
243 | 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
244 | guard let isBluetoothReadyResult = Utils.isBluetoothReady(central.state) else { return }
245 |
246 | await self.context.waitUntilReadyExecutor.flush(isBluetoothReadyResult)
| `- note: closure captures 'self' which is accessible to code in the current task
247 | }
248 | }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:266: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
264 | )
265 |
266 | 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
267 | guard let continuation = await self.context.scanForPeripheralsContext.continuation else {
| `- note: closure captures 'self' which is accessible to code in the current task
268 | let peripherlName = scanData.peripheral.name ?? "unknown"
269 | 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:279: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
277 |
278 | func centralManager(_ cbCentralManager: CBCentralManager, didConnect peripheral: CBPeripheral) {
279 | 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
280 | Self.logger.info("Connected to peripheral \(peripheral.identifier)")
281 |
282 | do {
283 | try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
284 | peripheral.identifier, result:.success(())
285 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:324: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
322 | error: Error?
323 | ) {
324 | 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
325 | Self.logger.warning(
326 | "Failed to connect to peripheral \(peripheral.identifier) - error: \(error?.localizedDescription ?? "")"
:
328 |
329 | do {
330 | try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
331 | peripheral.identifier, result: .failure(BluetoothError.errorConnectingToPeripheral(error: error))
332 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:348: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
346 | let peripheral = Peripheral(cbPeripheral)
347 |
348 | 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
349 | await peripheral.cancelAllOperations()
350 |
351 | do {
352 | let result = CallbackUtils.result(for: (), error: error)
353 | try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
354 | peripheral.identifier, result: result
355 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:372: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
370 | error: Error?
371 | ) {
372 | 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
373 | do {
374 | let result = CallbackUtils.result(for: (), error: error)
375 | try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
376 | peripheral.identifier, result: result
377 | )
[9/32] Compiling AsyncBluetooth CentralManagerContext.swift
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:236: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
234 | private typealias Utils = CentralManagerUtils
235 |
236 | 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: add '@MainActor' to make static property 'logger' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
237 | CentralManager.logger
238 | }()
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:35:26: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
33 | public var eventPublisher: AnyPublisher<CentralManagerEvent, Never> {
34 | get {
35 | self.context.eventSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | @preconcurrency import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 | import os.log
7 |
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:241:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
239 |
240 | func centralManagerDidUpdateState(_ central: CBCentralManager) {
241 | self.context.eventSubject.send(.didUpdateState(state: central.state))
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
242 |
243 | Task {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:251:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
249 |
250 | func centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any]) {
251 | self.context.eventSubject.send(.willRestoreState(state: dict))
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
252 | }
253 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:262:32: warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
260 | let scanData = ScanData(
261 | peripheral: Peripheral(cbPeripheral),
262 | advertisementData: advertisementData,
| `- warning: type 'Any' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
263 | rssi: RSSI
264 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:291:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
289 | }
290 |
291 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
292 | .didConnectPeripheral(peripheral: Peripheral(peripheral))
293 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:362:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
360 | }
361 |
362 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
363 | .didDisconnectPeripheral(peripheral: peripheral, isReconnecting: isReconnecting, error: error)
364 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:384:22: warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
382 | }
383 |
384 | self.context.eventSubject.send(
| `- warning: non-sendable type 'PassthroughSubject<CentralManagerEvent, Never>' of property 'eventSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
385 | .didDisconnectPeripheral(peripheral: Peripheral(peripheral), isReconnecting: false, error: error)
386 | )
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:33:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CentralManagerEvent, Never>'; this is an error in the Swift 6 language mode
31 | }
32 |
33 | nonisolated let eventSubject = PassthroughSubject<CentralManagerEvent, Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CentralManagerEvent, Never>'; this is an error in the Swift 6 language mode
34 |
35 | private(set) lazy var waitUntilReadyExecutor = {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManagerContext.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 |
7 | /// Contains the objects necessary to track a Central Manager's commands.
/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 let 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:220: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
218 | }
219 |
220 | 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
221 | await self.context.scanForPeripheralsContext.setContinuation(continuation)
222 |
223 | self.cbCentralManager.scanForPeripherals(withServices: serviceUUIDs, options: options)
| `- note: closure captures 'options' which is accessible to code in the current task
224 |
225 | Self.logger.info("Scanning for peripherals...")
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:243: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
241 | self.context.eventSubject.send(.didUpdateState(state: central.state))
242 |
243 | 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
244 | guard let isBluetoothReadyResult = Utils.isBluetoothReady(central.state) else { return }
245 |
246 | await self.context.waitUntilReadyExecutor.flush(isBluetoothReadyResult)
| `- note: closure captures 'self' which is accessible to code in the current task
247 | }
248 | }
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:266: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
264 | )
265 |
266 | 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
267 | guard let continuation = await self.context.scanForPeripheralsContext.continuation else {
| `- note: closure captures 'self' which is accessible to code in the current task
268 | let peripherlName = scanData.peripheral.name ?? "unknown"
269 | 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:279: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
277 |
278 | func centralManager(_ cbCentralManager: CBCentralManager, didConnect peripheral: CBPeripheral) {
279 | 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
280 | Self.logger.info("Connected to peripheral \(peripheral.identifier)")
281 |
282 | do {
283 | try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
284 | peripheral.identifier, result:.success(())
285 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:324: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
322 | error: Error?
323 | ) {
324 | 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
325 | Self.logger.warning(
326 | "Failed to connect to peripheral \(peripheral.identifier) - error: \(error?.localizedDescription ?? "")"
:
328 |
329 | do {
330 | try await self.context.connectToPeripheralExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
331 | peripheral.identifier, result: .failure(BluetoothError.errorConnectingToPeripheral(error: error))
332 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:348: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
346 | let peripheral = Peripheral(cbPeripheral)
347 |
348 | 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
349 | await peripheral.cancelAllOperations()
350 |
351 | do {
352 | let result = CallbackUtils.result(for: (), error: error)
353 | try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
354 | peripheral.identifier, result: result
355 | )
/Users/admin/builder/spi-builder-workspace/Sources/CentralManager/CentralManager.swift:372: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
370 | error: Error?
371 | ) {
372 | 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
373 | do {
374 | let result = CallbackUtils.result(for: (), error: error)
375 | try await self.context.cancelPeripheralConnectionExecutor.setWorkCompletedForKey(
| `- note: closure captures 'self' which is accessible to code in the current task
376 | peripheral.identifier, result: result
377 | )
[10/32] Compiling AsyncBluetooth CallbackUtils.swift
[11/32] Compiling AsyncBluetooth CentralManagerUtils.swift
[12/32] Compiling AsyncBluetooth AsyncExecutor+Flushable.swift
[13/32] Compiling AsyncBluetooth CBUUID+Sendable.swift
[14/32] Compiling AsyncBluetooth FlushableExecutor.swift
[15/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
[16/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
[17/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
[18/32] Compiling AsyncBluetooth Descriptor.swift
[19/32] Compiling AsyncBluetooth Characteristic+DataConversion.swift
[20/32] Compiling AsyncBluetooth CharacteristicValueUpdateData+DataConversion.swift
[21/32] Compiling AsyncBluetooth AsyncExecutorMap.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:33:35: warning: non-sendable result type 'Value' cannot be sent from actor-isolated context in call to instance method 'enqueue'; this is an error in the Swift 6 language mode
9 | /// After work for a given key has started, this class will await until the client completes it before taking
10 | /// on the next work for that key.
11 | actor AsyncExecutorMap<Key, Value> where Key: Hashable {
| `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
12 |
13 | enum AsyncExecutorMapError: Error {
:
31 | }()
32 |
33 | return try await executor.enqueue(block)
| `- warning: non-sendable result type 'Value' cannot be sent from actor-isolated context in call to instance method 'enqueue'; this is an error in the Swift 6 language mode
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:29:28: warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
27 | let executor = self.executors[key] ?? {
28 | let executor = AsyncSerialExecutor<Value>()
29 | 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
30 | return executor
31 | }()
32 |
33 | return try await executor.enqueue(block)
| `- note: access can happen concurrently
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:33:35: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
31 | }()
32 |
33 | 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
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:42:28: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
40 | }
41 |
42 | 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
43 |
44 | guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:55:24: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
53 | }
54 |
55 | 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
56 |
57 | 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: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 |
[22/32] Compiling AsyncBluetooth AsyncSerialExecutor.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:33:35: warning: non-sendable result type 'Value' cannot be sent from actor-isolated context in call to instance method 'enqueue'; this is an error in the Swift 6 language mode
9 | /// After work for a given key has started, this class will await until the client completes it before taking
10 | /// on the next work for that key.
11 | actor AsyncExecutorMap<Key, Value> where Key: Hashable {
| `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
12 |
13 | enum AsyncExecutorMapError: Error {
:
31 | }()
32 |
33 | return try await executor.enqueue(block)
| `- warning: non-sendable result type 'Value' cannot be sent from actor-isolated context in call to instance method 'enqueue'; this is an error in the Swift 6 language mode
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:29:28: warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
27 | let executor = self.executors[key] ?? {
28 | let executor = AsyncSerialExecutor<Value>()
29 | 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
30 | return executor
31 | }()
32 |
33 | return try await executor.enqueue(block)
| `- note: access can happen concurrently
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:33:35: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
31 | }()
32 |
33 | 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
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:42:28: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
40 | }
41 |
42 | 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
43 |
44 | guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:55:24: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
53 | }
54 |
55 | 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
56 |
57 | 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: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 AsyncSerialExecutorConstants.swift
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:33:35: warning: non-sendable result type 'Value' cannot be sent from actor-isolated context in call to instance method 'enqueue'; this is an error in the Swift 6 language mode
9 | /// After work for a given key has started, this class will await until the client completes it before taking
10 | /// on the next work for that key.
11 | actor AsyncExecutorMap<Key, Value> where Key: Hashable {
| `- note: consider making generic parameter 'Value' conform to the 'Sendable' protocol
12 |
13 | enum AsyncExecutorMapError: Error {
:
31 | }()
32 |
33 | return try await executor.enqueue(block)
| `- warning: non-sendable result type 'Value' cannot be sent from actor-isolated context in call to instance method 'enqueue'; this is an error in the Swift 6 language mode
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:29:28: warning: sending 'key' risks causing data races; this is an error in the Swift 6 language mode
27 | let executor = self.executors[key] ?? {
28 | let executor = AsyncSerialExecutor<Value>()
29 | 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
30 | return executor
31 | }()
32 |
33 | return try await executor.enqueue(block)
| `- note: access can happen concurrently
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:33:35: warning: sending 'block' risks causing data races; this is an error in the Swift 6 language mode
31 | }()
32 |
33 | 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
34 | }
35 |
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:42:28: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
40 | }
41 |
42 | 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
43 |
44 | guard await !executor.hasWork else { return }
/Users/admin/builder/spi-builder-workspace/Sources/Utils/AsyncExecutorMap.swift:55:24: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
53 | }
54 |
55 | 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
56 |
57 | 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: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 CentralManagerEvent.swift
[25/32] Compiling AsyncBluetooth ScanData.swift
[26/32] Compiling AsyncBluetooth PeripheralDataConvertible.swift
[27/32] Compiling AsyncBluetooth PeripheralDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:69:25: warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
67 |
68 | if characteristic.isNotifying {
69 | self.context.characteristicValueUpdatedSubject.send(eventData)
| `- warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
70 | }
71 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:170:22: warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
168 |
169 | func peripheral(_ peripheral: CBPeripheral, didModifyServices invalidatedServices: [CBService]) {
170 | self.context.invalidatedServicesSubject.send(invalidatedServices.map { Service($0) })
| `- warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
171 | }
172 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/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: add '@MainActor' to make static property 'isEnabled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
9 |
10 | private static let disabledLogger = Logger(OSLog.disabled)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:40: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
38 |
39 | func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverIncludedServicesFor service: CBService, error: Error?) {
40 | 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
41 | do {
42 | let result = CallbackUtils.result(for: (), error: error)
43 | try await self.context.discoverIncludedServicesExecutor.setWorkCompletedForKey(
44 | service.uuid, result: result
| `- note: closure captures 'service' which is accessible to code in the current task
45 | )
46 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:53: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
51 |
52 | func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
53 | 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
54 | do {
55 | let result = CallbackUtils.result(for: (), error: error)
56 | try await self.context.discoverCharacteristicsExecutor.setWorkCompletedForKey(
57 | service.uuid, result: result
| `- note: closure captures 'service' which is accessible to code in the current task
58 | )
59 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:72: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
70 | }
71 |
72 | 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
73 | do {
74 | let result = CallbackUtils.result(for: (), error: error)
75 | try await self.context.readCharacteristicValueExecutor.setWorkCompletedForKey(
76 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
77 | )
78 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:86: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
84 |
85 | func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) {
86 | 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
87 | do {
88 | let result = CallbackUtils.result(for: (), error: error)
89 | try await self.context.writeCharacteristicValueExecutor.setWorkCompletedForKey(
90 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
91 | )
92 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:103: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
101 | error: Error?
102 | ) {
103 | 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
104 | do {
105 | let result = CallbackUtils.result(for: (), error: error)
106 | try await self.context.setNotifyValueExecutor.setWorkCompletedForKey(
107 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
108 | )
109 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:120: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
118 | error: Error?
119 | ) {
120 | 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
121 | do {
122 | let result = CallbackUtils.result(for: (), error: error)
123 | try await self.context.discoverDescriptorsExecutor.setWorkCompletedForKey(
124 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
125 | )
126 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:133: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
131 |
132 | func peripheral(_ cbPeripheral: CBPeripheral, didUpdateValueFor descriptor: CBDescriptor, error: Error?) {
133 | 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
134 | do {
135 | let result = CallbackUtils.result(for: (), error: error)
136 | try await self.context.readDescriptorValueExecutor.setWorkCompletedForKey(
137 | descriptor.uuid, result: result
| `- note: closure captures 'descriptor' which is accessible to code in the current task
138 | )
139 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:146: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
144 |
145 | func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor descriptor: CBDescriptor, error: Error?) {
146 | 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
147 | do {
148 | let result = CallbackUtils.result(for: (), error: error)
149 | try await self.context.writeDescriptorValueExecutor.setWorkCompletedForKey(
150 | descriptor.uuid, result: result
| `- note: closure captures 'descriptor' which is accessible to code in the current task
151 | )
152 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:159: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
157 |
158 | func peripheral(_ cbPeripheral: CBPeripheral, didOpen channel: CBL2CAPChannel?, error: Error?) {
159 | 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
160 | do {
161 | let result = CallbackUtils.result(for: channel, error: error)
| `- note: closure captures 'channel' which is accessible to code in the current task
162 | try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
163 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:162:65: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
160 | do {
161 | let result = CallbackUtils.result(for: channel, error: error)
162 | 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
163 | } catch {
164 | Self.logger.warning("Received OpenChannel result without a continuation")
[28/32] Compiling AsyncBluetooth Service.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:69:25: warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
67 |
68 | if characteristic.isNotifying {
69 | self.context.characteristicValueUpdatedSubject.send(eventData)
| `- warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
70 | }
71 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:170:22: warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
168 |
169 | func peripheral(_ peripheral: CBPeripheral, didModifyServices invalidatedServices: [CBService]) {
170 | self.context.invalidatedServicesSubject.send(invalidatedServices.map { Service($0) })
| `- warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
171 | }
172 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/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: add '@MainActor' to make static property 'isEnabled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
9 |
10 | private static let disabledLogger = Logger(OSLog.disabled)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:40: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
38 |
39 | func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverIncludedServicesFor service: CBService, error: Error?) {
40 | 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
41 | do {
42 | let result = CallbackUtils.result(for: (), error: error)
43 | try await self.context.discoverIncludedServicesExecutor.setWorkCompletedForKey(
44 | service.uuid, result: result
| `- note: closure captures 'service' which is accessible to code in the current task
45 | )
46 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:53: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
51 |
52 | func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
53 | 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
54 | do {
55 | let result = CallbackUtils.result(for: (), error: error)
56 | try await self.context.discoverCharacteristicsExecutor.setWorkCompletedForKey(
57 | service.uuid, result: result
| `- note: closure captures 'service' which is accessible to code in the current task
58 | )
59 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:72: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
70 | }
71 |
72 | 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
73 | do {
74 | let result = CallbackUtils.result(for: (), error: error)
75 | try await self.context.readCharacteristicValueExecutor.setWorkCompletedForKey(
76 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
77 | )
78 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:86: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
84 |
85 | func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) {
86 | 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
87 | do {
88 | let result = CallbackUtils.result(for: (), error: error)
89 | try await self.context.writeCharacteristicValueExecutor.setWorkCompletedForKey(
90 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
91 | )
92 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:103: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
101 | error: Error?
102 | ) {
103 | 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
104 | do {
105 | let result = CallbackUtils.result(for: (), error: error)
106 | try await self.context.setNotifyValueExecutor.setWorkCompletedForKey(
107 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
108 | )
109 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:120: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
118 | error: Error?
119 | ) {
120 | 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
121 | do {
122 | let result = CallbackUtils.result(for: (), error: error)
123 | try await self.context.discoverDescriptorsExecutor.setWorkCompletedForKey(
124 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
125 | )
126 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:133: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
131 |
132 | func peripheral(_ cbPeripheral: CBPeripheral, didUpdateValueFor descriptor: CBDescriptor, error: Error?) {
133 | 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
134 | do {
135 | let result = CallbackUtils.result(for: (), error: error)
136 | try await self.context.readDescriptorValueExecutor.setWorkCompletedForKey(
137 | descriptor.uuid, result: result
| `- note: closure captures 'descriptor' which is accessible to code in the current task
138 | )
139 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:146: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
144 |
145 | func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor descriptor: CBDescriptor, error: Error?) {
146 | 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
147 | do {
148 | let result = CallbackUtils.result(for: (), error: error)
149 | try await self.context.writeDescriptorValueExecutor.setWorkCompletedForKey(
150 | descriptor.uuid, result: result
| `- note: closure captures 'descriptor' which is accessible to code in the current task
151 | )
152 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:159: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
157 |
158 | func peripheral(_ cbPeripheral: CBPeripheral, didOpen channel: CBL2CAPChannel?, error: Error?) {
159 | 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
160 | do {
161 | let result = CallbackUtils.result(for: channel, error: error)
| `- note: closure captures 'channel' which is accessible to code in the current task
162 | try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
163 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:162:65: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
160 | do {
161 | let result = CallbackUtils.result(for: channel, error: error)
162 | 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
163 | } catch {
164 | Self.logger.warning("Received OpenChannel result without a continuation")
[29/32] Compiling AsyncBluetooth AsyncBluetoothLogging.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:69:25: warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
67 |
68 | if characteristic.isNotifying {
69 | self.context.characteristicValueUpdatedSubject.send(eventData)
| `- warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
70 | }
71 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:170:22: warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
168 |
169 | func peripheral(_ peripheral: CBPeripheral, didModifyServices invalidatedServices: [CBService]) {
170 | self.context.invalidatedServicesSubject.send(invalidatedServices.map { Service($0) })
| `- warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
171 | }
172 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/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: add '@MainActor' to make static property 'isEnabled' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
9 |
10 | private static let disabledLogger = Logger(OSLog.disabled)
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:40: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
38 |
39 | func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverIncludedServicesFor service: CBService, error: Error?) {
40 | 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
41 | do {
42 | let result = CallbackUtils.result(for: (), error: error)
43 | try await self.context.discoverIncludedServicesExecutor.setWorkCompletedForKey(
44 | service.uuid, result: result
| `- note: closure captures 'service' which is accessible to code in the current task
45 | )
46 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:53: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
51 |
52 | func peripheral(_ cbPeripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
53 | 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
54 | do {
55 | let result = CallbackUtils.result(for: (), error: error)
56 | try await self.context.discoverCharacteristicsExecutor.setWorkCompletedForKey(
57 | service.uuid, result: result
| `- note: closure captures 'service' which is accessible to code in the current task
58 | )
59 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:72: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
70 | }
71 |
72 | 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
73 | do {
74 | let result = CallbackUtils.result(for: (), error: error)
75 | try await self.context.readCharacteristicValueExecutor.setWorkCompletedForKey(
76 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
77 | )
78 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:86: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
84 |
85 | func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) {
86 | 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
87 | do {
88 | let result = CallbackUtils.result(for: (), error: error)
89 | try await self.context.writeCharacteristicValueExecutor.setWorkCompletedForKey(
90 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
91 | )
92 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:103: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
101 | error: Error?
102 | ) {
103 | 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
104 | do {
105 | let result = CallbackUtils.result(for: (), error: error)
106 | try await self.context.setNotifyValueExecutor.setWorkCompletedForKey(
107 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
108 | )
109 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:120: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
118 | error: Error?
119 | ) {
120 | 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
121 | do {
122 | let result = CallbackUtils.result(for: (), error: error)
123 | try await self.context.discoverDescriptorsExecutor.setWorkCompletedForKey(
124 | characteristic.uuid, result: result
| `- note: closure captures 'characteristic' which is accessible to code in the current task
125 | )
126 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:133: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
131 |
132 | func peripheral(_ cbPeripheral: CBPeripheral, didUpdateValueFor descriptor: CBDescriptor, error: Error?) {
133 | 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
134 | do {
135 | let result = CallbackUtils.result(for: (), error: error)
136 | try await self.context.readDescriptorValueExecutor.setWorkCompletedForKey(
137 | descriptor.uuid, result: result
| `- note: closure captures 'descriptor' which is accessible to code in the current task
138 | )
139 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:146: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
144 |
145 | func peripheral(_ cbPeripheral: CBPeripheral, didWriteValueFor descriptor: CBDescriptor, error: Error?) {
146 | 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
147 | do {
148 | let result = CallbackUtils.result(for: (), error: error)
149 | try await self.context.writeDescriptorValueExecutor.setWorkCompletedForKey(
150 | descriptor.uuid, result: result
| `- note: closure captures 'descriptor' which is accessible to code in the current task
151 | )
152 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:159: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
157 |
158 | func peripheral(_ cbPeripheral: CBPeripheral, didOpen channel: CBL2CAPChannel?, error: Error?) {
159 | 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
160 | do {
161 | let result = CallbackUtils.result(for: channel, error: error)
| `- note: closure captures 'channel' which is accessible to code in the current task
162 | try await self.context.openL2CAPChannelExecutor.setWorkCompletedWithResult(result)
163 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralDelegate.swift:162:65: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
160 | do {
161 | let result = CallbackUtils.result(for: channel, error: error)
162 | 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
163 | } catch {
164 | Self.logger.warning("Received OpenChannel result without a continuation")
[30/32] Compiling AsyncBluetooth Peripheral+ReadWrite.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:17:26: warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
15 | public var characteristicValueUpdatedPublisher: AnyPublisher<CharacteristicValueUpdateEventData, Never> {
16 | get {
17 | self.context.characteristicValueUpdatedSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
18 | }
19 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | @preconcurrency import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 | import os.log
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:24:26: warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
22 | public var invalidatedServices: AnyPublisher<[Service], Never> {
23 | get {
24 | self.context.invalidatedServicesSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
25 | }
26 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:9:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>'; this is an error in the Swift 6 language mode
7 | /// Contains the objects necessary to track a Peripheral's commands.
8 | actor PeripheralContext {
9 | nonisolated let characteristicValueUpdatedSubject = PassthroughSubject<CharacteristicValueUpdateEventData, Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>'; this is an error in the Swift 6 language mode
10 | nonisolated let invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
11 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 |
7 | /// Contains the objects necessary to track a Peripheral's commands.
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:10:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<[Service], Never>'; this is an error in the Swift 6 language mode
8 | actor PeripheralContext {
9 | nonisolated let characteristicValueUpdatedSubject = PassthroughSubject<CharacteristicValueUpdateEventData, Never>()
10 | nonisolated let invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<[Service], Never>'; this is an error in the Swift 6 language mode
11 |
12 | private(set) lazy var readRSSIExecutor = {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/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)
[31/32] Compiling AsyncBluetooth Peripheral.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:17:26: warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
15 | public var characteristicValueUpdatedPublisher: AnyPublisher<CharacteristicValueUpdateEventData, Never> {
16 | get {
17 | self.context.characteristicValueUpdatedSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
18 | }
19 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | @preconcurrency import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 | import os.log
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:24:26: warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
22 | public var invalidatedServices: AnyPublisher<[Service], Never> {
23 | get {
24 | self.context.invalidatedServicesSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
25 | }
26 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:9:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>'; this is an error in the Swift 6 language mode
7 | /// Contains the objects necessary to track a Peripheral's commands.
8 | actor PeripheralContext {
9 | nonisolated let characteristicValueUpdatedSubject = PassthroughSubject<CharacteristicValueUpdateEventData, Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>'; this is an error in the Swift 6 language mode
10 | nonisolated let invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
11 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 |
7 | /// Contains the objects necessary to track a Peripheral's commands.
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:10:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<[Service], Never>'; this is an error in the Swift 6 language mode
8 | actor PeripheralContext {
9 | nonisolated let characteristicValueUpdatedSubject = PassthroughSubject<CharacteristicValueUpdateEventData, Never>()
10 | nonisolated let invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<[Service], Never>'; this is an error in the Swift 6 language mode
11 |
12 | private(set) lazy var readRSSIExecutor = {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/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)
[32/32] Compiling AsyncBluetooth PeripheralContext.swift
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:17:26: warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
15 | public var characteristicValueUpdatedPublisher: AnyPublisher<CharacteristicValueUpdateEventData, Never> {
16 | get {
17 | self.context.characteristicValueUpdatedSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>' of property 'characteristicValueUpdatedSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
18 | }
19 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | @preconcurrency import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 | import os.log
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/Peripheral.swift:24:26: warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
22 | public var invalidatedServices: AnyPublisher<[Service], Never> {
23 | get {
24 | self.context.invalidatedServicesSubject.eraseToAnyPublisher()
| `- warning: non-sendable type 'PassthroughSubject<[Service], Never>' of property 'invalidatedServicesSubject' cannot exit nonisolated context; this is an error in the Swift 6 language mode
25 | }
26 | }
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:9:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>'; this is an error in the Swift 6 language mode
7 | /// Contains the objects necessary to track a Peripheral's commands.
8 | actor PeripheralContext {
9 | nonisolated let characteristicValueUpdatedSubject = PassthroughSubject<CharacteristicValueUpdateEventData, Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<CharacteristicValueUpdateEventData, Never>'; this is an error in the Swift 6 language mode
10 | nonisolated let invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
11 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:5:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 | import Foundation
4 | import CoreBluetooth
5 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
6 |
7 | /// Contains the objects necessary to track a Peripheral's commands.
/Users/admin/builder/spi-builder-workspace/Sources/Peripheral/PeripheralContext.swift:10:5: warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<[Service], Never>'; this is an error in the Swift 6 language mode
8 | actor PeripheralContext {
9 | nonisolated let characteristicValueUpdatedSubject = PassthroughSubject<CharacteristicValueUpdateEventData, Never>()
10 | nonisolated let invalidatedServicesSubject = PassthroughSubject<[Service], Never>()
| `- warning: 'nonisolated' can not be applied to variable with non-'Sendable' type 'PassthroughSubject<[Service], Never>'; this is an error in the Swift 6 language mode
11 |
12 | private(set) lazy var readRSSIExecutor = {
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/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)
Build complete! (5.82s)
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" : "6.0"
}
Done.