Build Information
Successful build of bluetooth-law-energy-swift, reference 1.0.2 (4e3f1f
), with Swift 6.0 (beta) for macOS (SPM) on 12 Sep 2024 12:10:31 UTC.
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.53.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/igor11191708/bluetooth-law-energy-swift.git
Reference: 1.0.2
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/igor11191708/bluetooth-law-energy-swift
* tag 1.0.2 -> FETCH_HEAD
HEAD is now at 4e3f1fb added comments and documentation
Cloned https://github.com/igor11191708/bluetooth-law-energy-swift.git
Revision (git rev-parse @):
4e3f1fb2524699c4a93f96a574fa1581c3e38409
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/igor11191708/bluetooth-law-energy-swift.git at 1.0.2
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/igor11191708/bluetooth-law-energy-swift.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.0.0-Release.Candidate.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-117DEE11B69C53C9.txt
[4/7] Compiling retry_policy_service RetryService.swift
[5/7] Compiling retry_policy_service Strategy.swift
[6/7] Emitting module retry_policy_service
[7/7] Compiling retry_policy_service DispatchTimeInterval.swift
[8/24] Compiling bluetooth_law_energy_swift CBPeripheral+.swift
[9/24] Compiling bluetooth_law_energy_swift Task+.swift
[10/25] Compiling bluetooth_law_energy_swift StreamFactory.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamFactory.swift:47:36: warning: non-sendable type 'AnyPublisher<Int, Never>' in implicitly asynchronous access to actor-isolated property 'subscriberCountPublisher' cannot cross actor boundary; this is an error in the Swift 6 language mode
45 | service = StreamRegistration(logger: logger)
46 | Task {
47 | await self.service.subscriberCountPublisher
| `- warning: non-sendable type 'AnyPublisher<Int, Never>' in implicitly asynchronous access to actor-isolated property 'subscriberCountPublisher' cannot cross actor boundary; this is an error in the Swift 6 language mode
48 | .sink { [weak self] count in
49 | guard let self = self else { return }
Combine.AnyPublisher:2:23: note: generic struct 'AnyPublisher' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | @frozen public struct AnyPublisher<Output, Failure> : CustomStringConvertible, CustomPlaygroundDisplayConvertible where Failure : Error {
| `- note: generic struct 'AnyPublisher' does not conform to the 'Sendable' protocol
3 | public var description: String { get }
4 | public var playgroundDescription: Any { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamFactory.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
7 | //
8 |
9 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
10 | import CoreBluetooth
11 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamFactory.swift:67:27: warning: non-sendable type 'AsyncStream<[CBPeripheral]>' in implicitly asynchronous access to actor-isolated property 'stream' cannot cross actor boundary; this is an error in the Swift 6 language mode
65 | /// - Returns: An `AsyncStream` emitting arrays of `CBPeripheral` objects.
66 | public func peripheralsStream() async -> AsyncStream<[CBPeripheral]> {
67 | await service.stream
| `- warning: non-sendable type 'AsyncStream<[CBPeripheral]>' in implicitly asynchronous access to actor-isolated property 'stream' cannot cross actor boundary; this is an error in the Swift 6 language mode
68 | }
69 |
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamFactory.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
8 |
9 | import Combine
10 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
11 |
12 | extension BluetoothLEManager {
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamFactory.swift:45:23: warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
43 | init(logger: ILogger) {
44 | self.logger = logger
45 | service = StreamRegistration(logger: logger)
| |- warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'logger' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
46 | Task {
47 | await self.service.subscriberCountPublisher
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamFactory.swift:46:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
44 | self.logger = logger
45 | service = StreamRegistration(logger: logger)
46 | Task {
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
47 | await self.service.subscriberCountPublisher
48 | .sink { [weak self] count in
[11/25] Compiling bluetooth_law_energy_swift CacheServices.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/CacheServices.swift:21:18: warning: cannot access property 'data' with a non-sendable type '[UUID : [CBService]]' from nonisolated deinit; this is an error in the Swift 6 language mode
19 |
20 | deinit{
21 | data = [:]
| `- warning: cannot access property 'data' with a non-sendable type '[UUID : [CBService]]' from nonisolated deinit; this is an error in the Swift 6 language mode
22 | }
23 |
CoreBluetooth.CBService:2:12: note: class 'CBService' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBService : CBAttribute {
| `- note: class 'CBService' does not conform to the 'Sendable' protocol
3 | weak open var peripheral: CBPeripheral? { get }
4 | open var isPrimary: Bool { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/CacheServices.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
6 | //
7 |
8 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
9 |
10 | extension BluetoothLEManager {
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/ServiceRegistration.swift:73:30: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
71 | switch result {
72 | case .success(let value):
73 | continuation.resume(returning: value)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self'-isolated 'value' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
74 | case .failure(let error):
75 | continuation.resume(throwing: error)
[12/25] Compiling bluetooth_law_energy_swift ServiceRegistration.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/CacheServices.swift:21:18: warning: cannot access property 'data' with a non-sendable type '[UUID : [CBService]]' from nonisolated deinit; this is an error in the Swift 6 language mode
19 |
20 | deinit{
21 | data = [:]
| `- warning: cannot access property 'data' with a non-sendable type '[UUID : [CBService]]' from nonisolated deinit; this is an error in the Swift 6 language mode
22 | }
23 |
CoreBluetooth.CBService:2:12: note: class 'CBService' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBService : CBAttribute {
| `- note: class 'CBService' does not conform to the 'Sendable' protocol
3 | weak open var peripheral: CBPeripheral? { get }
4 | open var isPrimary: Bool { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/CacheServices.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
6 | //
7 |
8 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
9 |
10 | extension BluetoothLEManager {
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/ServiceRegistration.swift:73:30: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
71 | switch result {
72 | case .success(let value):
73 | continuation.resume(returning: value)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self'-isolated 'value' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
74 | case .failure(let error):
75 | continuation.resume(throwing: error)
[13/25] Compiling bluetooth_law_energy_swift BluetoothDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:36:27: warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
34 | public init(logger: ILogger) {
35 | self.logger = logger
36 | connection = .init(type: .connection, logger: logger)
| |- warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'logger' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
37 | disconnection = .init(type: .disconnection, logger: logger)
38 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:37:30: warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
35 | self.logger = logger
36 | connection = .init(type: .connection, logger: logger)
37 | disconnection = .init(type: .disconnection, logger: logger)
| |- warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'logger' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
38 | }
39 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:114:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
112 | /// - peripheral: The peripheral that has successfully connected.
113 | public func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {
114 | Task{
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
115 | await connection.handleResult(
116 | for: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:115:34: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
113 | public func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {
114 | Task{
115 | await connection.handleResult(
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
116 | for: peripheral,
117 | result: .success(Void())
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:129:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
127 | /// - error: The error that occurred during the connection attempt.
128 | public func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) {
129 | Task{
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
130 | let e = Errors.connection(peripheral, error)
131 | await connection.handleResult(
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:131:34: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
129 | Task{
130 | let e = Errors.connection(peripheral, error)
131 | await connection.handleResult(
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
132 | for: peripheral,
133 | result: .failure(e)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:145:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
143 | /// - error: The error that occurred during the disconnection, if any.
144 | public func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) {
145 | Task{
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
146 | guard let error else{
147 | await disconnection.handleResult(
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:155:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
153 |
154 | let e = Errors.disconnection(peripheral, error)
155 | await disconnection.handleResult(
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
156 | for: peripheral,
157 | result: .failure(e)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:147:41: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
145 | Task{
146 | guard let error else{
147 | await disconnection.handleResult(
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
148 | for: peripheral,
149 | result: .success(Void())
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/PeripheralDelegate.swift:23:24: warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
21 | /// - Parameter logger: The logger instance to be used for logging.
22 | init(logger: ILogger) {
23 | service = .init(type: .discovering, logger: logger)
| |- warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'logger' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
24 | }
25 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/PeripheralDelegate.swift:32:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
30 | /// - error: An optional error if the discovery failed
31 | public func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) {
32 | Task{
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
33 | if let error = error {
34 | await service.handleResult(for: peripheral, result: .failure(BluetoothLEManager.Errors.discoveringServices(peripheral.getName, error)))
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/PeripheralDelegate.swift:34:35: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
32 | Task{
33 | if let error = error {
34 | await service.handleResult(for: peripheral, result: .failure(BluetoothLEManager.Errors.discoveringServices(peripheral.getName, error)))
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
35 |
36 | } else{
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/PeripheralDelegate.swift:37:39: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
35 |
36 | } else{
37 | await service.handleResult(for: peripheral, result: .success(Void()))
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
38 | }
39 | }
[14/25] Compiling bluetooth_law_energy_swift PeripheralDelegate.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:36:27: warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
34 | public init(logger: ILogger) {
35 | self.logger = logger
36 | connection = .init(type: .connection, logger: logger)
| |- warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'logger' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
37 | disconnection = .init(type: .disconnection, logger: logger)
38 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:37:30: warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
35 | self.logger = logger
36 | connection = .init(type: .connection, logger: logger)
37 | disconnection = .init(type: .disconnection, logger: logger)
| |- warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'logger' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
38 | }
39 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:114:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
112 | /// - peripheral: The peripheral that has successfully connected.
113 | public func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {
114 | Task{
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
115 | await connection.handleResult(
116 | for: peripheral,
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:115:34: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
113 | public func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) {
114 | Task{
115 | await connection.handleResult(
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
116 | for: peripheral,
117 | result: .success(Void())
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:129:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
127 | /// - error: The error that occurred during the connection attempt.
128 | public func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) {
129 | Task{
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
130 | let e = Errors.connection(peripheral, error)
131 | await connection.handleResult(
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:131:34: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
129 | Task{
130 | let e = Errors.connection(peripheral, error)
131 | await connection.handleResult(
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
132 | for: peripheral,
133 | result: .failure(e)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:145:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
143 | /// - error: The error that occurred during the disconnection, if any.
144 | public func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) {
145 | Task{
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
146 | guard let error else{
147 | await disconnection.handleResult(
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:155:37: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
153 |
154 | let e = Errors.disconnection(peripheral, error)
155 | await disconnection.handleResult(
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
156 | for: peripheral,
157 | result: .failure(e)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:147:41: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
145 | Task{
146 | guard let error else{
147 | await disconnection.handleResult(
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
148 | for: peripheral,
149 | result: .success(Void())
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/PeripheralDelegate.swift:23:24: warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
21 | /// - Parameter logger: The logger instance to be used for logging.
22 | init(logger: ILogger) {
23 | service = .init(type: .discovering, logger: logger)
| |- warning: sending 'logger' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'logger' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
24 | }
25 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/PeripheralDelegate.swift:32:13: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
30 | /// - error: An optional error if the discovery failed
31 | public func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) {
32 | Task{
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
33 | if let error = error {
34 | await service.handleResult(for: peripheral, result: .failure(BluetoothLEManager.Errors.discoveringServices(peripheral.getName, error)))
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/PeripheralDelegate.swift:34:35: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
32 | Task{
33 | if let error = error {
34 | await service.handleResult(for: peripheral, result: .failure(BluetoothLEManager.Errors.discoveringServices(peripheral.getName, error)))
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
35 |
36 | } else{
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/PeripheralDelegate.swift:37:39: warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
35 |
36 | } else{
37 | await service.handleResult(for: peripheral, result: .success(Void()))
| |- warning: sending 'peripheral' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripheral' to actor-isolated instance method 'handleResult(for:result:)' risks causing data races between actor-isolated and task-isolated uses
38 | }
39 | }
[15/25] Compiling bluetooth_law_energy_swift BluetoothLEManager.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:18:16: warning: main actor-isolated property 'bleState' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
12 | /// Manages Bluetooth Low Energy (BLE) interactions using Combine and CoreBluetooth.
13 | @available(macOS 12, iOS 15, tvOS 15.0, watchOS 8.0, *)
14 | public actor BluetoothLEManager: NSObject, ObservableObject, IBluetoothLEManager {
| `- note: add '@preconcurrency' to the 'IBluetoothLEManager' conformance to defer isolation checking to run time
15 |
16 | /// A subject that publishes the BLE state changes to the main actor.
17 | @MainActor
18 | public let bleState: CurrentValueSubject<BLEState, Never> = .init(.init())
| `- warning: main actor-isolated property 'bleState' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
19 |
20 | /// Internal state variables
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/IBluetoothLEManager.swift:18:9: note: 'bleState' declared here
16 | /// A subject that publishes the BLE state changes.
17 |
18 | var bleState: CurrentValueSubject<BLEState, Never> { get }
| `- note: 'bleState' declared here
19 |
20 | /// Provides an asynchronous stream of discovered Bluetooth peripherals.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:72:16: warning: non-sendable type 'AsyncStream<[CBPeripheral]>' in conformance of actor-isolated property 'peripheralsStream' to protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
70 |
71 | /// Provides a stream of discovered peripherals.
72 | public var peripheralsStream: AsyncStream<[CBPeripheral]> {
| `- warning: non-sendable type 'AsyncStream<[CBPeripheral]>' in conformance of actor-isolated property 'peripheralsStream' to protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
73 | get async{
74 | await stream.peripheralsStream()
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
7 |
8 | import Combine
9 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
10 | import retry_policy_service
11 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:89:17: warning: non-sendable type '[CBService]' returned by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
87 | /// - Throws: An error if the services could not be fetched.
88 | @MainActor
89 | public func discoverServices(for peripheral: CBPeripheral, from cache: Bool = true, disconnect: Bool = true) async throws -> [CBService] {
| `- warning: non-sendable type '[CBService]' returned by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
90 | defer {
91 | if disconnect {
CoreBluetooth.CBService:2:12: note: class 'CBService' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBService : CBAttribute {
| `- note: class 'CBService' does not conform to the 'Sendable' protocol
3 | weak open var peripheral: CBPeripheral? { get }
4 | open var isPrimary: Bool { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:89:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
87 | /// - Throws: An error if the services could not be fetched.
88 | @MainActor
89 | public func discoverServices(for peripheral: CBPeripheral, from cache: Bool = true, disconnect: Bool = true) async throws -> [CBService] {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
90 | defer {
91 | if disconnect {
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/IBluetoothLEManager.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
8 | import Foundation
9 | import Combine
10 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
11 |
12 | /// A protocol defining the Bluetooth LE manager functionality.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:122:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'connect(to:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
120 | /// - Throws: `BluetoothLEManager.Errors` if the connection fails.
121 | @MainActor
122 | public func connect(to peripheral: CBPeripheral) async throws {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'connect(to:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
123 | guard peripheral.isNotConnected else {
124 | throw Errors.connected(peripheral)
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:144:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'disconnect(from:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
142 | /// - Throws: `BluetoothLEManager.Errors` if the connection fails.
143 | @MainActor
144 | public func disconnect(from peripheral: CBPeripheral) async throws {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'disconnect(from:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
145 | guard peripheral.isConnected else {
146 | throw Errors.notConnected(peripheral.getName)
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:74:26: warning: non-sendable type 'AsyncStream<[CBPeripheral]>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
72 | public var peripheralsStream: AsyncStream<[CBPeripheral]> {
73 | get async{
74 | await stream.peripheralsStream()
| `- warning: non-sendable type 'AsyncStream<[CBPeripheral]>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
75 | }
76 | }
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:92:17: warning: actor-isolated property 'centralManager' can not be referenced from the main actor; this is an error in the Swift 6 language mode
32 |
33 | /// Internal types and instances
34 | private let centralManager: CBCentralManager
| `- note: property declared here
35 | private let cachedServices = CacheServices()
36 |
:
90 | defer {
91 | if disconnect {
92 | centralManager.cancelPeripheralConnection(peripheral)
| `- warning: actor-isolated property 'centralManager' can not be referenced from the main actor; this is an error in the Swift 6 language mode
93 | }
94 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:101:22: warning: non-sendable type 'RetryService' in implicitly asynchronous access to actor-isolated property 'retry' cannot cross actor boundary; this is an error in the Swift 6 language mode
99 | }
100 |
101 | for delay in retry {
| `- warning: non-sendable type 'RetryService' in implicitly asynchronous access to actor-isolated property 'retry' cannot cross actor boundary; this is an error in the Swift 6 language mode
102 | do {
103 | return try await attemptFetchServices(for: peripheral, cache: cache)
/Users/admin/builder/spi-builder-workspace/.build/checkouts/retry-policy-service/Sources/retry-policy-service/RetryService.swift:13:15: note: struct 'RetryService' does not conform to the 'Sendable' protocol
11 | // RetryService Definition and Implementation
12 | @available(iOS 14.0, macOS 11.0, tvOS 15.0, watchOS 8.0, *)
13 | public struct RetryService: Sequence {
| `- note: struct 'RetryService' does not conform to the 'Sendable' protocol
14 |
15 | /// Default service
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'retry_policy_service'
8 | import Combine
9 | import CoreBluetooth
10 | import retry_policy_service
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'retry_policy_service'
11 |
12 | /// Manages Bluetooth Low Energy (BLE) interactions using Combine and CoreBluetooth.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:101:22: warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
99 | }
100 |
101 | for delay in retry {
| |- warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
| `- note: property access is 'async'
102 | do {
103 | return try await attemptFetchServices(for: peripheral, cache: cache)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:133:27: warning: non-sendable type 'BluetoothLEManager.Delegate' (aka 'BluetoothLEManager.BluetoothDelegate') in implicitly asynchronous access to actor-isolated property 'delegateHandler' cannot cross actor boundary; this is an error in the Swift 6 language mode
131 | let id = peripheral.getId
132 | let name = peripheral.getName
133 | try await delegateHandler.connect(to: id, name: name, with: continuation)
| `- warning: non-sendable type 'BluetoothLEManager.Delegate' (aka 'BluetoothLEManager.BluetoothDelegate') in implicitly asynchronous access to actor-isolated property 'delegateHandler' cannot cross actor boundary; this is an error in the Swift 6 language mode
134 | centralManager.connect(peripheral, options: nil)
135 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:14:17: note: class 'BluetoothDelegate' does not conform to the 'Sendable' protocol
12 |
13 | /// BluetoothDelegate is a final class that conforms to CBCentralManagerDelegate for handling Bluetooth interactions.
14 | final class BluetoothDelegate: NSObject, CBCentralManagerDelegate {
| `- note: class 'BluetoothDelegate' does not conform to the 'Sendable' protocol
15 |
16 | /// A subject to publish Bluetooth state updates.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:134:17: warning: non-sendable type 'CBCentralManager' in implicitly asynchronous access to actor-isolated property 'centralManager' cannot cross actor boundary; this is an error in the Swift 6 language mode
132 | let name = peripheral.getName
133 | try await delegateHandler.connect(to: id, name: name, with: continuation)
134 | centralManager.connect(peripheral, options: nil)
| `- warning: non-sendable type 'CBCentralManager' in implicitly asynchronous access to actor-isolated property 'centralManager' cannot cross actor boundary; this is an error in the Swift 6 language mode
135 | }
136 | }
CoreBluetooth.CBCentralManager:2:12: note: class 'CBCentralManager' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBCentralManager : CBManager {
| `- note: class 'CBCentralManager' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBCentralManagerDelegate)? { get set }
4 | @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:134:17: warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
132 | let name = peripheral.getName
133 | try await delegateHandler.connect(to: id, name: name, with: continuation)
134 | centralManager.connect(peripheral, options: nil)
| |- warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
| `- note: property access is 'async'
135 | }
136 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:153:27: warning: non-sendable type 'BluetoothLEManager.Delegate' (aka 'BluetoothLEManager.BluetoothDelegate') in implicitly asynchronous access to actor-isolated property 'delegateHandler' cannot cross actor boundary; this is an error in the Swift 6 language mode
151 | let id = peripheral.getId
152 | let name = peripheral.getName
153 | try await delegateHandler.disconnect(to: id, name: name, with: continuation)
| `- warning: non-sendable type 'BluetoothLEManager.Delegate' (aka 'BluetoothLEManager.BluetoothDelegate') in implicitly asynchronous access to actor-isolated property 'delegateHandler' cannot cross actor boundary; this is an error in the Swift 6 language mode
154 | centralManager.cancelPeripheralConnection(peripheral)
155 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:14:17: note: class 'BluetoothDelegate' does not conform to the 'Sendable' protocol
12 |
13 | /// BluetoothDelegate is a final class that conforms to CBCentralManagerDelegate for handling Bluetooth interactions.
14 | final class BluetoothDelegate: NSObject, CBCentralManagerDelegate {
| `- note: class 'BluetoothDelegate' does not conform to the 'Sendable' protocol
15 |
16 | /// A subject to publish Bluetooth state updates.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:154:17: warning: non-sendable type 'CBCentralManager' in implicitly asynchronous access to actor-isolated property 'centralManager' cannot cross actor boundary; this is an error in the Swift 6 language mode
152 | let name = peripheral.getName
153 | try await delegateHandler.disconnect(to: id, name: name, with: continuation)
154 | centralManager.cancelPeripheralConnection(peripheral)
| `- warning: non-sendable type 'CBCentralManager' in implicitly asynchronous access to actor-isolated property 'centralManager' cannot cross actor boundary; this is an error in the Swift 6 language mode
155 | }
156 | }
CoreBluetooth.CBCentralManager:2:12: note: class 'CBCentralManager' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBCentralManager : CBManager {
| `- note: class 'CBCentralManager' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBCentralManagerDelegate)? { get set }
4 | @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:154:17: warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
152 | let name = peripheral.getName
153 | try await delegateHandler.disconnect(to: id, name: name, with: continuation)
154 | centralManager.cancelPeripheralConnection(peripheral)
| |- warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
| `- note: property access is 'async'
155 | }
156 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:189:51: warning: non-sendable type 'any ILogger' in implicitly asynchronous access to actor-isolated property 'logger' cannot cross actor boundary; this is an error in the Swift 6 language mode
187 | try Task.checkCancellation()
188 |
189 | let delegate = PeripheralDelegate(logger: logger)
| `- warning: non-sendable type 'any ILogger' in implicitly asynchronous access to actor-isolated property 'logger' cannot cross actor boundary; this is an error in the Swift 6 language mode
190 | peripheral.delegate = delegate
191 | try await delegate.discoverServices(for: peripheral)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/ILogger.swift:11:17: note: protocol 'ILogger' does not conform to the 'Sendable' protocol
9 |
10 | /// Protocol defining a logger with a log method.
11 | public protocol ILogger {
| `- note: protocol 'ILogger' does not conform to the 'Sendable' protocol
12 | /// Logs a message with a specified log level.
13 | ///
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:189:24: warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
187 | try Task.checkCancellation()
188 |
189 | let delegate = PeripheralDelegate(logger: logger)
| | `- note: property access is 'async'
| `- warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
190 | peripheral.delegate = delegate
191 | try await delegate.discoverServices(for: peripheral)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:218:44: warning: non-sendable type 'BLEState' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
216 | guard let self = self else { return }
217 | Task(priority: .userInitiated) {
218 | let state = await self.checkForScan(state, subscriberCount)
| `- warning: non-sendable type 'BLEState' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
219 | await MainActor.run { self.bleState.send(state) }
220 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/model/BLEState.swift:12:15: note: consider making struct 'BLEState' conform to the 'Sendable' protocol
10 | /// Represents the state of Bluetooth connectivity and permissions.
11 | @available(macOS 12, iOS 15, tvOS 15.0, watchOS 8.0, *)
12 | public struct BLEState {
| `- note: consider making struct 'BLEState' conform to the 'Sendable' protocol
13 |
14 | /// Indicates if Bluetooth is authorized.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:219:62: warning: capture of 'state' with non-sendable type 'BLEState' in a `@Sendable` closure; this is an error in the Swift 6 language mode
217 | Task(priority: .userInitiated) {
218 | let state = await self.checkForScan(state, subscriberCount)
219 | await MainActor.run { self.bleState.send(state) }
| `- warning: capture of 'state' with non-sendable type 'BLEState' in a `@Sendable` closure; this is an error in the Swift 6 language mode
220 | }
221 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/model/BLEState.swift:12:15: note: consider making struct 'BLEState' conform to the 'Sendable' protocol
10 | /// Represents the state of Bluetooth connectivity and permissions.
11 | @available(macOS 12, iOS 15, tvOS 15.0, watchOS 8.0, *)
12 | public struct BLEState {
| `- note: consider making struct 'BLEState' conform to the 'Sendable' protocol
13 |
14 | /// Indicates if Bluetooth is authorized.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:66:9: warning: cannot access property 'logger' with a non-sendable type 'any ILogger' from nonisolated deinit; this is an error in the Swift 6 language mode
64 | /// Deinitializes the BluetoothLEManager.
65 | deinit {
66 | logger.log("BluetoothManager deinitialized", level: .debug)
| `- warning: cannot access property 'logger' with a non-sendable type 'any ILogger' from nonisolated deinit; this is an error in the Swift 6 language mode
67 | }
68 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/ILogger.swift:11:17: note: protocol 'ILogger' does not conform to the 'Sendable' protocol
9 |
10 | /// Protocol defining a logger with a log method.
11 | public protocol ILogger {
| `- note: protocol 'ILogger' does not conform to the 'Sendable' protocol
12 | /// Logs a message with a specified log level.
13 | ///
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:74:26: warning: sending 'self.stream' risks causing data races; this is an error in the Swift 6 language mode
72 | public var peripheralsStream: AsyncStream<[CBPeripheral]> {
73 | get async{
74 | await stream.peripheralsStream()
| |- warning: sending 'self.stream' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.stream' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:92:32: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
90 | defer {
91 | if disconnect {
92 | centralManager.cancelPeripheralConnection(peripheral)
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
93 | }
94 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:133:43: warning: sending 'self.delegateHandler' risks causing data races; this is an error in the Swift 6 language mode
131 | let id = peripheral.getId
132 | let name = peripheral.getName
133 | try await delegateHandler.connect(to: id, name: name, with: continuation)
| |- warning: sending 'self.delegateHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.delegateHandler' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
134 | centralManager.connect(peripheral, options: nil)
135 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:153:43: warning: sending 'self.delegateHandler' risks causing data races; this is an error in the Swift 6 language mode
151 | let id = peripheral.getId
152 | let name = peripheral.getName
153 | try await delegateHandler.disconnect(to: id, name: name, with: continuation)
| |- warning: sending 'self.delegateHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.delegateHandler' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
154 | centralManager.cancelPeripheralConnection(peripheral)
155 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:207:17: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
205 | .sink { [weak self] peripherals in
206 | guard let self = self else { return }
207 | Task {
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
208 | await self.handlePeripheralChange(peripherals)
209 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:229:21: warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
227 | /// - Parameter peripherals: An array of discovered `CBPeripheral` instances.
228 | private func handlePeripheralChange(_ peripherals: [CBPeripheral]) async {
229 | await stream.updatePeripherals(peripherals)
| |- warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'peripherals' to main actor-isolated callee risks causing data races between main actor-isolated and 'self'-isolated uses
230 | }
231 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:229:21: warning: sending 'self.stream' risks causing data races; this is an error in the Swift 6 language mode
227 | /// - Parameter peripherals: An array of discovered `CBPeripheral` instances.
228 | private func handlePeripheralChange(_ peripherals: [CBPeripheral]) async {
229 | await stream.updatePeripherals(peripherals)
| |- warning: sending 'self.stream' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.stream' to main actor-isolated callee risks causing data races between main actor-isolated and 'self'-isolated uses
230 | }
231 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:208:32: warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
206 | guard let self = self else { return }
207 | Task {
208 | await self.handlePeripheralChange(peripherals)
| |- warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripherals' to actor-isolated instance method 'handlePeripheralChange' risks causing data races between actor-isolated and task-isolated uses
209 | }
210 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:219:62: warning: sending 'state' risks causing data races; this is an error in the Swift 6 language mode
217 | Task(priority: .userInitiated) {
218 | let state = await self.checkForScan(state, subscriberCount)
219 | await MainActor.run { self.bleState.send(state) }
| |- warning: sending 'state' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self'-isolated 'state' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
220 | }
221 | }
[16/25] Compiling bluetooth_law_energy_swift Publisher+.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:18:16: warning: main actor-isolated property 'bleState' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
12 | /// Manages Bluetooth Low Energy (BLE) interactions using Combine and CoreBluetooth.
13 | @available(macOS 12, iOS 15, tvOS 15.0, watchOS 8.0, *)
14 | public actor BluetoothLEManager: NSObject, ObservableObject, IBluetoothLEManager {
| `- note: add '@preconcurrency' to the 'IBluetoothLEManager' conformance to defer isolation checking to run time
15 |
16 | /// A subject that publishes the BLE state changes to the main actor.
17 | @MainActor
18 | public let bleState: CurrentValueSubject<BLEState, Never> = .init(.init())
| `- warning: main actor-isolated property 'bleState' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
19 |
20 | /// Internal state variables
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/IBluetoothLEManager.swift:18:9: note: 'bleState' declared here
16 | /// A subject that publishes the BLE state changes.
17 |
18 | var bleState: CurrentValueSubject<BLEState, Never> { get }
| `- note: 'bleState' declared here
19 |
20 | /// Provides an asynchronous stream of discovered Bluetooth peripherals.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:72:16: warning: non-sendable type 'AsyncStream<[CBPeripheral]>' in conformance of actor-isolated property 'peripheralsStream' to protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
70 |
71 | /// Provides a stream of discovered peripherals.
72 | public var peripheralsStream: AsyncStream<[CBPeripheral]> {
| `- warning: non-sendable type 'AsyncStream<[CBPeripheral]>' in conformance of actor-isolated property 'peripheralsStream' to protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
73 | get async{
74 | await stream.peripheralsStream()
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
7 |
8 | import Combine
9 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
10 | import retry_policy_service
11 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:89:17: warning: non-sendable type '[CBService]' returned by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
87 | /// - Throws: An error if the services could not be fetched.
88 | @MainActor
89 | public func discoverServices(for peripheral: CBPeripheral, from cache: Bool = true, disconnect: Bool = true) async throws -> [CBService] {
| `- warning: non-sendable type '[CBService]' returned by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
90 | defer {
91 | if disconnect {
CoreBluetooth.CBService:2:12: note: class 'CBService' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBService : CBAttribute {
| `- note: class 'CBService' does not conform to the 'Sendable' protocol
3 | weak open var peripheral: CBPeripheral? { get }
4 | open var isPrimary: Bool { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:89:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
87 | /// - Throws: An error if the services could not be fetched.
88 | @MainActor
89 | public func discoverServices(for peripheral: CBPeripheral, from cache: Bool = true, disconnect: Bool = true) async throws -> [CBService] {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
90 | defer {
91 | if disconnect {
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/IBluetoothLEManager.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
8 | import Foundation
9 | import Combine
10 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
11 |
12 | /// A protocol defining the Bluetooth LE manager functionality.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:122:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'connect(to:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
120 | /// - Throws: `BluetoothLEManager.Errors` if the connection fails.
121 | @MainActor
122 | public func connect(to peripheral: CBPeripheral) async throws {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'connect(to:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
123 | guard peripheral.isNotConnected else {
124 | throw Errors.connected(peripheral)
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:144:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'disconnect(from:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
142 | /// - Throws: `BluetoothLEManager.Errors` if the connection fails.
143 | @MainActor
144 | public func disconnect(from peripheral: CBPeripheral) async throws {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'disconnect(from:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
145 | guard peripheral.isConnected else {
146 | throw Errors.notConnected(peripheral.getName)
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:74:26: warning: non-sendable type 'AsyncStream<[CBPeripheral]>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
72 | public var peripheralsStream: AsyncStream<[CBPeripheral]> {
73 | get async{
74 | await stream.peripheralsStream()
| `- warning: non-sendable type 'AsyncStream<[CBPeripheral]>' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
75 | }
76 | }
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:92:17: warning: actor-isolated property 'centralManager' can not be referenced from the main actor; this is an error in the Swift 6 language mode
32 |
33 | /// Internal types and instances
34 | private let centralManager: CBCentralManager
| `- note: property declared here
35 | private let cachedServices = CacheServices()
36 |
:
90 | defer {
91 | if disconnect {
92 | centralManager.cancelPeripheralConnection(peripheral)
| `- warning: actor-isolated property 'centralManager' can not be referenced from the main actor; this is an error in the Swift 6 language mode
93 | }
94 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:101:22: warning: non-sendable type 'RetryService' in implicitly asynchronous access to actor-isolated property 'retry' cannot cross actor boundary; this is an error in the Swift 6 language mode
99 | }
100 |
101 | for delay in retry {
| `- warning: non-sendable type 'RetryService' in implicitly asynchronous access to actor-isolated property 'retry' cannot cross actor boundary; this is an error in the Swift 6 language mode
102 | do {
103 | return try await attemptFetchServices(for: peripheral, cache: cache)
/Users/admin/builder/spi-builder-workspace/.build/checkouts/retry-policy-service/Sources/retry-policy-service/RetryService.swift:13:15: note: struct 'RetryService' does not conform to the 'Sendable' protocol
11 | // RetryService Definition and Implementation
12 | @available(iOS 14.0, macOS 11.0, tvOS 15.0, watchOS 8.0, *)
13 | public struct RetryService: Sequence {
| `- note: struct 'RetryService' does not conform to the 'Sendable' protocol
14 |
15 | /// Default service
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'retry_policy_service'
8 | import Combine
9 | import CoreBluetooth
10 | import retry_policy_service
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'retry_policy_service'
11 |
12 | /// Manages Bluetooth Low Energy (BLE) interactions using Combine and CoreBluetooth.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:101:22: warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
99 | }
100 |
101 | for delay in retry {
| |- warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
| `- note: property access is 'async'
102 | do {
103 | return try await attemptFetchServices(for: peripheral, cache: cache)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:133:27: warning: non-sendable type 'BluetoothLEManager.Delegate' (aka 'BluetoothLEManager.BluetoothDelegate') in implicitly asynchronous access to actor-isolated property 'delegateHandler' cannot cross actor boundary; this is an error in the Swift 6 language mode
131 | let id = peripheral.getId
132 | let name = peripheral.getName
133 | try await delegateHandler.connect(to: id, name: name, with: continuation)
| `- warning: non-sendable type 'BluetoothLEManager.Delegate' (aka 'BluetoothLEManager.BluetoothDelegate') in implicitly asynchronous access to actor-isolated property 'delegateHandler' cannot cross actor boundary; this is an error in the Swift 6 language mode
134 | centralManager.connect(peripheral, options: nil)
135 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:14:17: note: class 'BluetoothDelegate' does not conform to the 'Sendable' protocol
12 |
13 | /// BluetoothDelegate is a final class that conforms to CBCentralManagerDelegate for handling Bluetooth interactions.
14 | final class BluetoothDelegate: NSObject, CBCentralManagerDelegate {
| `- note: class 'BluetoothDelegate' does not conform to the 'Sendable' protocol
15 |
16 | /// A subject to publish Bluetooth state updates.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:134:17: warning: non-sendable type 'CBCentralManager' in implicitly asynchronous access to actor-isolated property 'centralManager' cannot cross actor boundary; this is an error in the Swift 6 language mode
132 | let name = peripheral.getName
133 | try await delegateHandler.connect(to: id, name: name, with: continuation)
134 | centralManager.connect(peripheral, options: nil)
| `- warning: non-sendable type 'CBCentralManager' in implicitly asynchronous access to actor-isolated property 'centralManager' cannot cross actor boundary; this is an error in the Swift 6 language mode
135 | }
136 | }
CoreBluetooth.CBCentralManager:2:12: note: class 'CBCentralManager' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBCentralManager : CBManager {
| `- note: class 'CBCentralManager' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBCentralManagerDelegate)? { get set }
4 | @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:134:17: warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
132 | let name = peripheral.getName
133 | try await delegateHandler.connect(to: id, name: name, with: continuation)
134 | centralManager.connect(peripheral, options: nil)
| |- warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
| `- note: property access is 'async'
135 | }
136 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:153:27: warning: non-sendable type 'BluetoothLEManager.Delegate' (aka 'BluetoothLEManager.BluetoothDelegate') in implicitly asynchronous access to actor-isolated property 'delegateHandler' cannot cross actor boundary; this is an error in the Swift 6 language mode
151 | let id = peripheral.getId
152 | let name = peripheral.getName
153 | try await delegateHandler.disconnect(to: id, name: name, with: continuation)
| `- warning: non-sendable type 'BluetoothLEManager.Delegate' (aka 'BluetoothLEManager.BluetoothDelegate') in implicitly asynchronous access to actor-isolated property 'delegateHandler' cannot cross actor boundary; this is an error in the Swift 6 language mode
154 | centralManager.cancelPeripheralConnection(peripheral)
155 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/delegate/BluetoothDelegate.swift:14:17: note: class 'BluetoothDelegate' does not conform to the 'Sendable' protocol
12 |
13 | /// BluetoothDelegate is a final class that conforms to CBCentralManagerDelegate for handling Bluetooth interactions.
14 | final class BluetoothDelegate: NSObject, CBCentralManagerDelegate {
| `- note: class 'BluetoothDelegate' does not conform to the 'Sendable' protocol
15 |
16 | /// A subject to publish Bluetooth state updates.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:154:17: warning: non-sendable type 'CBCentralManager' in implicitly asynchronous access to actor-isolated property 'centralManager' cannot cross actor boundary; this is an error in the Swift 6 language mode
152 | let name = peripheral.getName
153 | try await delegateHandler.disconnect(to: id, name: name, with: continuation)
154 | centralManager.cancelPeripheralConnection(peripheral)
| `- warning: non-sendable type 'CBCentralManager' in implicitly asynchronous access to actor-isolated property 'centralManager' cannot cross actor boundary; this is an error in the Swift 6 language mode
155 | }
156 | }
CoreBluetooth.CBCentralManager:2:12: note: class 'CBCentralManager' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBCentralManager : CBManager {
| `- note: class 'CBCentralManager' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBCentralManagerDelegate)? { get set }
4 | @available(macOS 10.13, *)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:154:17: warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
152 | let name = peripheral.getName
153 | try await delegateHandler.disconnect(to: id, name: name, with: continuation)
154 | centralManager.cancelPeripheralConnection(peripheral)
| |- warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
| `- note: property access is 'async'
155 | }
156 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:189:51: warning: non-sendable type 'any ILogger' in implicitly asynchronous access to actor-isolated property 'logger' cannot cross actor boundary; this is an error in the Swift 6 language mode
187 | try Task.checkCancellation()
188 |
189 | let delegate = PeripheralDelegate(logger: logger)
| `- warning: non-sendable type 'any ILogger' in implicitly asynchronous access to actor-isolated property 'logger' cannot cross actor boundary; this is an error in the Swift 6 language mode
190 | peripheral.delegate = delegate
191 | try await delegate.discoverServices(for: peripheral)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/ILogger.swift:11:17: note: protocol 'ILogger' does not conform to the 'Sendable' protocol
9 |
10 | /// Protocol defining a logger with a log method.
11 | public protocol ILogger {
| `- note: protocol 'ILogger' does not conform to the 'Sendable' protocol
12 | /// Logs a message with a specified log level.
13 | ///
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:189:24: warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
187 | try Task.checkCancellation()
188 |
189 | let delegate = PeripheralDelegate(logger: logger)
| | `- note: property access is 'async'
| `- warning: expression is 'async' but is not marked with 'await'; this is an error in the Swift 6 language mode
190 | peripheral.delegate = delegate
191 | try await delegate.discoverServices(for: peripheral)
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:218:44: warning: non-sendable type 'BLEState' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
216 | guard let self = self else { return }
217 | Task(priority: .userInitiated) {
218 | let state = await self.checkForScan(state, subscriberCount)
| `- warning: non-sendable type 'BLEState' returned by implicitly asynchronous call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
219 | await MainActor.run { self.bleState.send(state) }
220 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/model/BLEState.swift:12:15: note: consider making struct 'BLEState' conform to the 'Sendable' protocol
10 | /// Represents the state of Bluetooth connectivity and permissions.
11 | @available(macOS 12, iOS 15, tvOS 15.0, watchOS 8.0, *)
12 | public struct BLEState {
| `- note: consider making struct 'BLEState' conform to the 'Sendable' protocol
13 |
14 | /// Indicates if Bluetooth is authorized.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:219:62: warning: capture of 'state' with non-sendable type 'BLEState' in a `@Sendable` closure; this is an error in the Swift 6 language mode
217 | Task(priority: .userInitiated) {
218 | let state = await self.checkForScan(state, subscriberCount)
219 | await MainActor.run { self.bleState.send(state) }
| `- warning: capture of 'state' with non-sendable type 'BLEState' in a `@Sendable` closure; this is an error in the Swift 6 language mode
220 | }
221 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/model/BLEState.swift:12:15: note: consider making struct 'BLEState' conform to the 'Sendable' protocol
10 | /// Represents the state of Bluetooth connectivity and permissions.
11 | @available(macOS 12, iOS 15, tvOS 15.0, watchOS 8.0, *)
12 | public struct BLEState {
| `- note: consider making struct 'BLEState' conform to the 'Sendable' protocol
13 |
14 | /// Indicates if Bluetooth is authorized.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:66:9: warning: cannot access property 'logger' with a non-sendable type 'any ILogger' from nonisolated deinit; this is an error in the Swift 6 language mode
64 | /// Deinitializes the BluetoothLEManager.
65 | deinit {
66 | logger.log("BluetoothManager deinitialized", level: .debug)
| `- warning: cannot access property 'logger' with a non-sendable type 'any ILogger' from nonisolated deinit; this is an error in the Swift 6 language mode
67 | }
68 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/ILogger.swift:11:17: note: protocol 'ILogger' does not conform to the 'Sendable' protocol
9 |
10 | /// Protocol defining a logger with a log method.
11 | public protocol ILogger {
| `- note: protocol 'ILogger' does not conform to the 'Sendable' protocol
12 | /// Logs a message with a specified log level.
13 | ///
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:74:26: warning: sending 'self.stream' risks causing data races; this is an error in the Swift 6 language mode
72 | public var peripheralsStream: AsyncStream<[CBPeripheral]> {
73 | get async{
74 | await stream.peripheralsStream()
| |- warning: sending 'self.stream' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.stream' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:92:32: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
90 | defer {
91 | if disconnect {
92 | centralManager.cancelPeripheralConnection(peripheral)
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
93 | }
94 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:133:43: warning: sending 'self.delegateHandler' risks causing data races; this is an error in the Swift 6 language mode
131 | let id = peripheral.getId
132 | let name = peripheral.getName
133 | try await delegateHandler.connect(to: id, name: name, with: continuation)
| |- warning: sending 'self.delegateHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.delegateHandler' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
134 | centralManager.connect(peripheral, options: nil)
135 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:153:43: warning: sending 'self.delegateHandler' risks causing data races; this is an error in the Swift 6 language mode
151 | let id = peripheral.getId
152 | let name = peripheral.getName
153 | try await delegateHandler.disconnect(to: id, name: name, with: continuation)
| |- warning: sending 'self.delegateHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.delegateHandler' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
154 | centralManager.cancelPeripheralConnection(peripheral)
155 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:207:17: warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
205 | .sink { [weak self] peripherals in
206 | guard let self = self else { return }
207 | Task {
| `- warning: task-isolated value of type '() async -> ()' passed as a strongly transferred parameter; later accesses could race; this is an error in the Swift 6 language mode
208 | await self.handlePeripheralChange(peripherals)
209 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:229:21: warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
227 | /// - Parameter peripherals: An array of discovered `CBPeripheral` instances.
228 | private func handlePeripheralChange(_ peripherals: [CBPeripheral]) async {
229 | await stream.updatePeripherals(peripherals)
| |- warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'peripherals' to main actor-isolated callee risks causing data races between main actor-isolated and 'self'-isolated uses
230 | }
231 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:229:21: warning: sending 'self.stream' risks causing data races; this is an error in the Swift 6 language mode
227 | /// - Parameter peripherals: An array of discovered `CBPeripheral` instances.
228 | private func handlePeripheralChange(_ peripherals: [CBPeripheral]) async {
229 | await stream.updatePeripherals(peripherals)
| |- warning: sending 'self.stream' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'self'-isolated 'self.stream' to main actor-isolated callee risks causing data races between main actor-isolated and 'self'-isolated uses
230 | }
231 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:208:32: warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
206 | guard let self = self else { return }
207 | Task {
208 | await self.handlePeripheralChange(peripherals)
| |- warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'peripherals' to actor-isolated instance method 'handlePeripheralChange' risks causing data races between actor-isolated and task-isolated uses
209 | }
210 | }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:219:62: warning: sending 'state' risks causing data races; this is an error in the Swift 6 language mode
217 | Task(priority: .userInitiated) {
218 | let state = await self.checkForScan(state, subscriberCount)
219 | await MainActor.run { self.bleState.send(state) }
| |- warning: sending 'state' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'self'-isolated 'state' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
220 | }
221 | }
[17/25] Emitting module bluetooth_law_energy_swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:18:16: warning: main actor-isolated property 'bleState' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
12 | /// Manages Bluetooth Low Energy (BLE) interactions using Combine and CoreBluetooth.
13 | @available(macOS 12, iOS 15, tvOS 15.0, watchOS 8.0, *)
14 | public actor BluetoothLEManager: NSObject, ObservableObject, IBluetoothLEManager {
| `- note: add '@preconcurrency' to the 'IBluetoothLEManager' conformance to defer isolation checking to run time
15 |
16 | /// A subject that publishes the BLE state changes to the main actor.
17 | @MainActor
18 | public let bleState: CurrentValueSubject<BLEState, Never> = .init(.init())
| `- warning: main actor-isolated property 'bleState' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode
19 |
20 | /// Internal state variables
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/IBluetoothLEManager.swift:18:9: note: 'bleState' declared here
16 | /// A subject that publishes the BLE state changes.
17 |
18 | var bleState: CurrentValueSubject<BLEState, Never> { get }
| `- note: 'bleState' declared here
19 |
20 | /// Provides an asynchronous stream of discovered Bluetooth peripherals.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:72:16: warning: non-sendable type 'AsyncStream<[CBPeripheral]>' in conformance of actor-isolated property 'peripheralsStream' to protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
70 |
71 | /// Provides a stream of discovered peripherals.
72 | public var peripheralsStream: AsyncStream<[CBPeripheral]> {
| `- warning: non-sendable type 'AsyncStream<[CBPeripheral]>' in conformance of actor-isolated property 'peripheralsStream' to protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
73 | get async{
74 | await stream.peripheralsStream()
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
7 |
8 | import Combine
9 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
10 | import retry_policy_service
11 |
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:89:17: warning: non-sendable type '[CBService]' returned by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
87 | /// - Throws: An error if the services could not be fetched.
88 | @MainActor
89 | public func discoverServices(for peripheral: CBPeripheral, from cache: Bool = true, disconnect: Bool = true) async throws -> [CBService] {
| `- warning: non-sendable type '[CBService]' returned by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' satisfying protocol requirement cannot cross actor boundary; this is an error in the Swift 6 language mode
90 | defer {
91 | if disconnect {
CoreBluetooth.CBService:2:12: note: class 'CBService' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBService : CBAttribute {
| `- note: class 'CBService' does not conform to the 'Sendable' protocol
3 | weak open var peripheral: CBPeripheral? { get }
4 | open var isPrimary: Bool { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:89:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
87 | /// - Throws: An error if the services could not be fetched.
88 | @MainActor
89 | public func discoverServices(for peripheral: CBPeripheral, from cache: Bool = true, disconnect: Bool = true) async throws -> [CBService] {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'discoverServices(for:from:disconnect:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
90 | defer {
91 | if disconnect {
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/protocol/IBluetoothLEManager.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
8 | import Foundation
9 | import Combine
10 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
11 |
12 | /// A protocol defining the Bluetooth LE manager functionality.
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:122:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'connect(to:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
120 | /// - Throws: `BluetoothLEManager.Errors` if the connection fails.
121 | @MainActor
122 | public func connect(to peripheral: CBPeripheral) async throws {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'connect(to:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
123 | guard peripheral.isNotConnected else {
124 | throw Errors.connected(peripheral)
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/BluetoothLEManager.swift:144:17: warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'disconnect(from:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
142 | /// - Throws: `BluetoothLEManager.Errors` if the connection fails.
143 | @MainActor
144 | public func disconnect(from peripheral: CBPeripheral) async throws {
| `- warning: non-sendable type 'CBPeripheral' in parameter of the protocol requirement satisfied by main actor-isolated instance method 'disconnect(from:)' cannot cross actor boundary; this is an error in the Swift 6 language mode
145 | guard peripheral.isConnected else {
146 | throw Errors.notConnected(peripheral.getName)
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:22:14: warning: associated value 'connection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
20 |
21 | /// Error encountered while connecting.
22 | case connection(CBPeripheral, Error?)
| `- warning: associated value 'connection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
23 |
24 | /// Error when peripheral is already connected.
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
6 | //
7 |
8 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
9 |
10 | public extension BluetoothLEManager {
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:25:14: warning: associated value 'connected' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
23 |
24 | /// Error when peripheral is already connected.
25 | case connected(CBPeripheral)
| `- warning: associated value 'connected' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
26 |
27 | /// Error when peripheral is not connected.
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:40:14: warning: associated value 'disconnection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
38 |
39 | /// Error encountered while disconnecting.
40 | case disconnection(CBPeripheral, Error?)
| `- warning: associated value 'disconnection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
41 |
42 | /// Text description
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
[18/25] Compiling bluetooth_law_energy_swift BLEState.swift
[19/25] Compiling bluetooth_law_energy_swift IBluetoothLEManager.swift
[20/25] Compiling bluetooth_law_energy_swift ILogger.swift
[21/25] Compiling bluetooth_law_energy_swift AppleLogger.swift
[22/25] Compiling bluetooth_law_energy_swift Errors.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:22:14: warning: associated value 'connection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
20 |
21 | /// Error encountered while connecting.
22 | case connection(CBPeripheral, Error?)
| `- warning: associated value 'connection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
23 |
24 | /// Error when peripheral is already connected.
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
6 | //
7 |
8 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
9 |
10 | public extension BluetoothLEManager {
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:25:14: warning: associated value 'connected' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
23 |
24 | /// Error when peripheral is already connected.
25 | case connected(CBPeripheral)
| `- warning: associated value 'connected' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
26 |
27 | /// Error when peripheral is not connected.
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:40:14: warning: associated value 'disconnection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
38 |
39 | /// Error encountered while disconnecting.
40 | case disconnection(CBPeripheral, Error?)
| `- warning: associated value 'disconnection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
41 |
42 | /// Text description
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
[23/25] Compiling bluetooth_law_energy_swift ServiceType.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:22:14: warning: associated value 'connection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
20 |
21 | /// Error encountered while connecting.
22 | case connection(CBPeripheral, Error?)
| `- warning: associated value 'connection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
23 |
24 | /// Error when peripheral is already connected.
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:8:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
6 | //
7 |
8 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
9 |
10 | public extension BluetoothLEManager {
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:25:14: warning: associated value 'connected' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
23 |
24 | /// Error when peripheral is already connected.
25 | case connected(CBPeripheral)
| `- warning: associated value 'connected' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
26 |
27 | /// Error when peripheral is not connected.
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/enum/Errors.swift:40:14: warning: associated value 'disconnection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
38 |
39 | /// Error encountered while disconnecting.
40 | case disconnection(CBPeripheral, Error?)
| `- warning: associated value 'disconnection' of 'Sendable'-conforming enum 'Errors' has non-sendable type 'CBPeripheral'; this is an error in the Swift 6 language mode
41 |
42 | /// Text description
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
[24/25] Compiling bluetooth_law_energy_swift State.swift
[25/25] Compiling bluetooth_law_energy_swift StreamRegistration.swift
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamRegistration.swift:68:38: warning: non-sendable type '[CBPeripheral]' in implicitly asynchronous access to main actor-isolated property 'discoveredPeripherals' cannot cross actor boundary; this is an error in the Swift 6 language mode
66 | let id = UUID()
67 | subscribers[id] = continuation
68 | continuation.yield(await discoveredPeripherals)
| `- warning: non-sendable type '[CBPeripheral]' in implicitly asynchronous access to main actor-isolated property 'discoveredPeripherals' cannot cross actor boundary; this is an error in the Swift 6 language mode
69 | subscriberCountSubject.send(count)
70 | return id
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamRegistration.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
8 |
9 | import Combine
10 | import CoreBluetooth
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'CoreBluetooth'
11 |
12 | extension BluetoothLEManager {
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamRegistration.swift:58:35: warning: cannot access property 'discoveredPeripherals' with a non-sendable type '[CBPeripheral]' from nonisolated deinit; this is an error in the Swift 6 language mode
56 | value.finish()
57 | }
58 | discoveredPeripherals = []
| `- warning: cannot access property 'discoveredPeripherals' with a non-sendable type '[CBPeripheral]' from nonisolated deinit; this is an error in the Swift 6 language mode
59 | }
60 |
CoreBluetooth.CBPeripheral:2:12: note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.7, *)
2 | open class CBPeripheral : CBPeer {
| `- note: class 'CBPeripheral' does not conform to the 'Sendable' protocol
3 | weak open var delegate: (any CBPeripheralDelegate)? { get set }
4 | open var name: String? { get }
/Users/admin/builder/spi-builder-workspace/Sources/bluetooth-law-energy-swift/service/StreamRegistration.swift:88:30: warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
86 | discoveredPeripherals = peripherals
87 | for continuation in await subscribers.values {
88 | continuation.yield(peripherals)
| |- warning: sending 'peripherals' risks causing data races; this is an error in the Swift 6 language mode
| `- note: main actor-isolated 'peripherals' is passed as a 'sending' parameter; Uses in callee may race with later main actor-isolated uses
89 | }
90 | }
Build complete! (12.38s)
Fetching https://github.com/The-Igor/retry-policy-service.git
[1/89] Fetching retry-policy-service
Fetched https://github.com/The-Igor/retry-policy-service.git from cache (0.66s)
Computing version for https://github.com/The-Igor/retry-policy-service.git
Computed https://github.com/The-Igor/retry-policy-service.git at 1.0.1 (0.70s)
Creating working copy for https://github.com/The-Igor/retry-policy-service.git
Working copy of https://github.com/The-Igor/retry-policy-service.git resolved at 1.0.1
Build complete.
{
"dependencies" : [
{
"identity" : "retry-policy-service",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.1",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/The-Igor/retry-policy-service.git"
}
],
"manifest_display_name" : "bluetooth-law-energy-swift",
"name" : "bluetooth-law-energy-swift",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "ios",
"version" : "15.0"
},
{
"name" : "watchos",
"version" : "8.0"
},
{
"name" : "tvos",
"version" : "15.0"
}
],
"products" : [
{
"name" : "bluetooth-law-energy-swift",
"targets" : [
"bluetooth-law-energy-swift"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "bluetooth_law_energy_swiftTests",
"module_type" : "SwiftTarget",
"name" : "bluetooth-law-energy-swiftTests",
"path" : "Tests/bluetooth-law-energy-swiftTests",
"sources" : [
"BluetoothLEManagerTests.swift"
],
"target_dependencies" : [
"bluetooth-law-energy-swift"
],
"type" : "test"
},
{
"c99name" : "bluetooth_law_energy_swift",
"module_type" : "SwiftTarget",
"name" : "bluetooth-law-energy-swift",
"path" : "Sources/bluetooth-law-energy-swift",
"product_dependencies" : [
"retry-policy-service"
],
"product_memberships" : [
"bluetooth-law-energy-swift"
],
"sources" : [
"BluetoothLEManager.swift",
"Combine+/Publisher+.swift",
"delegate/BluetoothDelegate.swift",
"delegate/PeripheralDelegate.swift",
"enum/Errors.swift",
"enum/ServiceType.swift",
"ext/CBPeripheral+.swift",
"ext/Task+.swift",
"model/BLEState.swift",
"protocol/IBluetoothLEManager.swift",
"protocol/ILogger.swift",
"service/AppleLogger.swift",
"service/CacheServices.swift",
"service/ServiceRegistration.swift",
"service/State.swift",
"service/StreamFactory.swift",
"service/StreamRegistration.swift"
],
"type" : "library"
}
],
"tools_version" : "5.7"
}
Done.