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, reference master (2af558), with Swift 6.0 for macOS (SPM) on 26 Nov 2024 20:07:31 UTC.

Swift 6 data race errors: 1

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/hjianbo/mqtt.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
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
Fetching https://github.com/vapor/bits.git
Fetching https://github.com/vapor/debugging.git
Fetching https://github.com/vapor/sockets
Fetching https://github.com/vapor/core.git
[1/3312] Fetching sockets
[101/3572] Fetching sockets, debugging
[273/3930] Fetching sockets, debugging, bits
[345/24073] Fetching sockets, debugging, bits, core
Fetched https://github.com/vapor/sockets from cache (1.01s)
Fetched https://github.com/vapor/debugging.git from cache (1.01s)
Computing version for https://github.com/vapor/sockets
[2942/20501] Fetching bits, core
Fetched https://github.com/vapor/core.git from cache (1.59s)
Fetched https://github.com/vapor/bits.git from cache (1.59s)
Computed https://github.com/vapor/sockets at 2.2.2 (0.58s)
Computing version for https://github.com/vapor/core.git
Computed https://github.com/vapor/core.git at 2.2.0 (0.58s)
Computing version for https://github.com/vapor/debugging.git
Computed https://github.com/vapor/debugging.git at 1.1.1 (0.59s)
Computing version for https://github.com/vapor/bits.git
Computed https://github.com/vapor/bits.git at 1.1.0 (0.57s)
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/bits.git
Working copy of https://github.com/vapor/bits.git resolved at 1.1.0
Creating working copy for https://github.com/vapor/sockets
Working copy of https://github.com/vapor/sockets resolved at 2.2.2
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
Fetching https://github.com/hjianbo/mqtt.git
[1/1085] Fetching mqtt
Fetched https://github.com/hjianbo/mqtt.git from cache (0.89s)
Fetching https://github.com/vapor/sockets from cache
Fetched https://github.com/vapor/sockets from cache (0.46s)
Computing version for https://github.com/vapor/sockets
Computed https://github.com/vapor/sockets at 2.2.4 (0.56s)
Fetching https://github.com/vapor/core.git from cache
Fetching https://github.com/vapor/async.git
Fetched https://github.com/vapor/core.git from cache (0.53s)
[1/2323] Fetching async
Fetched https://github.com/vapor/async.git from cache (0.87s)
Computing version for https://github.com/vapor/async.git
Computed https://github.com/vapor/async.git at 1.0.0-rc.1.1 (0.54s)
Computing version for https://github.com/vapor/core.git
Computed https://github.com/vapor/core.git at 3.10.1 (0.56s)
Fetching https://github.com/apple/swift-nio.git
[1/71935] Fetching swift-nio
Fetched https://github.com/apple/swift-nio.git from cache (4.51s)
Computing version for https://github.com/apple/swift-nio.git
Computed https://github.com/apple/swift-nio.git at 1.14.4 (0.57s)
Fetching https://github.com/apple/swift-nio-zlib-support.git
[1/15] Fetching swift-nio-zlib-support
Fetched https://github.com/apple/swift-nio-zlib-support.git from cache (0.58s)
Computing version for https://github.com/apple/swift-nio-zlib-support.git
Computed https://github.com/apple/swift-nio-zlib-support.git at 1.0.0 (0.53s)
Creating working copy for https://github.com/vapor/sockets
Working copy of https://github.com/vapor/sockets resolved at 2.2.4
Creating working copy for https://github.com/vapor/async.git
Working copy of https://github.com/vapor/async.git resolved at 1.0.0-rc.1.1
Creating working copy for https://github.com/apple/swift-nio.git
Working copy of https://github.com/apple/swift-nio.git resolved at 1.14.4
Creating working copy for https://github.com/vapor/core.git
Working copy of https://github.com/vapor/core.git resolved at 3.10.1
Creating working copy for https://github.com/apple/swift-nio-zlib-support.git
Working copy of https://github.com/apple/swift-nio-zlib-support.git resolved at 1.0.0
Creating working copy for https://github.com/hjianbo/mqtt.git
Working copy of https://github.com/hjianbo/mqtt.git resolved at master (2af5589)
warning: 'swift-nio-zlib-support': ignoring declared target(s) 'swift-nio-zlib-support' in the system package
error: multiple packages ('async' (from 'https://github.com/vapor/async.git'), 'core' (from 'https://github.com/vapor/core.git')) declare products with a conflicting name: 'Async’; product names need to be unique across the package graph
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $PWD
https://github.com/hjianbo/mqtt.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/8] Write sources
[7/8] Write swift-version--7754E27361AE5C74.txt
[9/31] Emitting module Debugging
[10/31] Compiling Debugging Debuggable.swift
[11/31] Compiling Bits String+BytesConvertible.swift
[12/31] Compiling Bits UnsignedInteger+BytesConvertible.swift
[13/32] Compiling Bits UnsignedInteger+Shifting.swift
[14/32] Compiling Bits HexEncoder.swift
[15/32] Compiling Bits Operators.swift
[16/32] Emitting module libc
[17/32] Compiling libc libc.swift
[18/32] Compiling Bits Byte+Random.swift
[19/32] Compiling Bits Byte+UTF8Numbers.swift
[20/32] Compiling Bits ByteSequence+Conversions.swift
[21/32] Compiling Bits Bytes+Base64.swift
[22/32] Compiling Bits Byte+Convenience.swift
[23/32] Compiling Bits Byte+PatternMatching.swift
[24/32] Emitting module Bits
[25/32] Compiling Bits Byte+Alphabet.swift
[26/32] Compiling Bits Byte+ControlCharacters.swift
[27/32] Compiling Bits Aliases.swift
[28/32] Compiling Bits Base64Encoder.swift
[29/32] Compiling Bits BytesConvertible.swift
[30/32] Compiling Bits Data+BytesConvertible.swift
[31/32] Compiling Bits Bytes+Hex.swift
[32/32] Compiling Bits Bytes+Percent.swift
[33/54] Emitting module Core
[34/56] Compiling Core DispatchTime+Utilities.swift
[35/56] Compiling Core EmptyInitializable.swift
[36/56] Compiling Core Exports.swift
[37/56] Compiling Core Sequence.swift
[38/56] Compiling Core StaticDataBuffer.swift
[39/56] Compiling Core String.swift
[40/56] Compiling Core WorkingDirectory.swift
[41/56] Compiling Core Int+Hex.swift
[42/56] Compiling Core Lock.swift
[43/56] Compiling Core Extendable.swift
[44/56] Compiling Core FileProtocol.swift
[45/56] Compiling Core Portal.swift
[46/56] Compiling Core RFC1123.swift
[47/56] Compiling Core Collection+Safe.swift
[48/56] Compiling Core DataFile.swift
[49/56] Compiling Core Dispatch.swift
[50/56] Compiling Core Result.swift
[51/56] Compiling Core Semaphore.swift
[52/56] Compiling Core String+CaseInsensitiveCompare.swift
[53/56] Compiling Core String+Polymorphic.swift
[54/56] Compiling Core Array.swift
[55/56] Compiling Core Bits.swift
[56/56] Compiling Core Cache.swift
[57/66] Compiling Transport Stream.swift
[58/66] Compiling Transport StreamError.swift
[59/67] Compiling Transport ReadableStream.swift
[60/67] Compiling Transport ServerStream.swift
[61/67] Compiling Transport Port.swift
[62/67] Compiling Transport InternetStream.swift
[63/67] Compiling Transport ClientStream.swift
[64/67] Compiling Transport Exports.swift
[65/67] Emitting module Transport
[66/67] Compiling Transport FoundationStream.swift
[67/67] Compiling Transport WriteableStream.swift
[68/88] Emitting module Sockets
[69/90] Compiling Sockets Socket.swift
[70/90] Compiling Sockets SocketOptions.swift
[71/90] Compiling Sockets TCPReadableSocket.swift
[72/90] Compiling Sockets TCPSocket.swift
[73/90] Compiling Sockets Config.swift
[74/90] Compiling Sockets Descriptor.swift
[75/90] Compiling Sockets RawSocket.swift
[76/90] Compiling Sockets Select.swift
[77/90] Compiling Sockets TCPWriteableSocket.swift
[78/90] Compiling Sockets UDPSocket.swift
[79/90] Compiling Sockets InternetSocket.swift
[80/90] Compiling Sockets Pipe.swift
[81/90] Compiling Sockets TCPEstablishedSocket.swift
[82/90] Compiling Sockets TCPInternetSocket.swift
[83/90] Compiling Sockets Types.swift
[84/90] Compiling Sockets Exports.swift
[85/90] Compiling Sockets Address+C.swift
[86/90] Compiling Sockets Address.swift
[87/90] Compiling Sockets Buffer.swift
[88/90] Compiling Sockets Conversions.swift
[89/90] Compiling Sockets Error.swift
[90/90] Compiling Sockets FDSet.swift
[91/109] Compiling Mqtt SubscribePacket.swift
[92/109] Compiling Mqtt UnsubAckPacket.swift
[93/111] Compiling Mqtt ConnAckPacket.swift
[94/111] Compiling Mqtt ConnectPacket.swift
[95/111] Compiling Mqtt PingReqPacket.swift
[96/111] Compiling Mqtt PingRespPacket.swift
[97/111] Compiling Mqtt PubAckPacket.swift
[98/111] Compiling Mqtt PubCompPacket.swift
[99/111] Compiling Mqtt DDLog.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mqtt/DDLog.swift:32:5: warning: var 'logLevel' is not concurrency-safe because it is nonisolated 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 nonisolated 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) {
[100/111] Compiling Mqtt Extension.swift
/Users/admin/builder/spi-builder-workspace/Sources/Mqtt/DDLog.swift:32:5: warning: var 'logLevel' is not concurrency-safe because it is nonisolated 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 nonisolated 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) {
[101/111] Emitting module Mqtt
/Users/admin/builder/spi-builder-workspace/Sources/Mqtt/DDLog.swift:32:5: warning: var 'logLevel' is not concurrency-safe because it is nonisolated 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 nonisolated 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) {
[102/111] Compiling Mqtt DisconnectPacket.swift
/Users/admin/builder/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 |
/Users/admin/builder/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 |
[103/111] Compiling Mqtt Packet.swift
/Users/admin/builder/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 |
/Users/admin/builder/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 |
[104/111] Compiling Mqtt PublishPacket.swift
[105/111] Compiling Mqtt SubAckPacket.swift
[106/111] Compiling Mqtt LocalStorage.swift
/Users/admin/builder/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 |
/Users/admin/builder/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 |
/Users/admin/builder/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 |                 }
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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)
/Users/admin/builder/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
/Users/admin/builder/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 |         }
/Users/admin/builder/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?
/Users/admin/builder/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 |         }
/Users/admin/builder/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 |     }
/Users/admin/builder/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
/Users/admin/builder/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)
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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 |         }
/Users/admin/builder/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
/Users/admin/builder/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 |         }
/Users/admin/builder/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 {
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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 |         }
/Users/admin/builder/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 |     }
/Users/admin/builder/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
[107/111] Compiling Mqtt MqttClient.swift
/Users/admin/builder/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 |
/Users/admin/builder/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 |
/Users/admin/builder/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 |                 }
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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)
/Users/admin/builder/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
/Users/admin/builder/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 |         }
/Users/admin/builder/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?
/Users/admin/builder/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 |         }
/Users/admin/builder/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 |     }
/Users/admin/builder/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
/Users/admin/builder/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)
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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 |         }
/Users/admin/builder/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
/Users/admin/builder/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 |         }
/Users/admin/builder/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 {
/Users/admin/builder/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
/Users/admin/builder/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
/Users/admin/builder/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 |         }
/Users/admin/builder/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 |     }
/Users/admin/builder/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
[108/111] Compiling Mqtt PubRecPacket.swift
[109/111] Compiling Mqtt PubRelPacket.swift
[110/111] Compiling Mqtt UnsubscribePacket.swift
/Users/admin/builder/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 | }
/Users/admin/builder/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 |
/Users/admin/builder/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 |                 }
/Users/admin/builder/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 |
/Users/admin/builder/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
[111/111] Compiling Mqtt Session.swift
/Users/admin/builder/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 | }
/Users/admin/builder/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 |
/Users/admin/builder/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 |                 }
/Users/admin/builder/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 |
/Users/admin/builder/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! (12.49s)
warning: 'spi-builder-workspace': Invalid Exclude '/Users/admin/builder/spi-builder-workspace/Sources/Mqtt/Examples': File not found.
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" : "/Users/admin/builder/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 '/Users/admin/builder/spi-builder-workspace/Sources/Mqtt/Examples': File not found.
Done.