Build Information
Failed to build Telegrammer, reference master (459176
), with Swift 6.0 for macOS (SPM) on 31 Oct 2024 21:35:47 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
222 | DispatchQueue.main.async { completion?() }
223 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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) }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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?() }
/Users/admin/builder/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?() }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Bot.swift:15:5: warning: let 'log' is not concurrency-safe because non-'Sendable' type 'Logger' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | //TODO: Implement our own LogHandler
15 | let log = Logger(label: "com.gp-apps.telegrammer")
| `- warning: let 'log' is not concurrency-safe because non-'Sendable' type 'Logger' may have shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | public typealias Worker = EventLoopGroup
/Users/admin/builder/spi-builder-workspace/.build/checkouts/swift-log/Sources/Logging/Logging.swift:38:15: note: struct 'Logger' does not conform to the 'Sendable' protocol
36 | /// logger.info("Hello World!")
37 | ///
38 | public struct Logger {
| `- note: struct 'Logger' does not conform to the 'Sendable' protocol
39 | @usableFromInline
40 | var handler: LogHandler
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Bot.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Logging'
7 |
8 | import Foundation
9 | import Logging
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Logging'
10 | import NIO
11 | import NIOHTTP1
:
13 |
14 | //TODO: Implement our own LogHandler
15 | let log = Logger(label: "com.gp-apps.telegrammer")
| |- note: annotate 'log' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 |
17 | public typealias Worker = EventLoopGroup
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Network/BotClient.swift:131:34: warning: converting a value of type '(__shared sending Result<TelegramContainer<T>, any Error>) -> ()' to type '(Result<TelegramContainer<T>, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
129 | return try self.decode(response: response)
130 | })
131 | .whenComplete($0.resume(with: ))
| |- warning: converting a value of type '(__shared sending Result<TelegramContainer<T>, any Error>) -> ()' to type '(Result<TelegramContainer<T>, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
| `- note: converting a function typed value with a sending parameter to one without risks allowing actor-isolated values to escape their isolation domain as an argument to an invocation of value
132 | }
133 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
[960/977] Compiling Telegrammer TelegramContainer.swift
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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) }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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?() }
/Users/admin/builder/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?() }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Bot.swift:15:5: warning: let 'log' is not concurrency-safe because non-'Sendable' type 'Logger' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | //TODO: Implement our own LogHandler
15 | let log = Logger(label: "com.gp-apps.telegrammer")
| `- warning: let 'log' is not concurrency-safe because non-'Sendable' type 'Logger' may have shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | public typealias Worker = EventLoopGroup
/Users/admin/builder/spi-builder-workspace/.build/checkouts/swift-log/Sources/Logging/Logging.swift:38:15: note: struct 'Logger' does not conform to the 'Sendable' protocol
36 | /// logger.info("Hello World!")
37 | ///
38 | public struct Logger {
| `- note: struct 'Logger' does not conform to the 'Sendable' protocol
39 | @usableFromInline
40 | var handler: LogHandler
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Bot.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Logging'
7 |
8 | import Foundation
9 | import Logging
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Logging'
10 | import NIO
11 | import NIOHTTP1
:
13 |
14 | //TODO: Implement our own LogHandler
15 | let log = Logger(label: "com.gp-apps.telegrammer")
| |- note: annotate 'log' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 |
17 | public typealias Worker = EventLoopGroup
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Network/BotClient.swift:131:34: warning: converting a value of type '(__shared sending Result<TelegramContainer<T>, any Error>) -> ()' to type '(Result<TelegramContainer<T>, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
129 | return try self.decode(response: response)
130 | })
131 | .whenComplete($0.resume(with: ))
| |- warning: converting a value of type '(__shared sending Result<TelegramContainer<T>, any Error>) -> ()' to type '(Result<TelegramContainer<T>, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
| `- note: converting a function typed value with a sending parameter to one without risks allowing actor-isolated values to escape their isolation domain as an argument to an invocation of value
132 | }
133 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
[961/977] Compiling Telegrammer TelegramEncodables.swift
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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) }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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?() }
/Users/admin/builder/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?() }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Bot.swift:15:5: warning: let 'log' is not concurrency-safe because non-'Sendable' type 'Logger' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | //TODO: Implement our own LogHandler
15 | let log = Logger(label: "com.gp-apps.telegrammer")
| `- warning: let 'log' is not concurrency-safe because non-'Sendable' type 'Logger' may have shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | public typealias Worker = EventLoopGroup
/Users/admin/builder/spi-builder-workspace/.build/checkouts/swift-log/Sources/Logging/Logging.swift:38:15: note: struct 'Logger' does not conform to the 'Sendable' protocol
36 | /// logger.info("Hello World!")
37 | ///
38 | public struct Logger {
| `- note: struct 'Logger' does not conform to the 'Sendable' protocol
39 | @usableFromInline
40 | var handler: LogHandler
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Bot.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Logging'
7 |
8 | import Foundation
9 | import Logging
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Logging'
10 | import NIO
11 | import NIOHTTP1
:
13 |
14 | //TODO: Implement our own LogHandler
15 | let log = Logger(label: "com.gp-apps.telegrammer")
| |- note: annotate 'log' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 |
17 | public typealias Worker = EventLoopGroup
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Network/BotClient.swift:131:34: warning: converting a value of type '(__shared sending Result<TelegramContainer<T>, any Error>) -> ()' to type '(Result<TelegramContainer<T>, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
129 | return try self.decode(response: response)
130 | })
131 | .whenComplete($0.resume(with: ))
| |- warning: converting a value of type '(__shared sending Result<TelegramContainer<T>, any Error>) -> ()' to type '(Result<TelegramContainer<T>, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
| `- note: converting a function typed value with a sending parameter to one without risks allowing actor-isolated values to escape their isolation domain as an argument to an invocation of value
132 | }
133 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
[962/977] Compiling Telegrammer Updater.swift
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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) }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/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?() }
/Users/admin/builder/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?() }
/Users/admin/builder/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 | }
/Users/admin/builder/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 | }
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Bot.swift:15:5: warning: let 'log' is not concurrency-safe because non-'Sendable' type 'Logger' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | //TODO: Implement our own LogHandler
15 | let log = Logger(label: "com.gp-apps.telegrammer")
| `- warning: let 'log' is not concurrency-safe because non-'Sendable' type 'Logger' may have shared mutable state; this is an error in the Swift 6 language mode
16 |
17 | public typealias Worker = EventLoopGroup
/Users/admin/builder/spi-builder-workspace/.build/checkouts/swift-log/Sources/Logging/Logging.swift:38:15: note: struct 'Logger' does not conform to the 'Sendable' protocol
36 | /// logger.info("Hello World!")
37 | ///
38 | public struct Logger {
| `- note: struct 'Logger' does not conform to the 'Sendable' protocol
39 | @usableFromInline
40 | var handler: LogHandler
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Bot/Telegram/Bot.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Logging'
7 |
8 | import Foundation
9 | import Logging
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Logging'
10 | import NIO
11 | import NIOHTTP1
:
13 |
14 | //TODO: Implement our own LogHandler
15 | let log = Logger(label: "com.gp-apps.telegrammer")
| |- note: annotate 'log' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 |
17 | public typealias Worker = EventLoopGroup
/Users/admin/builder/spi-builder-workspace/Sources/Telegrammer/Network/BotClient.swift:131:34: warning: converting a value of type '(__shared sending Result<TelegramContainer<T>, any Error>) -> ()' to type '(Result<TelegramContainer<T>, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
129 | return try self.decode(response: response)
130 | })
131 | .whenComplete($0.resume(with: ))
| |- warning: converting a value of type '(__shared sending Result<TelegramContainer<T>, any Error>) -> ()' to type '(Result<TelegramContainer<T>, any Error>) -> Void' risks causing data races; this is an error in the Swift 6 language mode
| `- note: converting a function typed value with a sending parameter to one without risks allowing actor-isolated values to escape their isolation domain as an argument to an invocation of value
132 | }
133 | }
/Users/admin/builder/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)
/Users/admin/builder/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)
[963/994] Compiling DemoHelloBot NewMemberHandler.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[964/994] Emitting module DemoEchoBot
/Users/admin/builder/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 |
/Users/admin/builder/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 |
/Users/admin/builder/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
/Users/admin/builder/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"
/Users/admin/builder/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 |
/Users/admin/builder/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 |
/Users/admin/builder/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!)
/Users/admin/builder/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 |
[965/994] Compiling DemoEchoBot main.swift
/Users/admin/builder/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 |
/Users/admin/builder/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 |
/Users/admin/builder/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
/Users/admin/builder/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"
/Users/admin/builder/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 |
/Users/admin/builder/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 |
/Users/admin/builder/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!)
/Users/admin/builder/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 |
[966/994] Compiling DemoWebhooksLocally main.swift
[967/994] Emitting module DemoWebhooksLocally
/Users/admin/builder/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 |
/Users/admin/builder/spi-builder-workspace/Sources/DemoHelloBot/main.swift:42: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
19 | //)
20 |
21 | let bot = try! Bot(settings: settings)
| `- note: let declared here
22 |
23 | ///Callback for handler, that sends Hello message for new chat member
24 | func greetNewMember(_ update: Update) throws {
| `- note: add '@MainActor' to make global function 'greetNewMember' part of global actor 'MainActor'
25 | guard let message = update.message,
26 | let newUsers = message.newChatMembers else { return }
:
40 | Here you may ask any questions about me!
41 | """)
42 | 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
43 | }
44 | }
BUILD FAILURE 6.0 macosSpm