This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

The Swift Package Index logo.Swift Package Index

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

Build Information

Successful build of Mqtt with Swift 6.0 for Linux.

Swift 6 data race errors: 3

Build Command

bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/hjianbo/mqtt.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/hjianbo/mqtt
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 2af5589 Merge branch 'dev'
Cloned https://github.com/hjianbo/mqtt.git
Revision (git rev-parse @):
2af55898db7cccfc12accfd0a15fe4ecbf9fa579
SUCCESS checkout https://github.com/hjianbo/mqtt.git at master
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $workDir
https://github.com/hjianbo/mqtt.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Fetching https://github.com/vapor/debugging.git
Fetching https://github.com/vapor/sockets
Fetching https://github.com/vapor/bits.git
Fetching https://github.com/vapor/core.git
[1/3312] Fetching sockets
[465/3670] Fetching sockets, bits
[2347/3930] Fetching sockets, bits, debugging
[3931/24073] Fetching sockets, bits, debugging, core
Fetched https://github.com/vapor/bits.git from cache (0.25s)
Fetched https://github.com/vapor/sockets from cache (0.25s)
Computing version for https://github.com/vapor/sockets
[6102/20403] Fetching debugging, core
Fetched https://github.com/vapor/debugging.git from cache (0.68s)
Fetched https://github.com/vapor/core.git from cache (0.69s)
Computed https://github.com/vapor/sockets at 2.2.2 (0.46s)
Computing version for https://github.com/vapor/core.git
Computed https://github.com/vapor/core.git at 2.2.0 (0.45s)
Computing version for https://github.com/vapor/debugging.git
Computed https://github.com/vapor/debugging.git at 1.1.1 (0.45s)
Computing version for https://github.com/vapor/bits.git
Computed https://github.com/vapor/bits.git at 1.1.0 (0.47s)
Creating working copy for https://github.com/vapor/core.git
Working copy of https://github.com/vapor/core.git resolved at 2.2.0
Creating working copy for https://github.com/vapor/debugging.git
Working copy of https://github.com/vapor/debugging.git resolved at 1.1.1
Creating working copy for https://github.com/vapor/sockets
Working copy of https://github.com/vapor/sockets resolved at 2.2.2
Creating working copy for https://github.com/vapor/bits.git
Working copy of https://github.com/vapor/bits.git resolved at 1.1.0
warning: 'spi-builder-workspace': Invalid Exclude '/host/spi-builder-workspace/Sources/Mqtt/Examples': File not found.
Building for debugging...
[0/8] Write sources
[7/8] Write swift-version-24593BA9C3E375BF.txt
[9/30] Emitting module Bits
[10/32] Compiling Bits UnsignedInteger+BytesConvertible.swift
[11/32] Compiling Bits UnsignedInteger+Shifting.swift
[12/32] Emitting module Debugging
[13/32] Compiling Debugging Debuggable.swift
[15/33] Compiling Bits Operators.swift
[16/33] Compiling Bits String+BytesConvertible.swift
[17/33] Emitting module libc
[18/33] Compiling libc libc.swift
[20/34] Compiling Bits Bytes+Base64.swift
[21/34] Compiling Bits Bytes+Hex.swift
[22/34] Compiling Bits Bytes+Percent.swift
[23/34] Compiling Bits BytesConvertible.swift
[24/34] Compiling Bits Byte+Random.swift
[25/34] Compiling Bits Byte+UTF8Numbers.swift
[26/34] Compiling Bits ByteSequence+Conversions.swift
[27/34] Compiling Bits Aliases.swift
[28/34] Compiling Bits Base64Encoder.swift
[29/34] Compiling Bits Byte+Alphabet.swift
[30/34] Compiling Bits Byte+ControlCharacters.swift
[31/34] Compiling Bits Byte+Convenience.swift
[32/34] Compiling Bits Byte+PatternMatching.swift
[33/34] Compiling Bits Data+BytesConvertible.swift
[34/34] Compiling Bits HexEncoder.swift
[36/57] Compiling Core DispatchTime+Utilities.swift
[37/57] Compiling Core EmptyInitializable.swift
[38/57] Compiling Core Exports.swift
[39/59] Emitting module Core
[40/59] Compiling Core Extendable.swift
[41/59] Compiling Core FileProtocol.swift
[42/59] Compiling Core Int+Hex.swift
[43/59] Compiling Core Lock.swift
[44/59] Compiling Core Portal.swift
[45/59] Compiling Core RFC1123.swift
[46/59] Compiling Core String.swift
[47/59] Compiling Core WorkingDirectory.swift
[48/59] Compiling Core Result.swift
[49/59] Compiling Core Semaphore.swift
[50/59] Compiling Core Sequence.swift
[51/59] Compiling Core Collection+Safe.swift
[52/59] Compiling Core DataFile.swift
[53/59] Compiling Core Dispatch.swift
[54/59] Compiling Core StaticDataBuffer.swift
[55/59] Compiling Core String+CaseInsensitiveCompare.swift
[56/59] Compiling Core String+Polymorphic.swift
[57/59] Compiling Core Array.swift
[58/59] Compiling Core Bits.swift
[59/59] Compiling Core Cache.swift
[61/70] Compiling Transport Stream.swift
[62/71] Compiling Transport FoundationStream.swift
[63/71] Compiling Transport StreamError.swift
[64/71] Compiling Transport ServerStream.swift
[65/71] Compiling Transport ReadableStream.swift
[66/71] Compiling Transport Exports.swift
[67/71] Compiling Transport ClientStream.swift
[68/71] Compiling Transport InternetStream.swift
[69/71] Compiling Transport Port.swift
[70/71] Emitting module Transport
[71/71] Compiling Transport WriteableStream.swift
[73/93] Compiling Sockets TCPReadableSocket.swift
[74/93] Compiling Sockets TCPSocket.swift
[75/95] Emitting module Sockets
[76/95] Compiling Sockets RawSocket.swift
[77/95] Compiling Sockets Select.swift
[78/95] Compiling Sockets Socket.swift
[79/95] Compiling Sockets Types.swift
[80/95] Compiling Sockets Exports.swift
[81/95] Compiling Sockets Config.swift
[82/95] Compiling Sockets Descriptor.swift
[83/95] Compiling Sockets InternetSocket.swift
[84/95] Compiling Sockets Pipe.swift
[85/95] Compiling Sockets Address+C.swift
[86/95] Compiling Sockets Address.swift
[87/95] Compiling Sockets Buffer.swift
[88/95] Compiling Sockets SocketOptions.swift
[89/95] Compiling Sockets TCPEstablishedSocket.swift
[90/95] Compiling Sockets TCPInternetSocket.swift
[91/95] Compiling Sockets TCPWriteableSocket.swift
[92/95] Compiling Sockets UDPSocket.swift
[93/95] Compiling Sockets Conversions.swift
[94/95] Compiling Sockets Error.swift
[95/95] Compiling Sockets FDSet.swift
[97/115] Compiling Mqtt SubscribePacket.swift
[98/115] Compiling Mqtt UnsubAckPacket.swift
[99/115] Compiling Mqtt PubRecPacket.swift
[100/115] Compiling Mqtt PubRelPacket.swift
[101/117] Emitting module Mqtt
/host/spi-builder-workspace/Sources/Mqtt/DDLog.swift:32:5: warning: var 'logLevel' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
30 | }
31 |
32 | var logLevel: ETLogLevel  = .verbose
   |     |- warning: var 'logLevel' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |     |- note: convert 'logLevel' to a 'let' constant to make 'Sendable' shared state immutable
   |     |- note: annotate 'logLevel' with '@MainActor' if property should only be accessed from the main actor
   |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
