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

Failed to build Telegrammer, reference 1.0.0-alpha.4.0.1 (cc49bf), with Swift 6.0 for Linux on 31 Oct 2024 21:26:07 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" 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

337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:339:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:339:52: warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                                    `- warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:364:17: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
362 |
363 |             queue.async(flags: .barrier) {
364 |                 self.array[index] = newValue
    |                 `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
365 |             }
366 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:364:37: warning: capture of 'newValue' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
362 |
363 |             queue.async(flags: .barrier) {
364 |                 self.array[index] = newValue
    |                                     `- warning: capture of 'newValue' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
365 |             }
366 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:390:31: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
388 |     func remove(_ element: Element, completion: (() -> Void)? = nil) {
389 |         queue.async(flags: .barrier) {
390 |             guard let index = self.array.firstIndex(of: element) else { return }
    |                               `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:390:57: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
388 |     func remove(_ element: Element, completion: (() -> Void)? = nil) {
389 |         queue.async(flags: .barrier) {
390 |             guard let index = self.array.firstIndex(of: element) else { return }
    |                                                         `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:392:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
390 |             guard let index = self.array.firstIndex(of: element) else { return }
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
393 |         }
394 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:392:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
390 |             guard let index = self.array.firstIndex(of: element) else { return }
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
393 |         }
394 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/BotClient.swift:71:28: warning: capture of 'self' with non-sendable type 'BotClient' in a `@Sendable` closure; this is an error in the Swift 6 language mode
11 | import AsyncHTTPClient
12 |
13 | public class BotClient {
   |              `- note: class 'BotClient' does not conform to the 'Sendable' protocol
14 |
15 |     let host: String
   :
69 |             .execute(request: request)
70 |             .flatMapThrowing({ (response) -> TelegramContainer<T> in
71 |                 return try self.decode(response: response)
   |                            `- warning: capture of 'self' with non-sendable type 'BotClient' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 |             })
73 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:55:17: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 53 |
 54 |         _ = worker.next().submit {
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
    |                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:40: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                                        `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:17: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:40: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                                        `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:67:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 65 |         running = false
 66 |         worker.next().execute {
 67 |             self.pollingPromise?.succeed(())
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 68 |         }
 69 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:33: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:85:33: warning: capture of 'requestBody' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 83 |                             }
 84 |                             if let last = updates.last {
 85 |                                 requestBody.offset = last.updateId + 1
    |                                 `- warning: capture of 'requestBody' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 86 |                             }
 87 |                         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:92:49: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 90 |                     case .failure(let error):
 91 |                         log.error(error.logMessage)
 92 |                         self.retryRequest(with: params, after: error)
    |                                                 `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 93 |                     }
 94 |                 })
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:54: warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                                      `- warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:73: warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                                                         `- warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:85:33: warning: mutation of captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 83 |                             }
 84 |                             if let last = updates.last {
 85 |                                 requestBody.offset = last.updateId + 1
    |                                 `- warning: mutation of captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 86 |                             }
 87 |                         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:89:56: warning: reference to captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 87 |                         }
 88 |                         self.isFirstRequest = false
 89 |                         self.scheduleLongpolling(with: requestBody)
    |                                                        `- warning: reference to captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 90 |                     case .failure(let error):
 91 |                         log.error(error.logMessage)
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:103:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
101 |     private func scheduleLongpolling(with params: Bot.GetUpdatesParams) {
102 |         _ = worker.next().scheduleTask(in: pollingInterval) { () -> Void in
103 |             self.longpolling(with: params)
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |         }
105 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:103:36: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 |     private func scheduleLongpolling(with params: Bot.GetUpdatesParams) {
102 |         _ = worker.next().scheduleTask(in: pollingInterval) { () -> Void in
103 |             self.longpolling(with: params)
    |                                    `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |         }
105 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:119:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
117 |
118 |         _ = worker.next().scheduleTask(in: pollingInterval, { () -> Void in
119 |             self.longpolling(with: params)
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |         })
121 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:119:36: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
117 |
118 |         _ = worker.next().scheduleTask(in: pollingInterval, { () -> Void in
119 |             self.longpolling(with: params)
    |                                    `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |         })
121 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:63:78: warning: capture of 'context' with non-sendable type 'ChannelHandlerContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |         let promise = self.keepAlive ? promise : (promise ?? context.eventLoop.makePromise())
 62 |         if !self.keepAlive {
 63 |             promise!.futureResult.whenComplete { (_: Result<Void, Error>) in context.close(promise: nil) }
    |                                                                              `- warning: capture of 'context' with non-sendable type 'ChannelHandlerContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 64 |         }
 65 |         self.handler = nil
/host/spi-builder-workspace/.build/checkouts/swift-nio/Sources/NIOCore/ChannelPipeline.swift:1507:20: note: class 'ChannelHandlerContext' does not conform to the 'Sendable' protocol
1505 | /// at the right point in time. Often, the right behaviour is to react to an event and then forward it to the next
1506 | /// `ChannelHandler`.
1507 | public final class ChannelHandlerContext: ChannelInvoker {
     |                    `- note: class 'ChannelHandlerContext' does not conform to the 'Sendable' protocol
1508 |     // visible for ChannelPipeline to modify
1509 |     fileprivate var next: Optional<ChannelHandlerContext>
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:173:48: warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
    :
171 |             .flatMap {
172 |                 channel.pipeline.addHandler(
173 |                     UpdatesHandler(dispatcher: self.handler)
    |                                                `- warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
174 |                 )
175 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:186:38: warning: converting non-sendable function value to '@Sendable (any Channel) -> EventLoopFuture<Void>' may introduce data races
184 |
185 |             // Set the handlers that are applied to the accepted Channels
186 |             .childChannelInitializer(childChannelInitializer)
    |                                      `- warning: converting non-sendable function value to '@Sendable (any Channel) -> EventLoopFuture<Void>' may introduce data races
187 |
188 |             // Enable SO_REUSEADDR for the accepted Channels
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:198:17: warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
    :
196 |             .bind(host: host, port: port)
197 |             .whenSuccess { (channel) in
198 |                 self.channel = channel
    |                 `- warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
199 |                 promise.succeed(())
200 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:103:28: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
101 |         return try listenWebhooks(on: config.ip, port: config.port)
102 |             .flatMapThrowing { _  -> Void in
103 |                 return try self.bot.setWebhook(params: params).whenComplete { (result) -> Void in
    |                            `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |                     switch result {
105 |                     case .success(let res):
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:103:56: warning: capture of 'params' with non-sendable type 'Bot.SetWebhookParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 |         return try listenWebhooks(on: config.ip, port: config.port)
102 |             .flatMapThrowing { _  -> Void in
103 |                 return try self.bot.setWebhook(params: params).whenComplete { (result) -> Void in
    |                                                        `- warning: capture of 'params' with non-sendable type 'Bot.SetWebhookParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |                     switch result {
105 |                     case .success(let res):
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+setWebhook.swift:7:12: note: consider making struct 'SetWebhookParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `setWebhook` method
 7 |     struct SetWebhookParams: MultipartEncodable {
   |            `- note: consider making struct 'SetWebhookParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// HTTPS url to send updates to. Use an empty string to remove webhook integration
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:122:21: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
120 |                 switch result {
121 |                 case .success:
122 |                     self.server = server
    |                     `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
123 |                     self.running = true
124 |                     log.info("HTTP server started on: \(host):\(port)")
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:122:35: warning: capture of 'server' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |                 switch result {
121 |                 case .success:
122 |                     self.server = server
    |                                   `- warning: capture of 'server' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
123 |                     self.running = true
124 |                     log.info("HTTP server started on: \(host):\(port)")
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:153:13: note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:139:17: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
137 |         try self.server?.stop()
138 |             .whenSuccess {
139 |                 self.running = false
    |                 `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
140 |                 promise.succeed(())
141 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
    |                                                `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
    |                                                `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
[1244/1261] Compiling Telegrammer TelegramEncodables.swift
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:207:13: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
205 |     func append(_ element: Element, completion: (() -> Void)? = nil) {
206 |         queue.async(flags: .barrier) {
207 |             self.array.append(element)
    |             `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 |             DispatchQueue.main.async { completion?() }
209 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:207:31: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
205 |     func append(_ element: Element, completion: (() -> Void)? = nil) {
206 |         queue.async(flags: .barrier) {
207 |             self.array.append(element)
    |                               `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 |             DispatchQueue.main.async { completion?() }
209 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:208:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
206 |         queue.async(flags: .barrier) {
207 |             self.array.append(element)
208 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
209 |         }
210 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:208:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
206 |         queue.async(flags: .barrier) {
207 |             self.array.append(element)
208 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
209 |         }
210 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:221:13: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
219 |     func append(_ elements: [Element], completion: (() -> Void)? = nil) {
220 |         queue.async(flags: .barrier) {
221 |             self.array += elements
    |             `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
222 |             DispatchQueue.main.async { completion?() }
223 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:221:27: warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
219 |     func append(_ elements: [Element], completion: (() -> Void)? = nil) {
220 |         queue.async(flags: .barrier) {
221 |             self.array += elements
    |                           `- warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
222 |             DispatchQueue.main.async { completion?() }
223 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:222:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
220 |         queue.async(flags: .barrier) {
221 |             self.array += elements
222 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
223 |         }
224 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:222:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
220 |         queue.async(flags: .barrier) {
221 |             self.array += elements
222 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
223 |         }
224 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:236:13: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
234 |     func insert(_ element: Element, at index: Int, completion: (() -> Void)? = nil) {
235 |         queue.async(flags: .barrier) {
236 |             self.array.insert(element, at: index)
    |             `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
237 |             DispatchQueue.main.async { completion?() }
238 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:236:31: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
234 |     func insert(_ element: Element, at index: Int, completion: (() -> Void)? = nil) {
235 |         queue.async(flags: .barrier) {
236 |             self.array.insert(element, at: index)
    |                               `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
237 |             DispatchQueue.main.async { completion?() }
238 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:237:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
235 |         queue.async(flags: .barrier) {
236 |             self.array.insert(element, at: index)
237 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
238 |         }
239 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:237:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
235 |         queue.async(flags: .barrier) {
236 |             self.array.insert(element, at: index)
237 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
238 |         }
239 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:249:27: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
247 |     func removeFirst(completion: ((Element) -> Void)? = nil) {
248 |         queue.async(flags: .barrier) {
249 |             let element = self.array.removeFirst()
    |                           `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
250 |             DispatchQueue.main.async { completion?(element) }
251 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:250:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
248 |         queue.async(flags: .barrier) {
249 |             let element = self.array.removeFirst()
250 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
251 |         }
252 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:250:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
248 |         queue.async(flags: .barrier) {
249 |             let element = self.array.removeFirst()
250 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
251 |         }
252 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:250:52: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
248 |         queue.async(flags: .barrier) {
249 |             let element = self.array.removeFirst()
250 |             DispatchQueue.main.async { completion?(element) }
    |                                                    `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
251 |         }
252 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> 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'
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:264:23: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
264 |             guard 0...self.array.count ~= k else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
265 |             self.array.removeFirst(k)
266 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in an isolated local function; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in an isolated local function; this is an error in the Swift 6 language mode
    |                                                `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> 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'
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:277:27: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
275 |     func removeLast(completion: ((Element) -> Void)? = nil) {
276 |         queue.async(flags: .barrier) {
277 |             let element = self.array.removeLast()
    |                           `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
278 |             DispatchQueue.main.async { completion?(element) }
279 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:278:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
276 |         queue.async(flags: .barrier) {
277 |             let element = self.array.removeLast()
278 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
279 |         }
280 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:278:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
276 |         queue.async(flags: .barrier) {
277 |             let element = self.array.removeLast()
278 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
279 |         }
280 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:278:52: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
276 |         queue.async(flags: .barrier) {
277 |             let element = self.array.removeLast()
278 |             DispatchQueue.main.async { completion?(element) }
    |                                                    `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
279 |         }
280 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> 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'
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:292:23: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
292 |             guard 0...self.array.count ~= k else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
293 |             self.array.removeLast(k)
294 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in an isolated local function; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in an isolated local function; this is an error in the Swift 6 language mode
    |                                                `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> 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'
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:306:27: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
304 |     func remove(at index: Int, completion: ((Element) -> Void)? = nil) {
305 |         queue.async(flags: .barrier) {
306 |             let element = self.array.remove(at: index)
    |                           `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
307 |             DispatchQueue.main.async { completion?(element) }
308 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:307:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
305 |         queue.async(flags: .barrier) {
306 |             let element = self.array.remove(at: index)
307 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
308 |         }
309 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:307:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
305 |         queue.async(flags: .barrier) {
306 |             let element = self.array.remove(at: index)
307 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
308 |         }
309 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:307:52: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
305 |         queue.async(flags: .barrier) {
306 |             let element = self.array.remove(at: index)
307 |             DispatchQueue.main.async { completion?(element) }
    |                                                    `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
308 |         }
309 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:322:31: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
320 |             var elements = [Element]()
321 |
322 |             while let index = self.array.firstIndex(where: predicate) {
    |                               `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
323 |                 elements.append(self.array.remove(at: index))
324 |             }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:322:60: warning: capture of 'predicate' with non-sendable type '(Element) -> Bool' in a `@Sendable` closure; this is an error in the Swift 6 language mode
320 |             var elements = [Element]()
321 |
322 |             while let index = self.array.firstIndex(where: predicate) {
    |                                                            |- warning: capture of 'predicate' with non-sendable type '(Element) -> Bool' 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'
323 |                 elements.append(self.array.remove(at: index))
324 |             }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:326:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             }
325 |
326 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
327 |         }
328 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:326:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             }
325 |
326 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
327 |         }
328 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:326:52: warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
324 |             }
325 |
326 |             DispatchQueue.main.async { completion?(elements) }
    |                                                    `- warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
327 |         }
328 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:326:52: warning: reference to captured var 'elements' in concurrently-executing code; this is an error in the Swift 6 language mode
324 |             }
325 |
326 |             DispatchQueue.main.async { completion?(elements) }
    |                                                    `- warning: reference to captured var 'elements' in concurrently-executing code; this is an error in the Swift 6 language mode
327 |         }
328 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:337:28: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
335 |     func removeAll(completion: (([Element]) -> Void)? = nil) {
336 |         queue.async(flags: .barrier) {
337 |             let elements = self.array
    |                            `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:339:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:339:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:339:52: warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                                    `- warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:364:17: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
362 |
363 |             queue.async(flags: .barrier) {
364 |                 self.array[index] = newValue
    |                 `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
365 |             }
366 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:364:37: warning: capture of 'newValue' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
362 |
363 |             queue.async(flags: .barrier) {
364 |                 self.array[index] = newValue
    |                                     `- warning: capture of 'newValue' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
365 |             }
366 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:390:31: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
388 |     func remove(_ element: Element, completion: (() -> Void)? = nil) {
389 |         queue.async(flags: .barrier) {
390 |             guard let index = self.array.firstIndex(of: element) else { return }
    |                               `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:390:57: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
388 |     func remove(_ element: Element, completion: (() -> Void)? = nil) {
389 |         queue.async(flags: .barrier) {
390 |             guard let index = self.array.firstIndex(of: element) else { return }
    |                                                         `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:392:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
390 |             guard let index = self.array.firstIndex(of: element) else { return }
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
393 |         }
394 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:392:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
390 |             guard let index = self.array.firstIndex(of: element) else { return }
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
393 |         }
394 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/BotClient.swift:71:28: warning: capture of 'self' with non-sendable type 'BotClient' in a `@Sendable` closure; this is an error in the Swift 6 language mode
11 | import AsyncHTTPClient
12 |
13 | public class BotClient {
   |              `- note: class 'BotClient' does not conform to the 'Sendable' protocol
14 |
15 |     let host: String
   :
69 |             .execute(request: request)
70 |             .flatMapThrowing({ (response) -> TelegramContainer<T> in
71 |                 return try self.decode(response: response)
   |                            `- warning: capture of 'self' with non-sendable type 'BotClient' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 |             })
73 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:55:17: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 53 |
 54 |         _ = worker.next().submit {
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
    |                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:40: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                                        `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:17: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:40: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                                        `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:67:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 65 |         running = false
 66 |         worker.next().execute {
 67 |             self.pollingPromise?.succeed(())
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 68 |         }
 69 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:33: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:85:33: warning: capture of 'requestBody' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 83 |                             }
 84 |                             if let last = updates.last {
 85 |                                 requestBody.offset = last.updateId + 1
    |                                 `- warning: capture of 'requestBody' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 86 |                             }
 87 |                         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:92:49: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 90 |                     case .failure(let error):
 91 |                         log.error(error.logMessage)
 92 |                         self.retryRequest(with: params, after: error)
    |                                                 `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 93 |                     }
 94 |                 })
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:54: warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                                      `- warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:73: warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                                                         `- warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:85:33: warning: mutation of captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 83 |                             }
 84 |                             if let last = updates.last {
 85 |                                 requestBody.offset = last.updateId + 1
    |                                 `- warning: mutation of captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 86 |                             }
 87 |                         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:89:56: warning: reference to captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 87 |                         }
 88 |                         self.isFirstRequest = false
 89 |                         self.scheduleLongpolling(with: requestBody)
    |                                                        `- warning: reference to captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 90 |                     case .failure(let error):
 91 |                         log.error(error.logMessage)
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:103:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
101 |     private func scheduleLongpolling(with params: Bot.GetUpdatesParams) {
102 |         _ = worker.next().scheduleTask(in: pollingInterval) { () -> Void in
103 |             self.longpolling(with: params)
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |         }
105 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:103:36: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 |     private func scheduleLongpolling(with params: Bot.GetUpdatesParams) {
102 |         _ = worker.next().scheduleTask(in: pollingInterval) { () -> Void in
103 |             self.longpolling(with: params)
    |                                    `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |         }
105 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:119:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
117 |
118 |         _ = worker.next().scheduleTask(in: pollingInterval, { () -> Void in
119 |             self.longpolling(with: params)
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |         })
121 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:119:36: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
117 |
118 |         _ = worker.next().scheduleTask(in: pollingInterval, { () -> Void in
119 |             self.longpolling(with: params)
    |                                    `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |         })
121 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:63:78: warning: capture of 'context' with non-sendable type 'ChannelHandlerContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |         let promise = self.keepAlive ? promise : (promise ?? context.eventLoop.makePromise())
 62 |         if !self.keepAlive {
 63 |             promise!.futureResult.whenComplete { (_: Result<Void, Error>) in context.close(promise: nil) }
    |                                                                              `- warning: capture of 'context' with non-sendable type 'ChannelHandlerContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 64 |         }
 65 |         self.handler = nil
/host/spi-builder-workspace/.build/checkouts/swift-nio/Sources/NIOCore/ChannelPipeline.swift:1507:20: note: class 'ChannelHandlerContext' does not conform to the 'Sendable' protocol
1505 | /// at the right point in time. Often, the right behaviour is to react to an event and then forward it to the next
1506 | /// `ChannelHandler`.
1507 | public final class ChannelHandlerContext: ChannelInvoker {
     |                    `- note: class 'ChannelHandlerContext' does not conform to the 'Sendable' protocol
1508 |     // visible for ChannelPipeline to modify
1509 |     fileprivate var next: Optional<ChannelHandlerContext>
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:173:48: warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
    :
171 |             .flatMap {
172 |                 channel.pipeline.addHandler(
173 |                     UpdatesHandler(dispatcher: self.handler)
    |                                                `- warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
174 |                 )
175 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:186:38: warning: converting non-sendable function value to '@Sendable (any Channel) -> EventLoopFuture<Void>' may introduce data races
184 |
185 |             // Set the handlers that are applied to the accepted Channels
186 |             .childChannelInitializer(childChannelInitializer)
    |                                      `- warning: converting non-sendable function value to '@Sendable (any Channel) -> EventLoopFuture<Void>' may introduce data races
187 |
188 |             // Enable SO_REUSEADDR for the accepted Channels
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:198:17: warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
    :
196 |             .bind(host: host, port: port)
197 |             .whenSuccess { (channel) in
198 |                 self.channel = channel
    |                 `- warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
199 |                 promise.succeed(())
200 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:103:28: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
101 |         return try listenWebhooks(on: config.ip, port: config.port)
102 |             .flatMapThrowing { _  -> Void in
103 |                 return try self.bot.setWebhook(params: params).whenComplete { (result) -> Void in
    |                            `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |                     switch result {
105 |                     case .success(let res):
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:103:56: warning: capture of 'params' with non-sendable type 'Bot.SetWebhookParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 |         return try listenWebhooks(on: config.ip, port: config.port)
102 |             .flatMapThrowing { _  -> Void in
103 |                 return try self.bot.setWebhook(params: params).whenComplete { (result) -> Void in
    |                                                        `- warning: capture of 'params' with non-sendable type 'Bot.SetWebhookParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |                     switch result {
105 |                     case .success(let res):
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+setWebhook.swift:7:12: note: consider making struct 'SetWebhookParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `setWebhook` method
 7 |     struct SetWebhookParams: MultipartEncodable {
   |            `- note: consider making struct 'SetWebhookParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// HTTPS url to send updates to. Use an empty string to remove webhook integration
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:122:21: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
120 |                 switch result {
121 |                 case .success:
122 |                     self.server = server
    |                     `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
123 |                     self.running = true
124 |                     log.info("HTTP server started on: \(host):\(port)")
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:122:35: warning: capture of 'server' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |                 switch result {
121 |                 case .success:
122 |                     self.server = server
    |                                   `- warning: capture of 'server' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
123 |                     self.running = true
124 |                     log.info("HTTP server started on: \(host):\(port)")
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:153:13: note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:139:17: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
137 |         try self.server?.stop()
138 |             .whenSuccess {
139 |                 self.running = false
    |                 `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
140 |                 promise.succeed(())
141 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
    |                                                `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
    |                                                `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
[1245/1261] Compiling Telegrammer Updater.swift
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:207:13: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
205 |     func append(_ element: Element, completion: (() -> Void)? = nil) {
206 |         queue.async(flags: .barrier) {
207 |             self.array.append(element)
    |             `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 |             DispatchQueue.main.async { completion?() }
209 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:207:31: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
205 |     func append(_ element: Element, completion: (() -> Void)? = nil) {
206 |         queue.async(flags: .barrier) {
207 |             self.array.append(element)
    |                               `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 |             DispatchQueue.main.async { completion?() }
209 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:208:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
206 |         queue.async(flags: .barrier) {
207 |             self.array.append(element)
208 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
209 |         }
210 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:208:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
206 |         queue.async(flags: .barrier) {
207 |             self.array.append(element)
208 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
209 |         }
210 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:221:13: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
219 |     func append(_ elements: [Element], completion: (() -> Void)? = nil) {
220 |         queue.async(flags: .barrier) {
221 |             self.array += elements
    |             `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
222 |             DispatchQueue.main.async { completion?() }
223 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:221:27: warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
219 |     func append(_ elements: [Element], completion: (() -> Void)? = nil) {
220 |         queue.async(flags: .barrier) {
221 |             self.array += elements
    |                           `- warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
222 |             DispatchQueue.main.async { completion?() }
223 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:222:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
220 |         queue.async(flags: .barrier) {
221 |             self.array += elements
222 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
223 |         }
224 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:222:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
220 |         queue.async(flags: .barrier) {
221 |             self.array += elements
222 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
223 |         }
224 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:236:13: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
234 |     func insert(_ element: Element, at index: Int, completion: (() -> Void)? = nil) {
235 |         queue.async(flags: .barrier) {
236 |             self.array.insert(element, at: index)
    |             `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
237 |             DispatchQueue.main.async { completion?() }
238 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:236:31: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
234 |     func insert(_ element: Element, at index: Int, completion: (() -> Void)? = nil) {
235 |         queue.async(flags: .barrier) {
236 |             self.array.insert(element, at: index)
    |                               `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
237 |             DispatchQueue.main.async { completion?() }
238 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:237:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
235 |         queue.async(flags: .barrier) {
236 |             self.array.insert(element, at: index)
237 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
238 |         }
239 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:237:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
235 |         queue.async(flags: .barrier) {
236 |             self.array.insert(element, at: index)
237 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
238 |         }
239 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:249:27: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
247 |     func removeFirst(completion: ((Element) -> Void)? = nil) {
248 |         queue.async(flags: .barrier) {
249 |             let element = self.array.removeFirst()
    |                           `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
250 |             DispatchQueue.main.async { completion?(element) }
251 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:250:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
248 |         queue.async(flags: .barrier) {
249 |             let element = self.array.removeFirst()
250 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
251 |         }
252 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:250:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
248 |         queue.async(flags: .barrier) {
249 |             let element = self.array.removeFirst()
250 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
251 |         }
252 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:250:52: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
248 |         queue.async(flags: .barrier) {
249 |             let element = self.array.removeFirst()
250 |             DispatchQueue.main.async { completion?(element) }
    |                                                    `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
251 |         }
252 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> 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'
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:264:23: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
264 |             guard 0...self.array.count ~= k else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
265 |             self.array.removeFirst(k)
266 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in an isolated local function; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in an isolated local function; this is an error in the Swift 6 language mode
    |                                                `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> 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'
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:277:27: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
275 |     func removeLast(completion: ((Element) -> Void)? = nil) {
276 |         queue.async(flags: .barrier) {
277 |             let element = self.array.removeLast()
    |                           `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
278 |             DispatchQueue.main.async { completion?(element) }
279 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:278:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
276 |         queue.async(flags: .barrier) {
277 |             let element = self.array.removeLast()
278 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
279 |         }
280 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:278:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
276 |         queue.async(flags: .barrier) {
277 |             let element = self.array.removeLast()
278 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
279 |         }
280 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:278:52: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
276 |         queue.async(flags: .barrier) {
277 |             let element = self.array.removeLast()
278 |             DispatchQueue.main.async { completion?(element) }
    |                                                    `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
279 |         }
280 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> 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'
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:292:23: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
292 |             guard 0...self.array.count ~= k else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
293 |             self.array.removeLast(k)
294 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in an isolated local function; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> Void)?' in an isolated local function; this is an error in the Swift 6 language mode
    |                                                `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: capture of 'completion' with non-sendable type '(() -> 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'
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:306:27: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
304 |     func remove(at index: Int, completion: ((Element) -> Void)? = nil) {
305 |         queue.async(flags: .barrier) {
306 |             let element = self.array.remove(at: index)
    |                           `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
307 |             DispatchQueue.main.async { completion?(element) }
308 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:307:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
305 |         queue.async(flags: .barrier) {
306 |             let element = self.array.remove(at: index)
307 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
308 |         }
309 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:307:40: warning: capture of 'completion' with non-sendable type '((Element) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
305 |         queue.async(flags: .barrier) {
306 |             let element = self.array.remove(at: index)
307 |             DispatchQueue.main.async { completion?(element) }
    |                                        |- warning: capture of 'completion' with non-sendable type '((Element) -> 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'
308 |         }
309 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:307:52: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
305 |         queue.async(flags: .barrier) {
306 |             let element = self.array.remove(at: index)
307 |             DispatchQueue.main.async { completion?(element) }
    |                                                    `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
308 |         }
309 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:322:31: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
320 |             var elements = [Element]()
321 |
322 |             while let index = self.array.firstIndex(where: predicate) {
    |                               `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
323 |                 elements.append(self.array.remove(at: index))
324 |             }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:322:60: warning: capture of 'predicate' with non-sendable type '(Element) -> Bool' in a `@Sendable` closure; this is an error in the Swift 6 language mode
320 |             var elements = [Element]()
321 |
322 |             while let index = self.array.firstIndex(where: predicate) {
    |                                                            |- warning: capture of 'predicate' with non-sendable type '(Element) -> Bool' 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'
323 |                 elements.append(self.array.remove(at: index))
324 |             }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:326:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             }
325 |
326 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
327 |         }
328 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:326:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
324 |             }
325 |
326 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
327 |         }
328 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:326:52: warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
324 |             }
325 |
326 |             DispatchQueue.main.async { completion?(elements) }
    |                                                    `- warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
327 |         }
328 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:326:52: warning: reference to captured var 'elements' in concurrently-executing code; this is an error in the Swift 6 language mode
324 |             }
325 |
326 |             DispatchQueue.main.async { completion?(elements) }
    |                                                    `- warning: reference to captured var 'elements' in concurrently-executing code; this is an error in the Swift 6 language mode
327 |         }
328 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:337:28: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
335 |     func removeAll(completion: (([Element]) -> Void)? = nil) {
336 |         queue.async(flags: .barrier) {
337 |             let elements = self.array
    |                            `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:339:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:339:40: warning: capture of 'completion' with non-sendable type '(([Element]) -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                        |- warning: capture of 'completion' with non-sendable type '(([Element]) -> 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'
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:339:52: warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
337 |             let elements = self.array
338 |             self.array.removeAll()
339 |             DispatchQueue.main.async { completion?(elements) }
    |                                                    `- warning: capture of 'elements' with non-sendable type '[Element]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
340 |         }
341 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:364:17: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
362 |
363 |             queue.async(flags: .barrier) {
364 |                 self.array[index] = newValue
    |                 `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
365 |             }
366 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:364:37: warning: capture of 'newValue' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
362 |
363 |             queue.async(flags: .barrier) {
364 |                 self.array[index] = newValue
    |                                     `- warning: capture of 'newValue' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
365 |             }
366 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:390:31: warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |              `- note: generic class 'SynchronizedArray' does not conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
388 |     func remove(_ element: Element, completion: (() -> Void)? = nil) {
389 |         queue.async(flags: .barrier) {
390 |             guard let index = self.array.firstIndex(of: element) else { return }
    |                               `- warning: capture of 'self' with non-sendable type 'SynchronizedArray<Element>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:390:57: warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// A thread-safe array.
 13 | public class SynchronizedArray<Element> {
    |                                `- note: consider making generic parameter 'Element' conform to the 'Sendable' protocol
 14 |     private let queue = DispatchQueue(label: "SynchronizedArray_\(UUID().uuidString)", attributes: .concurrent)
 15 |     private var array = [Element]()
    :
388 |     func remove(_ element: Element, completion: (() -> Void)? = nil) {
389 |         queue.async(flags: .barrier) {
390 |             guard let index = self.array.firstIndex(of: element) else { return }
    |                                                         `- warning: capture of 'element' with non-sendable type 'Element' in a `@Sendable` closure; this is an error in the Swift 6 language mode
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:392:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
390 |             guard let index = self.array.firstIndex(of: element) else { return }
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
393 |         }
394 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:392:40: warning: capture of 'completion' with non-sendable type '(() -> Void)?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
390 |             guard let index = self.array.firstIndex(of: element) else { return }
391 |             self.array.remove(at: index)
392 |             DispatchQueue.main.async { completion?() }
    |                                        |- warning: capture of 'completion' with non-sendable type '(() -> 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'
393 |         }
394 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/BotClient.swift:71:28: warning: capture of 'self' with non-sendable type 'BotClient' in a `@Sendable` closure; this is an error in the Swift 6 language mode
11 | import AsyncHTTPClient
12 |
13 | public class BotClient {
   |              `- note: class 'BotClient' does not conform to the 'Sendable' protocol
14 |
15 |     let host: String
   :
69 |             .execute(request: request)
70 |             .flatMapThrowing({ (response) -> TelegramContainer<T> in
71 |                 return try self.decode(response: response)
   |                            `- warning: capture of 'self' with non-sendable type 'BotClient' in a `@Sendable` closure; this is an error in the Swift 6 language mode
72 |             })
73 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:55:17: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 53 |
 54 |         _ = worker.next().submit {
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
    |                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:40: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                                        `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:17: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:57:40: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 55 |             try self.bot.deleteWebhook().whenSuccess { (success) in
 56 |                 guard success else { return }
 57 |                 self.longpolling(with: params)
    |                                        `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             }
 59 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:67:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 65 |         running = false
 66 |         worker.next().execute {
 67 |             self.pollingPromise?.succeed(())
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 68 |         }
 69 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:33: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                 `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:85:33: warning: capture of 'requestBody' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 83 |                             }
 84 |                             if let last = updates.last {
 85 |                                 requestBody.offset = last.updateId + 1
    |                                 `- warning: capture of 'requestBody' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 86 |                             }
 87 |                         }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:92:49: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 90 |                     case .failure(let error):
 91 |                         log.error(error.logMessage)
 92 |                         self.retryRequest(with: params, after: error)
    |                                                 `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 93 |                     }
 94 |                 })
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:54: warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                                      `- warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:81:73: warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
 79 |                         log.debug(Logger.Message(stringLiteral: updates.description))
 80 |                         if !updates.isEmpty {
 81 |                             if !self.cleanStart || !(self.cleanStart && self.isFirstRequest) {
    |                                                                         `- warning: implicit capture of 'self' requires that 'Longpolling' conforms to `Sendable`; this is an error in the Swift 6 language mode
 82 |                                 self.dispatcher.enqueue(updates: updates)
 83 |                             }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:85:33: warning: mutation of captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 83 |                             }
 84 |                             if let last = updates.last {
 85 |                                 requestBody.offset = last.updateId + 1
    |                                 `- warning: mutation of captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 86 |                             }
 87 |                         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:89:56: warning: reference to captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 87 |                         }
 88 |                         self.isFirstRequest = false
 89 |                         self.scheduleLongpolling(with: requestBody)
    |                                                        `- warning: reference to captured var 'requestBody' in concurrently-executing code; this is an error in the Swift 6 language mode
 90 |                     case .failure(let error):
 91 |                         log.error(error.logMessage)
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:103:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
101 |     private func scheduleLongpolling(with params: Bot.GetUpdatesParams) {
102 |         _ = worker.next().scheduleTask(in: pollingInterval) { () -> Void in
103 |             self.longpolling(with: params)
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |         }
105 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:103:36: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 |     private func scheduleLongpolling(with params: Bot.GetUpdatesParams) {
102 |         _ = worker.next().scheduleTask(in: pollingInterval) { () -> Void in
103 |             self.longpolling(with: params)
    |                                    `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |         }
105 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:119:13: warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 | import AsyncHTTPClient
 12 |
 13 | public class Longpolling: Connection {
    |              `- note: class 'Longpolling' does not conform to the 'Sendable' protocol
 14 |
 15 |     public var bot: Bot
    :
117 |
118 |         _ = worker.next().scheduleTask(in: pollingInterval, { () -> Void in
119 |             self.longpolling(with: params)
    |             `- warning: capture of 'self' with non-sendable type 'Longpolling' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |         })
121 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Longpolling.swift:119:36: warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
117 |
118 |         _ = worker.next().scheduleTask(in: pollingInterval, { () -> Void in
119 |             self.longpolling(with: params)
    |                                    `- warning: capture of 'params' with non-sendable type 'Bot.GetUpdatesParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |         })
121 |     }
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+getUpdates.swift:7:12: note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `getUpdates` method
 7 |     struct GetUpdatesParams: JSONEncodable {
   |            `- note: consider making struct 'GetUpdatesParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will forgotten.
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:63:78: warning: capture of 'context' with non-sendable type 'ChannelHandlerContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |         let promise = self.keepAlive ? promise : (promise ?? context.eventLoop.makePromise())
 62 |         if !self.keepAlive {
 63 |             promise!.futureResult.whenComplete { (_: Result<Void, Error>) in context.close(promise: nil) }
    |                                                                              `- warning: capture of 'context' with non-sendable type 'ChannelHandlerContext' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 64 |         }
 65 |         self.handler = nil
/host/spi-builder-workspace/.build/checkouts/swift-nio/Sources/NIOCore/ChannelPipeline.swift:1507:20: note: class 'ChannelHandlerContext' does not conform to the 'Sendable' protocol
1505 | /// at the right point in time. Often, the right behaviour is to react to an event and then forward it to the next
1506 | /// `ChannelHandler`.
1507 | public final class ChannelHandlerContext: ChannelInvoker {
     |                    `- note: class 'ChannelHandlerContext' does not conform to the 'Sendable' protocol
1508 |     // visible for ChannelPipeline to modify
1509 |     fileprivate var next: Optional<ChannelHandlerContext>
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:173:48: warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
    :
171 |             .flatMap {
172 |                 channel.pipeline.addHandler(
173 |                     UpdatesHandler(dispatcher: self.handler)
    |                                                `- warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
174 |                 )
175 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:186:38: warning: converting non-sendable function value to '@Sendable (any Channel) -> EventLoopFuture<Void>' may introduce data races
184 |
185 |             // Set the handlers that are applied to the accepted Channels
186 |             .childChannelInitializer(childChannelInitializer)
    |                                      `- warning: converting non-sendable function value to '@Sendable (any Channel) -> EventLoopFuture<Void>' may introduce data races
187 |
188 |             // Enable SO_REUSEADDR for the accepted Channels
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:198:17: warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
    :
196 |             .bind(host: host, port: port)
197 |             .whenSuccess { (channel) in
198 |                 self.channel = channel
    |                 `- warning: capture of 'self' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
199 |                 promise.succeed(())
200 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:103:28: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
101 |         return try listenWebhooks(on: config.ip, port: config.port)
102 |             .flatMapThrowing { _  -> Void in
103 |                 return try self.bot.setWebhook(params: params).whenComplete { (result) -> Void in
    |                            `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |                     switch result {
105 |                     case .success(let res):
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:103:56: warning: capture of 'params' with non-sendable type 'Bot.SetWebhookParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 |         return try listenWebhooks(on: config.ip, port: config.port)
102 |             .flatMapThrowing { _  -> Void in
103 |                 return try self.bot.setWebhook(params: params).whenComplete { (result) -> Void in
    |                                                        `- warning: capture of 'params' with non-sendable type 'Bot.SetWebhookParams' in a `@Sendable` closure; this is an error in the Swift 6 language mode
104 |                     switch result {
105 |                     case .success(let res):
/host/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Methods/Bot+setWebhook.swift:7:12: note: consider making struct 'SetWebhookParams' conform to the 'Sendable' protocol
 5 |
 6 |     /// Parameters container struct for `setWebhook` method
 7 |     struct SetWebhookParams: MultipartEncodable {
   |            `- note: consider making struct 'SetWebhookParams' conform to the 'Sendable' protocol
 8 |
 9 |         /// HTTPS url to send updates to. Use an empty string to remove webhook integration
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:122:21: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
120 |                 switch result {
121 |                 case .success:
122 |                     self.server = server
    |                     `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
123 |                     self.running = true
124 |                     log.info("HTTP server started on: \(host):\(port)")
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:122:35: warning: capture of 'server' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 |                 switch result {
121 |                 case .success:
122 |                     self.server = server
    |                                   `- warning: capture of 'server' with non-sendable type 'UpdatesServer' in a `@Sendable` closure; this is an error in the Swift 6 language mode
123 |                     self.running = true
124 |                     log.info("HTTP server started on: \(host):\(port)")
/host/spi-builder-workspace/Sources/Telegrammer/Network/UpdatesServer.swift:153:13: note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
151 | }
152 |
153 | final class UpdatesServer {
    |             `- note: class 'UpdatesServer' does not conform to the 'Sendable' protocol
154 |     let host: String
155 |     let port: Int
/host/spi-builder-workspace/Sources/Telegrammer/Network/Webhooks.swift:139:17: warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 11 |
 12 | /// Will take care of you Telegram webhooks updates
 13 | public class Webhooks: Connection {
    |              `- note: class 'Webhooks' does not conform to the 'Sendable' protocol
 14 |
 15 |     public struct Config {
    :
137 |         try self.server?.stop()
138 |             .whenSuccess {
139 |                 self.running = false
    |                 `- warning: capture of 'self' with non-sendable type 'Webhooks' in a `@Sendable` closure; this is an error in the Swift 6 language mode
140 |                 promise.succeed(())
141 |         }
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:263:48: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
261 |     func removeFirst(_ k: Int, completion: (() -> Void)? = nil) {
262 |         queue.async(flags: .barrier) {
263 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
    |                                                `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
264 |             guard 0...self.array.count ~= k else { return }
265 |             self.array.removeFirst(k)
/host/spi-builder-workspace/Sources/Telegrammer/Helpers/SynchronizedArray.swift:291:48: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
289 |     func removeLast(_ k: Int, completion: (() -> Void)? = nil) {
290 |         queue.async(flags: .barrier) {
291 |             defer { DispatchQueue.main.async { completion?() } }
    |                                                |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
    |                                                `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
292 |             guard 0...self.array.count ~= k else { return }
293 |             self.array.removeLast(k)
[1246/1264] Wrapping AST for Telegrammer for debugging
[1248/1279] Compiling DemoWebhooksLocally main.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[1249/1279] Emitting module DemoEchoBot
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:66:55: warning: reference to class property 'text' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
64 |
65 |     ///Creating and adding handler for ordinary text messages
66 |     let echoHandler = MessageHandler(filters: Filters.text, callback: echoResponse)
   |                                                       `- warning: reference to class property 'text' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
67 |     dispatcher.add(handler: echoHandler)
68 |
/host/spi-builder-workspace/Sources/Telegrammer/Filters/TextFilter.swift:22:16: note: class property declared here
20 |
21 | public extension Filters {
22 |     static var text = Filters(filter: TextFilter())
   |                `- note: class property declared here
23 | }
24 |
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:32:17: error: main actor-isolated var 'userEchoModes' can not be referenced from a nonisolated context
22 |
23 | /// Dictionary for user echo modes
24 | var userEchoModes: [Int64: Bool] = [:]
   |     `- note: var declared here
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
27 | func echoModeSwitch(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoModeSwitch' part of global actor 'MainActor'
28 |     guard let message = update.message,
29 |         let user = message.from else { return }
30 |
31 |     var onText = ""
32 |     if let on = userEchoModes[user.id] {
   |                 `- error: main actor-isolated var 'userEchoModes' can not be referenced from a nonisolated context
33 |         onText = on ? "OFF" : "ON"
34 |         userEchoModes[user.id] = !on
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:34:9: error: main actor-isolated var 'userEchoModes' can not be mutated from a nonisolated context
22 |
23 | /// Dictionary for user echo modes
24 | var userEchoModes: [Int64: Bool] = [:]
   |     `- note: mutation of this var is only permitted within the actor
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
27 | func echoModeSwitch(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoModeSwitch' part of global actor 'MainActor'
28 |     guard let message = update.message,
29 |         let user = message.from else { return }
   :
32 |     if let on = userEchoModes[user.id] {
33 |         onText = on ? "OFF" : "ON"
34 |         userEchoModes[user.id] = !on
   |         `- error: main actor-isolated var 'userEchoModes' can not be mutated from a nonisolated context
35 |     } else {
36 |         onText = "ON"
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:37:9: error: main actor-isolated var 'userEchoModes' can not be mutated from a nonisolated context
22 |
23 | /// Dictionary for user echo modes
24 | var userEchoModes: [Int64: Bool] = [:]
   |     `- note: mutation of this var is only permitted within the actor
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
27 | func echoModeSwitch(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoModeSwitch' part of global actor 'MainActor'
28 |     guard let message = update.message,
29 |         let user = message.from else { return }
   :
35 |     } else {
36 |         onText = "ON"
37 |         userEchoModes[user.id] = true
   |         `- error: main actor-isolated var 'userEchoModes' can not be mutated from a nonisolated context
38 |     }
39 |
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:44:9: warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | //)
20 |
21 | let bot = try! Bot(settings: settings)
   |     `- note: let declared here
22 |
23 | /// Dictionary for user echo modes
   :
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
27 | func echoModeSwitch(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoModeSwitch' part of global actor 'MainActor'
28 |     guard let message = update.message,
29 |         let user = message.from else { return }
   :
42 |         text: "Echo mode turned \(onText)"
43 |     )
44 |     try bot.sendMessage(params: params)
   |         `- warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
45 | }
46 |
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:51:18: error: main actor-isolated var 'userEchoModes' can not be referenced from a nonisolated context
22 |
23 | /// Dictionary for user echo modes
24 | var userEchoModes: [Int64: Bool] = [:]
   |     `- note: var declared here
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
   :
46 |
47 | ///Callback for Message handler, which send echo message to user
48 | func echoResponse(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoResponse' part of global actor 'MainActor'
49 |     guard let message = update.message,
50 |         let user = message.from,
51 |         let on = userEchoModes[user.id],
   |                  `- error: main actor-isolated var 'userEchoModes' can not be referenced from a nonisolated context
52 |         on == true else { return }
53 |     let params = Bot.SendMessageParams(chatId: .chat(message.chat.id), text: message.text!)
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:54:9: warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | //)
20 |
21 | let bot = try! Bot(settings: settings)
   |     `- note: let declared here
22 |
23 | /// Dictionary for user echo modes
   :
46 |
47 | ///Callback for Message handler, which send echo message to user
48 | func echoResponse(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoResponse' part of global actor 'MainActor'
49 |     guard let message = update.message,
50 |         let user = message.from,
   :
52 |         on == true else { return }
53 |     let params = Bot.SendMessageParams(chatId: .chat(message.chat.id), text: message.text!)
54 |     try bot.sendMessage(params: params)
   |         `- warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
55 | }
56 |
[1250/1279] Compiling DemoEchoBot main.swift
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:66:55: warning: reference to class property 'text' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
64 |
65 |     ///Creating and adding handler for ordinary text messages
66 |     let echoHandler = MessageHandler(filters: Filters.text, callback: echoResponse)
   |                                                       `- warning: reference to class property 'text' is not concurrency-safe because it involves shared mutable state; this is an error in the Swift 6 language mode
67 |     dispatcher.add(handler: echoHandler)
68 |
/host/spi-builder-workspace/Sources/Telegrammer/Filters/TextFilter.swift:22:16: note: class property declared here
20 |
21 | public extension Filters {
22 |     static var text = Filters(filter: TextFilter())
   |                `- note: class property declared here
23 | }
24 |
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:32:17: error: main actor-isolated var 'userEchoModes' can not be referenced from a nonisolated context
22 |
23 | /// Dictionary for user echo modes
24 | var userEchoModes: [Int64: Bool] = [:]
   |     `- note: var declared here
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
27 | func echoModeSwitch(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoModeSwitch' part of global actor 'MainActor'
28 |     guard let message = update.message,
29 |         let user = message.from else { return }
30 |
31 |     var onText = ""
32 |     if let on = userEchoModes[user.id] {
   |                 `- error: main actor-isolated var 'userEchoModes' can not be referenced from a nonisolated context
33 |         onText = on ? "OFF" : "ON"
34 |         userEchoModes[user.id] = !on
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:34:9: error: main actor-isolated var 'userEchoModes' can not be mutated from a nonisolated context
22 |
23 | /// Dictionary for user echo modes
24 | var userEchoModes: [Int64: Bool] = [:]
   |     `- note: mutation of this var is only permitted within the actor
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
27 | func echoModeSwitch(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoModeSwitch' part of global actor 'MainActor'
28 |     guard let message = update.message,
29 |         let user = message.from else { return }
   :
32 |     if let on = userEchoModes[user.id] {
33 |         onText = on ? "OFF" : "ON"
34 |         userEchoModes[user.id] = !on
   |         `- error: main actor-isolated var 'userEchoModes' can not be mutated from a nonisolated context
35 |     } else {
36 |         onText = "ON"
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:37:9: error: main actor-isolated var 'userEchoModes' can not be mutated from a nonisolated context
22 |
23 | /// Dictionary for user echo modes
24 | var userEchoModes: [Int64: Bool] = [:]
   |     `- note: mutation of this var is only permitted within the actor
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
27 | func echoModeSwitch(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoModeSwitch' part of global actor 'MainActor'
28 |     guard let message = update.message,
29 |         let user = message.from else { return }
   :
35 |     } else {
36 |         onText = "ON"
37 |         userEchoModes[user.id] = true
   |         `- error: main actor-isolated var 'userEchoModes' can not be mutated from a nonisolated context
38 |     }
39 |
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:44:9: warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | //)
20 |
21 | let bot = try! Bot(settings: settings)
   |     `- note: let declared here
22 |
23 | /// Dictionary for user echo modes
   :
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
27 | func echoModeSwitch(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoModeSwitch' part of global actor 'MainActor'
28 |     guard let message = update.message,
29 |         let user = message.from else { return }
   :
42 |         text: "Echo mode turned \(onText)"
43 |     )
44 |     try bot.sendMessage(params: params)
   |         `- warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
45 | }
46 |
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:51:18: error: main actor-isolated var 'userEchoModes' can not be referenced from a nonisolated context
22 |
23 | /// Dictionary for user echo modes
24 | var userEchoModes: [Int64: Bool] = [:]
   |     `- note: var declared here
25 |
26 | ///Callback for Command handler, which send Echo mode status for user
   :
46 |
47 | ///Callback for Message handler, which send echo message to user
48 | func echoResponse(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoResponse' part of global actor 'MainActor'
49 |     guard let message = update.message,
50 |         let user = message.from,
51 |         let on = userEchoModes[user.id],
   |                  `- error: main actor-isolated var 'userEchoModes' can not be referenced from a nonisolated context
52 |         on == true else { return }
53 |     let params = Bot.SendMessageParams(chatId: .chat(message.chat.id), text: message.text!)
/host/spi-builder-workspace/Sources/DemoEchoBot/main.swift:54:9: warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
19 | //)
20 |
21 | let bot = try! Bot(settings: settings)
   |     `- note: let declared here
22 |
23 | /// Dictionary for user echo modes
   :
46 |
47 | ///Callback for Message handler, which send echo message to user
48 | func echoResponse(_ update: Update, _ context: BotContext?) throws {
   |      `- note: add '@MainActor' to make global function 'echoResponse' part of global actor 'MainActor'
49 |     guard let message = update.message,
50 |         let user = message.from,
   :
52 |         on == true else { return }
53 |     let params = Bot.SendMessageParams(chatId: .chat(message.chat.id), text: message.text!)
54 |     try bot.sendMessage(params: params)
   |         `- warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
55 | }
56 |
error: emit-module command failed with exit code 1 (use -v to see invocation)
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:45:13: warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 22 | //)
 23 |
 24 | let bot = try! Bot(settings: settings)
    |     `- note: let declared here
 25 | let jobQueue = BasicJobQueue<Chat>(bot: bot)
 26 |
    :
 43 |             text: "Once, after \(interval) seconds: \(Date())"
 44 |         )
 45 |         try bot.sendMessage(params: params)
    |             `- warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 46 |     }
 47 |
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:48:13: warning: main actor-isolated let 'jobQueue' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 23 |
 24 | let bot = try! Bot(settings: settings)
 25 | let jobQueue = BasicJobQueue<Chat>(bot: bot)
    |     `- note: let declared here
 26 |
 27 | /// Dictionary for user echo modes
 28 | var userJobs: [Int64: String] = [:]
 29 |
 30 | func onceTimerStart(_ update: Update, _ context: BotContext?) throws {
    |      `- note: add '@MainActor' to make global function 'onceTimerStart' part of global actor 'MainActor'
 31 |     guard let message = update.message else { return }
 32 |
    :
 46 |     }
 47 |
 48 |     _ = try jobQueue.scheduleOnce(oneTimerJob)
    |             `- warning: main actor-isolated let 'jobQueue' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 49 | }
 50 |
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:63:8: error: main actor-isolated var 'userJobs' can not be referenced from a nonisolated context
 26 |
 27 | /// Dictionary for user echo modes
 28 | var userJobs: [Int64: String] = [:]
    |     `- note: var declared here
 29 |
 30 | func onceTimerStart(_ update: Update, _ context: BotContext?) throws {
    :
 49 | }
 50 |
 51 | func repeatedTimerStart(_ update: Update, _ context: BotContext?) throws {
    |      `- note: add '@MainActor' to make global function 'repeatedTimerStart' part of global actor 'MainActor'
 52 |     guard let message = update.message,
 53 |         let user = message.from else { return }
    :
 61 |     let secondsInterval = interval.nanoseconds / 1_000_000_000
 62 |
 63 |     if userJobs[user.id] == nil {
    |        `- error: main actor-isolated var 'userJobs' can not be referenced from a nonisolated context
 64 |         let timerJob = RepeatableJob(when: Date(), interval: interval, context: message.chat) { chat in
 65 |             guard let chat = chat else { return }
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:67:17: warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 22 | //)
 23 |
 24 | let bot = try! Bot(settings: settings)
    |     `- note: let declared here
 25 | let jobQueue = BasicJobQueue<Chat>(bot: bot)
 26 |
    :
 65 |             guard let chat = chat else { return }
 66 |             let params = Bot.SendMessageParams(chatId: .chat(chat.id), text: "Repeating each \(secondsInterval) seconds: \(Date())")
 67 |             try bot.sendMessage(params: params)
    |                 `- warning: main actor-isolated let 'bot' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 68 |         }
 69 |
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:70:9: error: main actor-isolated var 'userJobs' can not be mutated from a nonisolated context
 26 |
 27 | /// Dictionary for user echo modes
 28 | var userJobs: [Int64: String] = [:]
    |     `- note: mutation of this var is only permitted within the actor
 29 |
 30 | func onceTimerStart(_ update: Update, _ context: BotContext?) throws {
    :
 49 | }
 50 |
 51 | func repeatedTimerStart(_ update: Update, _ context: BotContext?) throws {
    |      `- note: add '@MainActor' to make global function 'repeatedTimerStart' part of global actor 'MainActor'
 52 |     guard let message = update.message,
 53 |         let user = message.from else { return }
    :
 68 |         }
 69 |
 70 |         userJobs[user.id] = timerJob.id
    |         `- error: main actor-isolated var 'userJobs' can not be mutated from a nonisolated context
 71 |
 72 |         _ = jobQueue.scheduleRepeated(timerJob)
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:72:13: warning: main actor-isolated let 'jobQueue' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 23 |
 24 | let bot = try! Bot(settings: settings)
 25 | let jobQueue = BasicJobQueue<Chat>(bot: bot)
    |     `- note: let declared here
 26 |
 27 | /// Dictionary for user echo modes
    :
 49 | }
 50 |
 51 | func repeatedTimerStart(_ update: Update, _ context: BotContext?) throws {
    |      `- note: add '@MainActor' to make global function 'repeatedTimerStart' part of global actor 'MainActor'
 52 |     guard let message = update.message,
 53 |         let user = message.from else { return }
    :
 70 |         userJobs[user.id] = timerJob.id
 71 |
 72 |         _ = jobQueue.scheduleRepeated(timerJob)
    |             `- warning: main actor-isolated let 'jobQueue' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 73 |     }
 74 | }
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:80:29: error: main actor-isolated var 'userJobs' can not be referenced from a nonisolated context
 26 |
 27 | /// Dictionary for user echo modes
 28 | var userJobs: [Int64: String] = [:]
    |     `- note: var declared here
 29 |
 30 | func onceTimerStart(_ update: Update, _ context: BotContext?) throws {
    :
 74 | }
 75 |
 76 | func repeatedTimerStop(_ update: Update, _ context: BotContext?) throws {
    |      `- note: add '@MainActor' to make global function 'repeatedTimerStop' part of global actor 'MainActor'
 77 |     guard let message = update.message,
 78 |         let user = message.from else { return }
 79 |
 80 |     if let scheduledJobId = userJobs[user.id] {
    |                             `- error: main actor-isolated var 'userJobs' can not be referenced from a nonisolated context
 81 |         if let notFinishedJob = jobQueue.jobs.first(where: { $0.id == scheduledJobId }) {
 82 |             notFinishedJob.scheduleRemoval()
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:81:33: warning: main actor-isolated let 'jobQueue' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 23 |
 24 | let bot = try! Bot(settings: settings)
 25 | let jobQueue = BasicJobQueue<Chat>(bot: bot)
    |     `- note: let declared here
 26 |
 27 | /// Dictionary for user echo modes
    :
 74 | }
 75 |
 76 | func repeatedTimerStop(_ update: Update, _ context: BotContext?) throws {
    |      `- note: add '@MainActor' to make global function 'repeatedTimerStop' part of global actor 'MainActor'
 77 |     guard let message = update.message,
 78 |         let user = message.from else { return }
 79 |
 80 |     if let scheduledJobId = userJobs[user.id] {
 81 |         if let notFinishedJob = jobQueue.jobs.first(where: { $0.id == scheduledJobId }) {
    |                                 `- warning: main actor-isolated let 'jobQueue' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
 82 |             notFinishedJob.scheduleRemoval()
 83 |         }
/host/spi-builder-workspace/Sources/DemoSchedulerBot/main.swift:85:9: error: main actor-isolated var 'userJobs' can not be mutated from a nonisolated context
 26 |
 27 | /// Dictionary for user echo modes
 28 | var userJobs: [Int64: String] = [:]
    |     `- note: mutation of this var is only permitted within the actor
 29 |
 30 | func onceTimerStart(_ update: Update, _ context: BotContext?) throws {
    :
 74 | }
 75 |
 76 | func repeatedTimerStop(_ update: Update, _ context: BotContext?) throws {
    |      `- note: add '@MainActor' to make global function 'repeatedTimerStop' part of global actor 'MainActor'
 77 |     guard let message = update.message,
 78 |         let user = message.from else { return }
    :
 83 |         }
 84 |
 85 |         userJobs.removeValue(forKey: user.id)
    |         `- error: main actor-isolated var 'userJobs' can not be mutated from a nonisolated context
 86 |     }
 87 | }
BUILD FAILURE 6.0 linux