33 |
34 | func DDLogVerbose(_ format: CustomStringConvertible) {
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:84:16: warning: static property 'SendKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 82 | private struct QueueSpecifi {
 83 |
 84 |     static let SendKey = DispatchSpecificKey<String>()
    |                `- warning: static property 'SendKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 85 |
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
Dispatch.DispatchSpecificKey:1:20: note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
1 | final public class DispatchSpecificKey<T> {
  |                    `- note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
2 |     public init()
3 |     deinit
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Dispatch'
  8 |
  9 | import Foundation
 10 | import Dispatch
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Dispatch'
 11 | import Sockets
 12 |
    :
 82 | private struct QueueSpecifi {
 83 |
 84 |     static let SendKey = DispatchSpecificKey<String>()
    |                |- note: annotate 'SendKey' with '@MainActor' if property should only be accessed from the main actor
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 85 |
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:88:16: warning: static property 'ReadKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
 87 |
 88 |     static let ReadKey = DispatchSpecificKey<String>()
    |                |- warning: static property 'ReadKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: annotate 'ReadKey' with '@MainActor' if property should only be accessed from the main actor
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 89 |
 90 |     static let ReadValue = "READ_QUEUE_SPECIFI_VALUE"
Dispatch.DispatchSpecificKey:1:20: note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
1 | final public class DispatchSpecificKey<T> {
  |                    `- note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
2 |     public init()
3 |     deinit
[102/117] Compiling Mqtt DDLog.swift
/host/spi-builder-workspace/Sources/Mqtt/DDLog.swift:32:5: warning: var 'logLevel' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
30 | }
31 |
32 | var logLevel: ETLogLevel  = .verbose
   |     |- warning: var 'logLevel' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |     |- note: convert 'logLevel' to a 'let' constant to make 'Sendable' shared state immutable
   |     |- note: annotate 'logLevel' with '@MainActor' if property should only be accessed from the main actor
   |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
33 |
34 | func DDLogVerbose(_ format: CustomStringConvertible) {
[103/117] Compiling Mqtt Extension.swift
/host/spi-builder-workspace/Sources/Mqtt/DDLog.swift:32:5: warning: var 'logLevel' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
30 | }
31 |
32 | var logLevel: ETLogLevel  = .verbose
   |     |- warning: var 'logLevel' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |     |- note: convert 'logLevel' to a 'let' constant to make 'Sendable' shared state immutable
   |     |- note: annotate 'logLevel' with '@MainActor' if property should only be accessed from the main actor
   |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
33 |
34 | func DDLogVerbose(_ format: CustomStringConvertible) {
[104/117] Compiling Mqtt LocalStorage.swift
/host/spi-builder-workspace/Sources/Mqtt/DDLog.swift:32:5: warning: var 'logLevel' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
30 | }
31 |
32 | var logLevel: ETLogLevel  = .verbose
   |     |- warning: var 'logLevel' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
   |     |- note: convert 'logLevel' to a 'let' constant to make 'Sendable' shared state immutable
   |     |- note: annotate 'logLevel' with '@MainActor' if property should only be accessed from the main actor
   |     `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
33 |
34 | func DDLogVerbose(_ format: CustomStringConvertible) {
[105/117] Compiling Mqtt DisconnectPacket.swift
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:173:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
171 |
172 |     var packToData: Data {
173 |         return Data(bytes: UnsafePointer<UInt8>(packToBytes), count: packToBytes.count)
    |                            |                    |- note: implicit argument conversion from 'Array<UInt8>' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
    |                            |                    `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                            `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
174 |     }
175 |
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:205:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
203 |
204 |     var packToData: Data {
205 |         return Data(bytes: UnsafePointer<UInt8>(packToBytes), count: packToBytes.count)
    |                            |                    |- note: implicit argument conversion from 'Array<UInt8>' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
    |                            |                    `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                            `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
206 |     }
207 |
[106/117] Compiling Mqtt Packet.swift
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:173:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
171 |
172 |     var packToData: Data {
173 |         return Data(bytes: UnsafePointer<UInt8>(packToBytes), count: packToBytes.count)
    |                            |                    |- note: implicit argument conversion from 'Array<UInt8>' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
    |                            |                    `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                            `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
174 |     }
175 |
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:205:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
203 |
204 |     var packToData: Data {
205 |         return Data(bytes: UnsafePointer<UInt8>(packToBytes), count: packToBytes.count)
    |                            |                    |- note: implicit argument conversion from 'Array<UInt8>' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
    |                            |                    `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                            `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
206 |     }
207 |
[107/117] Compiling Mqtt PingReqPacket.swift
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:173:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
171 |
172 |     var packToData: Data {
173 |         return Data(bytes: UnsafePointer<UInt8>(packToBytes), count: packToBytes.count)
    |                            |                    |- note: implicit argument conversion from 'Array<UInt8>' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
    |                            |                    `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                            `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
174 |     }
175 |
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:205:28: warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
203 |
204 |     var packToData: Data {
205 |         return Data(bytes: UnsafePointer<UInt8>(packToBytes), count: packToBytes.count)
    |                            |                    |- note: implicit argument conversion from 'Array<UInt8>' to 'UnsafePointer<UInt8>' produces a pointer valid only for the duration of the call to 'init(_:)'
    |                            |                    `- note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope
    |                            `- warning: initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
206 |     }
207 |
[108/117] Compiling Mqtt PublishPacket.swift
[109/117] Compiling Mqtt SubAckPacket.swift
[110/117] Compiling Mqtt PingRespPacket.swift
[111/117] Compiling Mqtt PubAckPacket.swift
[112/117] Compiling Mqtt PubCompPacket.swift
[113/117] Compiling Mqtt MqttClient.swift
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:188:17: warning: capture of 'handler' with non-sendable type '((String, (any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
186 |         } catch {
187 |             delegateQueue.async {
188 |                 handler?("\(host):\(port)", error)
    |                 |- warning: capture of 'handler' with non-sendable type '((String, (any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
189 |             }
190 |
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:216:17: warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
214 |         } catch {
215 |             delegateQueue.async {
216 |                 handler?(error)
    |                 |- warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
217 |             }
218 |
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:245:31: warning: capture of 'topicFilters' with non-sendable type 'Dictionary<String, Qos>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
243 |             delegateQueue.async {
244 |                 var subres = Dictionary<String, SubsAckReturnCode>()
245 |                 for (k, _) in topicFilters {
    |                               `- warning: capture of 'topicFilters' with non-sendable type 'Dictionary<String, Qos>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
246 |                     subres[k] = .failure
247 |                 }
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:64:13: note: consider making enum 'Qos' conform to the 'Sendable' protocol
 62 | }
 63 |
 64 | public enum Qos: UInt8 {
    |             `- note: consider making enum 'Qos' conform to the 'Sendable' protocol
 65 |
 66 |     case qos0 = 0
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:249:17: warning: capture of 'handler' with non-sendable type 'MqttClient.SubscribeHandler?' (aka 'Optional<(Dictionary<String, SubsAckReturnCode>, Optional<any Error>) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
247 |                 }
248 |
249 |                 handler?(subres, error)
    |                 |- warning: capture of 'handler' with non-sendable type 'MqttClient.SubscribeHandler?' (aka 'Optional<(Dictionary<String, SubsAckReturnCode>, Optional<any Error>) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
250 |             }
251 |             // XXX: should rm hander from cache
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:276:17: warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
274 |         } catch {
275 |             delegateQueue.async {
276 |                 handler?(error)
    |                 |- warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
277 |             }
278 |             // XXX: should rm handler from cahce, when a error throwed from seesionSend
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:311:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
309 |
310 |         delegateQueue.async { [weak self] in
311 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
312 |             // exec handler
313 |             weakSelf.connectCompelationHandler?(address, nil)
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:323:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
321 |         self.session = nil
322 |         delegateQueue.async { [weak self] in
323 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             weakSelf.delegate?.mqtt(weakSelf, didDisconnect: error)
325 |             // exec handler
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:326:49: warning: capture of 'session' with non-sendable type 'Session' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             weakSelf.delegate?.mqtt(weakSelf, didDisconnect: error)
325 |             // exec handler
326 |             weakSelf.connectCompelationHandler?(session.serverAddress, error)
    |                                                 `- warning: capture of 'session' with non-sendable type 'Session' in a `@Sendable` closure; this is an error in the Swift 6 language mode
327 |             weakSelf.connectCompelationHandler = nil
328 |         }
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:95:13: note: class 'Session' does not conform to the 'Sendable' protocol
 93 | // MQTT Clietn session
 94 | // implment send/recv
 95 | final class Session {
    |             `- note: class 'Session' does not conform to the 'Sendable' protocol
 96 |
 97 |     fileprivate var socket: TCPInternetSocket?
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:335:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
333 |
334 |         delegateQueue.async { [weak self] in
335 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
336 |             weakSelf.delegate?.mqtt(weakSelf, didRecvMessage: packet)
337 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:336:63: warning: capture of 'packet' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
334 |         delegateQueue.async { [weak self] in
335 |             guard let weakSelf = self else { return }
336 |             weakSelf.delegate?.mqtt(weakSelf, didRecvMessage: packet)
    |                                                               `- warning: capture of 'packet' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
337 |         }
338 |     }
/host/spi-builder-workspace/Sources/Mqtt/Packet/PublishPacket.swift:33:15: note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
31 |  a PUBLISH Packet to contain a zero length payload*.
32 |  */
33 | public struct PublishPacket: Packet {
   |               `- note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
34 |
35 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:344:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
342 |
343 |         delegateQueue.async { [weak self] in
344 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
345 |
346 |             weakSelf.delegate?.mqtt(weakSelf, didPublish: publish)
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:346:59: warning: capture of 'publish' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
344 |             guard let weakSelf = self else { return }
345 |
346 |             weakSelf.delegate?.mqtt(weakSelf, didPublish: publish)
    |                                                           `- warning: capture of 'publish' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
347 |
348 |             // exec handler
/host/spi-builder-workspace/Sources/Mqtt/Packet/PublishPacket.swift:33:15: note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
31 |  a PUBLISH Packet to contain a zero length payload*.
32 |  */
33 | public struct PublishPacket: Packet {
   |               `- note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
34 |
35 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:369:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
367 |
368 |         delegateQueue.async { [weak self] in
369 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
370 |
371 |             // exec message handler
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:372:63: warning: capture of 'subscribe' with non-sendable type 'SubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
370 |
371 |             // exec message handler
372 |             guard let subsHandler = weakSelf.subscriCallbacks[subscribe.packetId] else {
    |                                                               `- warning: capture of 'subscribe' with non-sendable type 'SubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
373 |                 assert(false)
374 |                 return
/host/spi-builder-workspace/Sources/Mqtt/Packet/SubscribePacket.swift:32:15: note: consider making struct 'SubscribePacket' conform to the 'Sendable' protocol
30 |
31 |  */
32 | public struct SubscribePacket: Packet {
   |               `- note: consider making struct 'SubscribePacket' conform to the 'Sendable' protocol
33 |
34 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:376:25: warning: capture of 'subres' with non-sendable type '[String : SubsAckReturnCode]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
374 |                 return
375 |             }
376 |             subsHandler(subres, nil)
    |                         `- warning: capture of 'subres' with non-sendable type '[String : SubsAckReturnCode]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
377 |             weakSelf.subscriCallbacks[subscribe.packetId] = nil
378 |         }
/host/spi-builder-workspace/Sources/Mqtt/Packet/SubAckPacket.swift:11:13: note: consider making enum 'SubsAckReturnCode' conform to the 'Sendable' protocol
  9 | import Foundation
 10 |
 11 | public enum SubsAckReturnCode: UInt8 {
    |             `- note: consider making enum 'SubsAckReturnCode' conform to the 'Sendable' protocol
 12 |
 13 |     case maxQos0 = 0x00
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:376:25: warning: reference to captured var 'subres' in concurrently-executing code; this is an error in the Swift 6 language mode
374 |                 return
375 |             }
376 |             subsHandler(subres, nil)
    |                         `- warning: reference to captured var 'subres' in concurrently-executing code; this is an error in the Swift 6 language mode
377 |             weakSelf.subscriCallbacks[subscribe.packetId] = nil
378 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:385:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
383 |
384 |         delegateQueue.async { [weak self] in
385 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
386 |             // exec message handler
387 |             guard let msgHandler = weakSelf.messageCallbacks[unsubs.packetId] else {
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:387:62: warning: capture of 'unsubs' with non-sendable type 'UnsubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
385 |             guard let weakSelf = self else { return }
386 |             // exec message handler
387 |             guard let msgHandler = weakSelf.messageCallbacks[unsubs.packetId] else {
    |                                                              `- warning: capture of 'unsubs' with non-sendable type 'UnsubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
388 |                 assert(false)
389 |                 return
/host/spi-builder-workspace/Sources/Mqtt/Packet/UnsubscribePacket.swift:27:15: note: consider making struct 'UnsubscribePacket' conform to the 'Sendable' protocol
25 |
26 |  */
27 | public struct UnsubscribePacket: Packet {
   |               `- note: consider making struct 'UnsubscribePacket' conform to the 'Sendable' protocol
28 |
29 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:400:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
398 |
399 |         delegateQueue.async { [weak self] in
400 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
401 |             weakSelf.delegate?.mqtt(weakSelf, didRecvPong: pingresp)
402 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:401:60: warning: capture of 'pingresp' with non-sendable type 'PingRespPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
399 |         delegateQueue.async { [weak self] in
400 |             guard let weakSelf = self else { return }
401 |             weakSelf.delegate?.mqtt(weakSelf, didRecvPong: pingresp)
    |                                                            `- warning: capture of 'pingresp' with non-sendable type 'PingRespPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
402 |         }
403 |     }
/host/spi-builder-workspace/Sources/Mqtt/Packet/PingRespPacket.swift:25:15: note: consider making struct 'PingRespPacket' conform to the 'Sendable' protocol
23 |  The PINGRESP Packet has no payload.
24 |  */
25 | public struct PingRespPacket: Packet {
   |               `- note: consider making struct 'PingRespPacket' conform to the 'Sendable' protocol
26 |
27 |     var fixedHeader: FixedHeader
[114/117] Compiling Mqtt ConnAckPacket.swift
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:188:17: warning: capture of 'handler' with non-sendable type '((String, (any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
186 |         } catch {
187 |             delegateQueue.async {
188 |                 handler?("\(host):\(port)", error)
    |                 |- warning: capture of 'handler' with non-sendable type '((String, (any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
189 |             }
190 |
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:216:17: warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
214 |         } catch {
215 |             delegateQueue.async {
216 |                 handler?(error)
    |                 |- warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
217 |             }
218 |
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:245:31: warning: capture of 'topicFilters' with non-sendable type 'Dictionary<String, Qos>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
243 |             delegateQueue.async {
244 |                 var subres = Dictionary<String, SubsAckReturnCode>()
245 |                 for (k, _) in topicFilters {
    |                               `- warning: capture of 'topicFilters' with non-sendable type 'Dictionary<String, Qos>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
246 |                     subres[k] = .failure
247 |                 }
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:64:13: note: consider making enum 'Qos' conform to the 'Sendable' protocol
 62 | }
 63 |
 64 | public enum Qos: UInt8 {
    |             `- note: consider making enum 'Qos' conform to the 'Sendable' protocol
 65 |
 66 |     case qos0 = 0
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:249:17: warning: capture of 'handler' with non-sendable type 'MqttClient.SubscribeHandler?' (aka 'Optional<(Dictionary<String, SubsAckReturnCode>, Optional<any Error>) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
247 |                 }
248 |
249 |                 handler?(subres, error)
    |                 |- warning: capture of 'handler' with non-sendable type 'MqttClient.SubscribeHandler?' (aka 'Optional<(Dictionary<String, SubsAckReturnCode>, Optional<any Error>) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
250 |             }
251 |             // XXX: should rm hander from cache
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:276:17: warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
274 |         } catch {
275 |             delegateQueue.async {
276 |                 handler?(error)
    |                 |- warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
277 |             }
278 |             // XXX: should rm handler from cahce, when a error throwed from seesionSend
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:311:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
309 |
310 |         delegateQueue.async { [weak self] in
311 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
312 |             // exec handler
313 |             weakSelf.connectCompelationHandler?(address, nil)
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:323:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
321 |         self.session = nil
322 |         delegateQueue.async { [weak self] in
323 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             weakSelf.delegate?.mqtt(weakSelf, didDisconnect: error)
325 |             // exec handler
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:326:49: warning: capture of 'session' with non-sendable type 'Session' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             weakSelf.delegate?.mqtt(weakSelf, didDisconnect: error)
325 |             // exec handler
326 |             weakSelf.connectCompelationHandler?(session.serverAddress, error)
    |                                                 `- warning: capture of 'session' with non-sendable type 'Session' in a `@Sendable` closure; this is an error in the Swift 6 language mode
327 |             weakSelf.connectCompelationHandler = nil
328 |         }
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:95:13: note: class 'Session' does not conform to the 'Sendable' protocol
 93 | // MQTT Clietn session
 94 | // implment send/recv
 95 | final class Session {
    |             `- note: class 'Session' does not conform to the 'Sendable' protocol
 96 |
 97 |     fileprivate var socket: TCPInternetSocket?
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:335:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
333 |
334 |         delegateQueue.async { [weak self] in
335 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
336 |             weakSelf.delegate?.mqtt(weakSelf, didRecvMessage: packet)
337 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:336:63: warning: capture of 'packet' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
334 |         delegateQueue.async { [weak self] in
335 |             guard let weakSelf = self else { return }
336 |             weakSelf.delegate?.mqtt(weakSelf, didRecvMessage: packet)
    |                                                               `- warning: capture of 'packet' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
337 |         }
338 |     }
/host/spi-builder-workspace/Sources/Mqtt/Packet/PublishPacket.swift:33:15: note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
31 |  a PUBLISH Packet to contain a zero length payload*.
32 |  */
33 | public struct PublishPacket: Packet {
   |               `- note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
34 |
35 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:344:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
342 |
343 |         delegateQueue.async { [weak self] in
344 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
345 |
346 |             weakSelf.delegate?.mqtt(weakSelf, didPublish: publish)
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:346:59: warning: capture of 'publish' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
344 |             guard let weakSelf = self else { return }
345 |
346 |             weakSelf.delegate?.mqtt(weakSelf, didPublish: publish)
    |                                                           `- warning: capture of 'publish' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
347 |
348 |             // exec handler
/host/spi-builder-workspace/Sources/Mqtt/Packet/PublishPacket.swift:33:15: note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
31 |  a PUBLISH Packet to contain a zero length payload*.
32 |  */
33 | public struct PublishPacket: Packet {
   |               `- note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
34 |
35 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:369:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
367 |
368 |         delegateQueue.async { [weak self] in
369 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
370 |
371 |             // exec message handler
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:372:63: warning: capture of 'subscribe' with non-sendable type 'SubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
370 |
371 |             // exec message handler
372 |             guard let subsHandler = weakSelf.subscriCallbacks[subscribe.packetId] else {
    |                                                               `- warning: capture of 'subscribe' with non-sendable type 'SubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
373 |                 assert(false)
374 |                 return
/host/spi-builder-workspace/Sources/Mqtt/Packet/SubscribePacket.swift:32:15: note: consider making struct 'SubscribePacket' conform to the 'Sendable' protocol
30 |
31 |  */
32 | public struct SubscribePacket: Packet {
   |               `- note: consider making struct 'SubscribePacket' conform to the 'Sendable' protocol
33 |
34 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:376:25: warning: capture of 'subres' with non-sendable type '[String : SubsAckReturnCode]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
374 |                 return
375 |             }
376 |             subsHandler(subres, nil)
    |                         `- warning: capture of 'subres' with non-sendable type '[String : SubsAckReturnCode]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
377 |             weakSelf.subscriCallbacks[subscribe.packetId] = nil
378 |         }
/host/spi-builder-workspace/Sources/Mqtt/Packet/SubAckPacket.swift:11:13: note: consider making enum 'SubsAckReturnCode' conform to the 'Sendable' protocol
  9 | import Foundation
 10 |
 11 | public enum SubsAckReturnCode: UInt8 {
    |             `- note: consider making enum 'SubsAckReturnCode' conform to the 'Sendable' protocol
 12 |
 13 |     case maxQos0 = 0x00
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:376:25: warning: reference to captured var 'subres' in concurrently-executing code; this is an error in the Swift 6 language mode
374 |                 return
375 |             }
376 |             subsHandler(subres, nil)
    |                         `- warning: reference to captured var 'subres' in concurrently-executing code; this is an error in the Swift 6 language mode
377 |             weakSelf.subscriCallbacks[subscribe.packetId] = nil
378 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:385:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
383 |
384 |         delegateQueue.async { [weak self] in
385 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
386 |             // exec message handler
387 |             guard let msgHandler = weakSelf.messageCallbacks[unsubs.packetId] else {
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:387:62: warning: capture of 'unsubs' with non-sendable type 'UnsubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
385 |             guard let weakSelf = self else { return }
386 |             // exec message handler
387 |             guard let msgHandler = weakSelf.messageCallbacks[unsubs.packetId] else {
    |                                                              `- warning: capture of 'unsubs' with non-sendable type 'UnsubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
388 |                 assert(false)
389 |                 return
/host/spi-builder-workspace/Sources/Mqtt/Packet/UnsubscribePacket.swift:27:15: note: consider making struct 'UnsubscribePacket' conform to the 'Sendable' protocol
25 |
26 |  */
27 | public struct UnsubscribePacket: Packet {
   |               `- note: consider making struct 'UnsubscribePacket' conform to the 'Sendable' protocol
28 |
29 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:400:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
398 |
399 |         delegateQueue.async { [weak self] in
400 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
401 |             weakSelf.delegate?.mqtt(weakSelf, didRecvPong: pingresp)
402 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:401:60: warning: capture of 'pingresp' with non-sendable type 'PingRespPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
399 |         delegateQueue.async { [weak self] in
400 |             guard let weakSelf = self else { return }
401 |             weakSelf.delegate?.mqtt(weakSelf, didRecvPong: pingresp)
    |                                                            `- warning: capture of 'pingresp' with non-sendable type 'PingRespPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
402 |         }
403 |     }
/host/spi-builder-workspace/Sources/Mqtt/Packet/PingRespPacket.swift:25:15: note: consider making struct 'PingRespPacket' conform to the 'Sendable' protocol
23 |  The PINGRESP Packet has no payload.
24 |  */
25 | public struct PingRespPacket: Packet {
   |               `- note: consider making struct 'PingRespPacket' conform to the 'Sendable' protocol
26 |
27 |     var fixedHeader: FixedHeader
[115/117] Compiling Mqtt ConnectPacket.swift
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:188:17: warning: capture of 'handler' with non-sendable type '((String, (any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
186 |         } catch {
187 |             delegateQueue.async {
188 |                 handler?("\(host):\(port)", error)
    |                 |- warning: capture of 'handler' with non-sendable type '((String, (any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
189 |             }
190 |
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:216:17: warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
214 |         } catch {
215 |             delegateQueue.async {
216 |                 handler?(error)
    |                 |- warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
217 |             }
218 |
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:245:31: warning: capture of 'topicFilters' with non-sendable type 'Dictionary<String, Qos>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
243 |             delegateQueue.async {
244 |                 var subres = Dictionary<String, SubsAckReturnCode>()
245 |                 for (k, _) in topicFilters {
    |                               `- warning: capture of 'topicFilters' with non-sendable type 'Dictionary<String, Qos>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
246 |                     subres[k] = .failure
247 |                 }
/host/spi-builder-workspace/Sources/Mqtt/Packet/Packet.swift:64:13: note: consider making enum 'Qos' conform to the 'Sendable' protocol
 62 | }
 63 |
 64 | public enum Qos: UInt8 {
    |             `- note: consider making enum 'Qos' conform to the 'Sendable' protocol
 65 |
 66 |     case qos0 = 0
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:249:17: warning: capture of 'handler' with non-sendable type 'MqttClient.SubscribeHandler?' (aka 'Optional<(Dictionary<String, SubsAckReturnCode>, Optional<any Error>) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
247 |                 }
248 |
249 |                 handler?(subres, error)
    |                 |- warning: capture of 'handler' with non-sendable type 'MqttClient.SubscribeHandler?' (aka 'Optional<(Dictionary<String, SubsAckReturnCode>, Optional<any Error>) -> ()>') in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
250 |             }
251 |             // XXX: should rm hander from cache
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:276:17: warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
274 |         } catch {
275 |             delegateQueue.async {
276 |                 handler?(error)
    |                 |- warning: capture of 'handler' with non-sendable type '(((any Error)?) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
    |                 `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
277 |             }
278 |             // XXX: should rm handler from cahce, when a error throwed from seesionSend
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:311:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
309 |
310 |         delegateQueue.async { [weak self] in
311 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
312 |             // exec handler
313 |             weakSelf.connectCompelationHandler?(address, nil)
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:323:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
321 |         self.session = nil
322 |         delegateQueue.async { [weak self] in
323 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             weakSelf.delegate?.mqtt(weakSelf, didDisconnect: error)
325 |             // exec handler
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:326:49: warning: capture of 'session' with non-sendable type 'Session' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             weakSelf.delegate?.mqtt(weakSelf, didDisconnect: error)
325 |             // exec handler
326 |             weakSelf.connectCompelationHandler?(session.serverAddress, error)
    |                                                 `- warning: capture of 'session' with non-sendable type 'Session' in a `@Sendable` closure; this is an error in the Swift 6 language mode
327 |             weakSelf.connectCompelationHandler = nil
328 |         }
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:95:13: note: class 'Session' does not conform to the 'Sendable' protocol
 93 | // MQTT Clietn session
 94 | // implment send/recv
 95 | final class Session {
    |             `- note: class 'Session' does not conform to the 'Sendable' protocol
 96 |
 97 |     fileprivate var socket: TCPInternetSocket?
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:335:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
333 |
334 |         delegateQueue.async { [weak self] in
335 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
336 |             weakSelf.delegate?.mqtt(weakSelf, didRecvMessage: packet)
337 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:336:63: warning: capture of 'packet' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
334 |         delegateQueue.async { [weak self] in
335 |             guard let weakSelf = self else { return }
336 |             weakSelf.delegate?.mqtt(weakSelf, didRecvMessage: packet)
    |                                                               `- warning: capture of 'packet' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
337 |         }
338 |     }
/host/spi-builder-workspace/Sources/Mqtt/Packet/PublishPacket.swift:33:15: note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
31 |  a PUBLISH Packet to contain a zero length payload*.
32 |  */
33 | public struct PublishPacket: Packet {
   |               `- note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
34 |
35 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:344:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
342 |
343 |         delegateQueue.async { [weak self] in
344 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
345 |
346 |             weakSelf.delegate?.mqtt(weakSelf, didPublish: publish)
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:346:59: warning: capture of 'publish' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
344 |             guard let weakSelf = self else { return }
345 |
346 |             weakSelf.delegate?.mqtt(weakSelf, didPublish: publish)
    |                                                           `- warning: capture of 'publish' with non-sendable type 'PublishPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
347 |
348 |             // exec handler
/host/spi-builder-workspace/Sources/Mqtt/Packet/PublishPacket.swift:33:15: note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
31 |  a PUBLISH Packet to contain a zero length payload*.
32 |  */
33 | public struct PublishPacket: Packet {
   |               `- note: consider making struct 'PublishPacket' conform to the 'Sendable' protocol
34 |
35 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:369:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
367 |
368 |         delegateQueue.async { [weak self] in
369 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
370 |
371 |             // exec message handler
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:372:63: warning: capture of 'subscribe' with non-sendable type 'SubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
370 |
371 |             // exec message handler
372 |             guard let subsHandler = weakSelf.subscriCallbacks[subscribe.packetId] else {
    |                                                               `- warning: capture of 'subscribe' with non-sendable type 'SubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
373 |                 assert(false)
374 |                 return
/host/spi-builder-workspace/Sources/Mqtt/Packet/SubscribePacket.swift:32:15: note: consider making struct 'SubscribePacket' conform to the 'Sendable' protocol
30 |
31 |  */
32 | public struct SubscribePacket: Packet {
   |               `- note: consider making struct 'SubscribePacket' conform to the 'Sendable' protocol
33 |
34 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:376:25: warning: capture of 'subres' with non-sendable type '[String : SubsAckReturnCode]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
374 |                 return
375 |             }
376 |             subsHandler(subres, nil)
    |                         `- warning: capture of 'subres' with non-sendable type '[String : SubsAckReturnCode]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
377 |             weakSelf.subscriCallbacks[subscribe.packetId] = nil
378 |         }
/host/spi-builder-workspace/Sources/Mqtt/Packet/SubAckPacket.swift:11:13: note: consider making enum 'SubsAckReturnCode' conform to the 'Sendable' protocol
  9 | import Foundation
 10 |
 11 | public enum SubsAckReturnCode: UInt8 {
    |             `- note: consider making enum 'SubsAckReturnCode' conform to the 'Sendable' protocol
 12 |
 13 |     case maxQos0 = 0x00
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:376:25: warning: reference to captured var 'subres' in concurrently-executing code; this is an error in the Swift 6 language mode
374 |                 return
375 |             }
376 |             subsHandler(subres, nil)
    |                         `- warning: reference to captured var 'subres' in concurrently-executing code; this is an error in the Swift 6 language mode
377 |             weakSelf.subscriCallbacks[subscribe.packetId] = nil
378 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:385:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
383 |
384 |         delegateQueue.async { [weak self] in
385 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
386 |             // exec message handler
387 |             guard let msgHandler = weakSelf.messageCallbacks[unsubs.packetId] else {
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:387:62: warning: capture of 'unsubs' with non-sendable type 'UnsubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
385 |             guard let weakSelf = self else { return }
386 |             // exec message handler
387 |             guard let msgHandler = weakSelf.messageCallbacks[unsubs.packetId] else {
    |                                                              `- warning: capture of 'unsubs' with non-sendable type 'UnsubscribePacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
388 |                 assert(false)
389 |                 return
/host/spi-builder-workspace/Sources/Mqtt/Packet/UnsubscribePacket.swift:27:15: note: consider making struct 'UnsubscribePacket' conform to the 'Sendable' protocol
25 |
26 |  */
27 | public struct UnsubscribePacket: Packet {
   |               `- note: consider making struct 'UnsubscribePacket' conform to the 'Sendable' protocol
28 |
29 |     var fixedHeader: FixedHeader
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:400:34: warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 33 |
 34 |
 35 | public final class MqttClient {
    |                    `- note: class 'MqttClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     private var _packetId: UInt16 = 0
    :
398 |
399 |         delegateQueue.async { [weak self] in
400 |             guard let weakSelf = self else { return }
    |                                  `- warning: capture of 'self' with non-sendable type 'MqttClient?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
401 |             weakSelf.delegate?.mqtt(weakSelf, didRecvPong: pingresp)
402 |         }
/host/spi-builder-workspace/Sources/Mqtt/MqttClient.swift:401:60: warning: capture of 'pingresp' with non-sendable type 'PingRespPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
399 |         delegateQueue.async { [weak self] in
400 |             guard let weakSelf = self else { return }
401 |             weakSelf.delegate?.mqtt(weakSelf, didRecvPong: pingresp)
    |                                                            `- warning: capture of 'pingresp' with non-sendable type 'PingRespPacket' in a `@Sendable` closure; this is an error in the Swift 6 language mode
402 |         }
403 |     }
/host/spi-builder-workspace/Sources/Mqtt/Packet/PingRespPacket.swift:25:15: note: consider making struct 'PingRespPacket' conform to the 'Sendable' protocol
23 |  The PINGRESP Packet has no payload.
24 |  */
25 | public struct PingRespPacket: Packet {
   |               `- note: consider making struct 'PingRespPacket' conform to the 'Sendable' protocol
26 |
27 |     var fixedHeader: FixedHeader
[116/117] Compiling Mqtt UnsubscribePacket.swift
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:84:16: warning: static property 'SendKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 82 | private struct QueueSpecifi {
 83 |
 84 |     static let SendKey = DispatchSpecificKey<String>()
    |                `- warning: static property 'SendKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 85 |
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
Dispatch.DispatchSpecificKey:1:20: note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
1 | final public class DispatchSpecificKey<T> {
  |                    `- note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
2 |     public init()
3 |     deinit
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Dispatch'
  8 |
  9 | import Foundation
 10 | import Dispatch
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Dispatch'
 11 | import Sockets
 12 |
    :
 82 | private struct QueueSpecifi {
 83 |
 84 |     static let SendKey = DispatchSpecificKey<String>()
    |                |- note: annotate 'SendKey' with '@MainActor' if property should only be accessed from the main actor
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 85 |
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:88:16: warning: static property 'ReadKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
 87 |
 88 |     static let ReadKey = DispatchSpecificKey<String>()
    |                |- warning: static property 'ReadKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: annotate 'ReadKey' with '@MainActor' if property should only be accessed from the main actor
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 89 |
 90 |     static let ReadValue = "READ_QUEUE_SPECIFI_VALUE"
Dispatch.DispatchSpecificKey:1:20: note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
1 | final public class DispatchSpecificKey<T> {
  |                    `- note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
2 |     public init()
3 |     deinit
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:303:34: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
301 |
302 |         // exec disconnect bolck in sendQueue
303 |         sendQueue.async(execute: disconnectBlock)
    |                                  `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
304 |     }
305 | }
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:312:34: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
310 |     fileprivate func startRecevie() {
311 |         // read cicrle
312 |         readQueue.async(execute: backgroundReciveLoop)
    |                                  `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
313 |     }
314 |
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:335:21: warning: capture of 'self' with non-sendable type 'Session?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 93 | // MQTT Clietn session
 94 | // implment send/recv
 95 | final class Session {
    |             `- note: class 'Session' does not conform to the 'Sendable' protocol
 96 |
 97 |     fileprivate var socket: TCPInternetSocket?
    :
333 |             if conack.returnCode == .accepted {
334 |                 sendQueue.async { [weak self] in
335 |                     self?.state = .accepted
    |                     `- warning: capture of 'self' with non-sendable type 'Session?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
336 |                     self?.startHeartbeatTimer()
337 |                 }
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:371:21: warning: capture of 'self' with non-sendable type 'Session?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 93 | // MQTT Clietn session
 94 | // implment send/recv
 95 | final class Session {
    |             `- note: class 'Session' does not conform to the 'Sendable' protocol
 96 |
 97 |     fileprivate var socket: TCPInternetSocket?
    :
369 |             } else {
370 |                 sendQueue.async { [weak self] in
371 |                     self?.state = .denied
    |                     `- warning: capture of 'self' with non-sendable type 'Session?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
372 |                 }
373 |
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:515:13: warning: variable 'buffer' was never mutated; consider changing to 'let' constant
513 |         let readLength = 1
514 |
515 |         var buffer = try socket.read(max: readLength)
    |             `- warning: variable 'buffer' was never mutated; consider changing to 'let' constant
516 |         guard readLength == buffer.count else {
517 |             throw SessionError.closeByServer
[117/117] Compiling Mqtt Session.swift
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:84:16: warning: static property 'SendKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 82 | private struct QueueSpecifi {
 83 |
 84 |     static let SendKey = DispatchSpecificKey<String>()
    |                `- warning: static property 'SendKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 85 |
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
Dispatch.DispatchSpecificKey:1:20: note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
1 | final public class DispatchSpecificKey<T> {
  |                    `- note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
2 |     public init()
3 |     deinit
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:10:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Dispatch'
  8 |
  9 | import Foundation
 10 | import Dispatch
    | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Dispatch'
 11 | import Sockets
 12 |
    :
 82 | private struct QueueSpecifi {
 83 |
 84 |     static let SendKey = DispatchSpecificKey<String>()
    |                |- note: annotate 'SendKey' with '@MainActor' if property should only be accessed from the main actor
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 85 |
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:88:16: warning: static property 'ReadKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
 86 |     static let SendValue = "SEND_QUEUE_SPECIFI_VALUE"
 87 |
 88 |     static let ReadKey = DispatchSpecificKey<String>()
    |                |- warning: static property 'ReadKey' is not concurrency-safe because non-'Sendable' type 'DispatchSpecificKey<String>' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: annotate 'ReadKey' with '@MainActor' if property should only be accessed from the main actor
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 89 |
 90 |     static let ReadValue = "READ_QUEUE_SPECIFI_VALUE"
Dispatch.DispatchSpecificKey:1:20: note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
1 | final public class DispatchSpecificKey<T> {
  |                    `- note: generic class 'DispatchSpecificKey' does not conform to the 'Sendable' protocol
2 |     public init()
3 |     deinit
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:303:34: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
301 |
302 |         // exec disconnect bolck in sendQueue
303 |         sendQueue.async(execute: disconnectBlock)
    |                                  `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
304 |     }
305 | }
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:312:34: warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
310 |     fileprivate func startRecevie() {
311 |         // read cicrle
312 |         readQueue.async(execute: backgroundReciveLoop)
    |                                  `- warning: converting non-sendable function value to '@Sendable @convention(block) () -> Void' may introduce data races
313 |     }
314 |
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:335:21: warning: capture of 'self' with non-sendable type 'Session?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 93 | // MQTT Clietn session
 94 | // implment send/recv
 95 | final class Session {
    |             `- note: class 'Session' does not conform to the 'Sendable' protocol
 96 |
 97 |     fileprivate var socket: TCPInternetSocket?
    :
333 |             if conack.returnCode == .accepted {
334 |                 sendQueue.async { [weak self] in
335 |                     self?.state = .accepted
    |                     `- warning: capture of 'self' with non-sendable type 'Session?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
336 |                     self?.startHeartbeatTimer()
337 |                 }
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:371:21: warning: capture of 'self' with non-sendable type 'Session?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 93 | // MQTT Clietn session
 94 | // implment send/recv
 95 | final class Session {
    |             `- note: class 'Session' does not conform to the 'Sendable' protocol
 96 |
 97 |     fileprivate var socket: TCPInternetSocket?
    :
369 |             } else {
370 |                 sendQueue.async { [weak self] in
371 |                     self?.state = .denied
    |                     `- warning: capture of 'self' with non-sendable type 'Session?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
372 |                 }
373 |
/host/spi-builder-workspace/Sources/Mqtt/Session/Session.swift:515:13: warning: variable 'buffer' was never mutated; consider changing to 'let' constant
513 |         let readLength = 1
514 |
515 |         var buffer = try socket.read(max: readLength)
    |             `- warning: variable 'buffer' was never mutated; consider changing to 'let' constant
516 |         guard readLength == buffer.count else {
517 |             throw SessionError.closeByServer
Build complete! (18.34s)
Build complete.
{
  "dependencies" : [
    {
      "identity" : "sockets",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "2.2.0",
            "upper_bound" : "3.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/vapor/sockets"
    }
  ],
  "manifest_display_name" : "Mqtt",
  "name" : "Mqtt",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Mqtt",
      "targets" : [
        "Mqtt"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "MqttTests",
      "module_type" : "SwiftTarget",
      "name" : "MqttTests",
      "path" : "Tests/MqttTests",
      "sources" : [
        "MqttClientTests.swift",
        "MqttPacketTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "Mqtt"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Mqtt",
      "module_type" : "SwiftTarget",
      "name" : "Mqtt",
      "path" : "Sources/Mqtt",
      "product_dependencies" : [
        "Sockets"
      ],
      "product_memberships" : [
        "Mqtt"
      ],
      "sources" : [
        "DDLog.swift",
        "Extension.swift",
        "LocalStorage.swift",
        "MqttClient.swift",
        "Packet/ConnAckPacket.swift",
        "Packet/ConnectPacket.swift",
        "Packet/DisconnectPacket.swift",
        "Packet/Packet.swift",
        "Packet/PingReqPacket.swift",
        "Packet/PingRespPacket.swift",
        "Packet/PubAckPacket.swift",
        "Packet/PubCompPacket.swift",
        "Packet/PubRecPacket.swift",
        "Packet/PubRelPacket.swift",
        "Packet/PublishPacket.swift",
        "Packet/SubAckPacket.swift",
        "Packet/SubscribePacket.swift",
        "Packet/UnsubAckPacket.swift",
        "Packet/UnsubscribePacket.swift",
        "Session/Session.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "4.0"
}
warning: 'spi-builder-workspace': Invalid Exclude '/host/spi-builder-workspace/Sources/Mqtt/Examples': File not found.
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.