Build Information
Successful build of TUSKit, reference main (2bc1fb), with Swift 6.1 for macOS (SPM) on 13 Oct 2026 12:48:15 UTC.
Swift 6 data race errors: 1
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCapturesBuild Log
========================================
RunAll
========================================
Builder version: 5.1.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/tus/TUSKit.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/tus/TUSKit
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 2bc1fb4 Add FUNDING.yml pointing to the tus Open Collective (#232)
Cloned https://github.com/tus/TUSKit.git
Revision (git rev-parse @):
2bc1fb4dff7b83f0ba52da1e7b886b742d7d0a02
SUCCESS checkout https://github.com/tus/TUSKit.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/tus/TUSKit.git
https://github.com/tus/TUSKit.git
{
"dependencies" : [
],
"manifest_display_name" : "TUSKit",
"name" : "TUSKit",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "10.0"
},
{
"name" : "macos",
"version" : "11.0"
},
{
"name" : "watchos",
"version" : "8.0"
}
],
"products" : [
{
"name" : "TUSKit",
"targets" : [
"TUSKit"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "TUSKitTests",
"module_type" : "SwiftTarget",
"name" : "TUSKitTests",
"path" : "Tests/TUSKitTests",
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Tests/TUSKitTests/Resources/memeCat.jpg",
"rule" : {
"process" : {
}
}
}
],
"sources" : [
"DataTests.swift",
"FilesTests.swift",
"Fixtures.swift",
"Mocks.swift",
"SchedulerTests.swift",
"Support/NetworkSupport.swift",
"Support/Support.swift",
"TUSAPITests.swift",
"TUSClient/TUSClientInternalTests.swift",
"TUSClient/TUSClientTests.swift",
"TUSClient/TUSClient_CacheTests.swift",
"TUSClient/TUSClient_ContextTests.swift",
"TUSClient/TUSClient_CustomHeadersTests.swift",
"TUSClient/TUSClient_DelegateTests.swift",
"TUSClient/TUSClient_HeaderGenerationTests.swift",
"TUSClient/TUSClient_IdsTests.swift",
"TUSClient/TUSClient_RetryTests.swift",
"TUSClient/TUSClient_UploadingTests.swift"
],
"target_dependencies" : [
"TUSKit"
],
"type" : "test"
},
{
"c99name" : "TUSKit",
"module_type" : "SwiftTarget",
"name" : "TUSKit",
"path" : "Sources/TUSKit",
"product_memberships" : [
"TUSKit"
],
"sources" : [
"Extensions/Collection+chunk.swift",
"Extensions/Data+chunk.swift",
"Extensions/HTTPURLResponse+Headers.swift",
"Extensions/String+base64.swift",
"Files.swift",
"Network.swift",
"Scheduler.swift",
"TUSAPI.swift",
"TUSClient.swift",
"TUSClientError.swift",
"TUSProtocolExtension.swift",
"Tasks/CreationTask.swift",
"Tasks/IdentifiableTask.swift",
"Tasks/StatusTask.swift",
"Tasks/UploadDataTask.swift",
"TusServerInfo.swift",
"UploadInfo.swift",
"UploadMetada.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5.1"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/20] Compiling TUSKit UploadDataTask.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:67:20: warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
65 | queue.async {
66 | // This check is right before the task is created. In case another thread calls cancel during this loop. Optimization: Add synchronization point (e.g. serial queue or actor).
67 | guard !self.isCanceled else {
| `- warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
68 | completed(.failure(TUSClientError.taskCancelled))
69 | return
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:68:17: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
66 | // This check is right before the task is created. In case another thread calls cancel during this loop. Optimization: Add synchronization point (e.g. serial queue or actor).
67 | guard !self.isCanceled else {
68 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
69 | return
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:95:25: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
93 | self.queue.async {
94 | if self.isCanceled {
95 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
96 | return
97 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:94:24: warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
92 |
93 | self.queue.async {
94 | if self.isCanceled {
| `- warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
95 | completed(.failure(TUSClientError.taskCancelled))
96 | return
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:95:25: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
93 | self.queue.async {
94 | if self.isCanceled {
95 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
96 | return
97 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:107:75: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
105 |
106 | self.queue.async {
107 | self.taskCompleted(result: result, completed: completed)
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
108 | }
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:107:29: warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
105 |
106 | self.queue.async {
107 | self.taskCompleted(result: result, completed: completed)
| `- warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
108 | }
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:107:75: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
105 |
106 | self.queue.async {
107 | self.taskCompleted(result: result, completed: completed)
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
108 | }
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:204:13: warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
202 | func cancel() {
203 | queue.async {
204 | self.isCanceled = true
| `- warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
205 | self.sessionTask?.cancel()
206 | }
[4/20] Compiling TUSKit TusServerInfo.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:67:20: warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
65 | queue.async {
66 | // This check is right before the task is created. In case another thread calls cancel during this loop. Optimization: Add synchronization point (e.g. serial queue or actor).
67 | guard !self.isCanceled else {
| `- warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
68 | completed(.failure(TUSClientError.taskCancelled))
69 | return
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:68:17: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
66 | // This check is right before the task is created. In case another thread calls cancel during this loop. Optimization: Add synchronization point (e.g. serial queue or actor).
67 | guard !self.isCanceled else {
68 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
69 | return
70 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:95:25: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
93 | self.queue.async {
94 | if self.isCanceled {
95 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
96 | return
97 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:94:24: warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
92 |
93 | self.queue.async {
94 | if self.isCanceled {
| `- warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
95 | completed(.failure(TUSClientError.taskCancelled))
96 | return
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:95:25: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
93 | self.queue.async {
94 | if self.isCanceled {
95 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
96 | return
97 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:107:75: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
105 |
106 | self.queue.async {
107 | self.taskCompleted(result: result, completed: completed)
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
108 | }
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:107:29: warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
105 |
106 | self.queue.async {
107 | self.taskCompleted(result: result, completed: completed)
| `- warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
108 | }
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:107:75: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
105 |
106 | self.queue.async {
107 | self.taskCompleted(result: result, completed: completed)
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
108 | }
109 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:204:13: warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
202 | func cancel() {
203 | queue.async {
204 | self.isCanceled = true
| `- warning: capture of 'self' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
205 | self.sessionTask?.cancel()
206 | }
[5/20] Compiling TUSKit UploadInfo.swift
[6/21] Compiling TUSKit TUSProtocolExtension.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:41:16: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
10 | /// `CreationTask` Prepares the server for a file upload.
11 | /// The server will return a path to upload to.
12 | final class CreationTask: IdentifiableTask {
| `- note: class 'CreationTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
39 | func run(completed: @escaping TaskCompletion) {
40 | queue.async {
41 | if self.didCancel { return }
| `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
42 |
43 | self.headerGenerator.resolveHeaders(for: self.metaData) { [weak self] customHeaders in
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:47:24: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
10 | /// `CreationTask` Prepares the server for a file upload.
11 | /// The server will return a path to upload to.
12 | final class CreationTask: IdentifiableTask {
| `- note: class 'CreationTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
45 |
46 | self.queue.async {
47 | if self.didCancel { return }
| `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
48 |
49 | self.sessionTask = self.api.create(metaData: self.metaData, customHeaders: customHeaders) { [weak self] result in
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:54:44: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
10 | /// `CreationTask` Prepares the server for a file upload.
11 | /// The server will return a path to upload to.
12 | final class CreationTask: IdentifiableTask {
| `- note: class 'CreationTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
52 | // File is created remotely. Now start first datatask.
53 | self.queue.async {
54 | let metaData = self.metaData
| `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
55 | let files = self.files
56 | let chunkSize = self.chunkSize
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:89:13: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
10 | /// `CreationTask` Prepares the server for a file upload.
11 | /// The server will return a path to upload to.
12 | final class CreationTask: IdentifiableTask {
| `- note: class 'CreationTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
87 | func cancel() {
88 | queue.async {
89 | self.didCancel = true
| `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
90 | self.sessionTask?.cancel()
91 | }
[7/21] Compiling TUSKit CreationTask.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:41:16: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
10 | /// `CreationTask` Prepares the server for a file upload.
11 | /// The server will return a path to upload to.
12 | final class CreationTask: IdentifiableTask {
| `- note: class 'CreationTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
39 | func run(completed: @escaping TaskCompletion) {
40 | queue.async {
41 | if self.didCancel { return }
| `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
42 |
43 | self.headerGenerator.resolveHeaders(for: self.metaData) { [weak self] customHeaders in
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:47:24: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
10 | /// `CreationTask` Prepares the server for a file upload.
11 | /// The server will return a path to upload to.
12 | final class CreationTask: IdentifiableTask {
| `- note: class 'CreationTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
45 |
46 | self.queue.async {
47 | if self.didCancel { return }
| `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
48 |
49 | self.sessionTask = self.api.create(metaData: self.metaData, customHeaders: customHeaders) { [weak self] result in
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:54:44: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
10 | /// `CreationTask` Prepares the server for a file upload.
11 | /// The server will return a path to upload to.
12 | final class CreationTask: IdentifiableTask {
| `- note: class 'CreationTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
52 | // File is created remotely. Now start first datatask.
53 | self.queue.async {
54 | let metaData = self.metaData
| `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
55 | let files = self.files
56 | let chunkSize = self.chunkSize
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:71:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
69 | }
70 | if self.didCancel {
71 | completed(.failure(TUSClientError.taskCancelled))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
72 | } else {
73 | completed(.success([task]))
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:89:13: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
10 | /// `CreationTask` Prepares the server for a file upload.
11 | /// The server will return a path to upload to.
12 | final class CreationTask: IdentifiableTask {
| `- note: class 'CreationTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
:
87 | func cancel() {
88 | queue.async {
89 | self.didCancel = true
| `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure
90 | self.sessionTask?.cancel()
91 | }
[8/21] Compiling TUSKit IdentifiableTask.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:42:16: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
9 |
10 | /// A `StatusTask` fetches the status of an upload. It fetches the offset from we can continue uploading, and then makes a possible uploadtask.
11 | final class StatusTask: IdentifiableTask {
| `- note: class 'StatusTask' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - IdentifiableTask
:
40 | // Improvement: On failure, try uploading from the start. Create creationtask.
41 | queue.async {
42 | if self.didCancel { return }
| `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
43 |
44 | self.headerGenerator.resolveHeaders(for: self.metaData) { [weak self] customHeaders in
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:48:24: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
9 |
10 | /// A `StatusTask` fetches the status of an upload. It fetches the offset from we can continue uploading, and then makes a possible uploadtask.
11 | final class StatusTask: IdentifiableTask {
| `- note: class 'StatusTask' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - IdentifiableTask
:
46 |
47 | self.queue.async {
48 | if self.didCancel { return }
| `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
49 |
50 | self.sessionTask = self.api.status(remoteDestination: self.remoteDestination, headers: customHeaders) { [weak self] result in
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:55:44: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
9 |
10 | /// A `StatusTask` fetches the status of an upload. It fetches the offset from we can continue uploading, and then makes a possible uploadtask.
11 | final class StatusTask: IdentifiableTask {
| `- note: class 'StatusTask' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - IdentifiableTask
:
53 | self.queue.async {
54 | // Getting rid of self. in this closure
55 | let metaData = self.metaData
| `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
56 | let files = self.files
57 | let chunkSize = self.chunkSize
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:109:13: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
9 |
10 | /// A `StatusTask` fetches the status of an upload. It fetches the offset from we can continue uploading, and then makes a possible uploadtask.
11 | final class StatusTask: IdentifiableTask {
| `- note: class 'StatusTask' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - IdentifiableTask
:
107 | func cancel() {
108 | queue.async {
109 | self.didCancel = true
| `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
110 | self.sessionTask?.cancel()
111 | }
[9/21] Compiling TUSKit StatusTask.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:42:16: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
9 |
10 | /// A `StatusTask` fetches the status of an upload. It fetches the offset from we can continue uploading, and then makes a possible uploadtask.
11 | final class StatusTask: IdentifiableTask {
| `- note: class 'StatusTask' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - IdentifiableTask
:
40 | // Improvement: On failure, try uploading from the start. Create creationtask.
41 | queue.async {
42 | if self.didCancel { return }
| `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
43 |
44 | self.headerGenerator.resolveHeaders(for: self.metaData) { [weak self] customHeaders in
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:48:24: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
9 |
10 | /// A `StatusTask` fetches the status of an upload. It fetches the offset from we can continue uploading, and then makes a possible uploadtask.
11 | final class StatusTask: IdentifiableTask {
| `- note: class 'StatusTask' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - IdentifiableTask
:
46 |
47 | self.queue.async {
48 | if self.didCancel { return }
| `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
49 |
50 | self.sessionTask = self.api.status(remoteDestination: self.remoteDestination, headers: customHeaders) { [weak self] result in
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in an isolated closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:55:44: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
9 |
10 | /// A `StatusTask` fetches the status of an upload. It fetches the offset from we can continue uploading, and then makes a possible uploadtask.
11 | final class StatusTask: IdentifiableTask {
| `- note: class 'StatusTask' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - IdentifiableTask
:
53 | self.queue.async {
54 | // Getting rid of self. in this closure
55 | let metaData = self.metaData
| `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
56 | let files = self.files
57 | let chunkSize = self.chunkSize
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:77:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
75 |
76 | if offset == metaData.size {
77 | completed(.success([]))
| |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
78 | } else {
79 | // If the task has been canceled
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:109:13: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
9 |
10 | /// A `StatusTask` fetches the status of an upload. It fetches the offset from we can continue uploading, and then makes a possible uploadtask.
11 | final class StatusTask: IdentifiableTask {
| `- note: class 'StatusTask' does not conform to the 'Sendable' protocol
12 |
13 | // MARK: - IdentifiableTask
:
107 | func cancel() {
108 | queue.async {
109 | self.didCancel = true
| `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure
110 | self.sessionTask?.cancel()
111 | }
[10/21] Compiling TUSKit Scheduler.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:48:20: warning: capture of 'tasks' with non-sendable type '[any ScheduledTask]' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
46 | func addTasks(tasks: [ScheduledTask]) {
47 | queue.async {
48 | guard !tasks.isEmpty else { return }
| `- warning: capture of 'tasks' with non-sendable type '[any ScheduledTask]' in a '@Sendable' closure
49 | self.pendingTasks.append(contentsOf: tasks)
50 | self.checkProcessNextTask()
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:49:13: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
47 | queue.async {
48 | guard !tasks.isEmpty else { return }
49 | self.pendingTasks.append(contentsOf: tasks)
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
50 | self.checkProcessNextTask()
51 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:56:13: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
54 | func addTask(task: ScheduledTask) {
55 | queue.async {
56 | self.pendingTasks.append(task)
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
57 | self.checkProcessNextTask()
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:56:38: warning: capture of 'task' with non-sendable type 'any ScheduledTask' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
54 | func addTask(task: ScheduledTask) {
55 | queue.async {
56 | self.pendingTasks.append(task)
| `- warning: capture of 'task' with non-sendable type 'any ScheduledTask' in a '@Sendable' closure
57 | self.checkProcessNextTask()
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:63:13: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
61 | func cancelAll() {
62 | queue.async {
63 | self.pendingTasks = []
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
64 | self.runningTasks.forEach { $0.cancel() }
65 | self.runningTasks = []
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:71:13: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
69 | func cancelTask(by id: UUID) {
70 | queue.async {
71 | self.pendingTasks.removeAll { task in
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
72 | guard let idTask = task as? IdentifiableTask, idTask.id == id else {
73 | return false
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:90:13: warning: capture of 'tasksToCancel' with non-sendable type '[any ScheduledTask]' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
88 | func cancelTasks(_ tasksToCancel: [ScheduledTask]) {
89 | queue.async {
90 | tasksToCancel.forEach { taskToCancel in
| `- warning: capture of 'tasksToCancel' with non-sendable type '[any ScheduledTask]' in a '@Sendable' closure
91 | if let pendingTaskIndex = self.pendingTasks.firstIndex(where: { pendingTask in
92 | pendingTask === taskToCancel
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:91:43: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
89 | queue.async {
90 | tasksToCancel.forEach { taskToCancel in
91 | if let pendingTaskIndex = self.pendingTasks.firstIndex(where: { pendingTask in
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
92 | pendingTask === taskToCancel
93 | }) {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:91:43: warning: capture of 'self' with non-sendable type 'Scheduler' in an isolated closure; this is an error in the Swift 6 language mode
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
89 | queue.async {
90 | tasksToCancel.forEach { taskToCancel in
91 | if let pendingTaskIndex = self.pendingTasks.firstIndex(where: { pendingTask in
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in an isolated closure; this is an error in the Swift 6 language mode
92 | pendingTask === taskToCancel
93 | }) {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:112:30: warning: capture of 'self' with non-sendable type 'Scheduler?' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
110 | private func checkProcessNextTask() {
111 | queue.async { [weak self] in
112 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'Scheduler?' in a '@Sendable' closure
113 | guard !self.pendingTasks.isEmpty else { return }
114 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:127:36: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
125 | // // Make sure tasks are updated atomically
126 | self.queue.async {
127 | if let index = self.runningTasks.firstIndex(where: { $0 === task }) {
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
128 | self.runningTasks.remove(at: index)
129 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:127:81: warning: capture of 'task' with non-sendable type 'any ScheduledTask' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
125 | // // Make sure tasks are updated atomically
126 | self.queue.async {
127 | if let index = self.runningTasks.firstIndex(where: { $0 === task }) {
| `- warning: capture of 'task' with non-sendable type 'any ScheduledTask' in a '@Sendable' closure
128 | self.runningTasks.remove(at: index)
129 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:133:28: warning: capture of 'result' with non-sendable type 'Result<[any ScheduledTask], any Error>' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
131 | }
132 |
133 | switch result {
| `- warning: capture of 'result' with non-sendable type 'Result<[any ScheduledTask], any Error>' in a '@Sendable' closure
134 | case .success(let newTasks):
135 | if !newTasks.isEmpty {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:127:81: warning: capture of 'task' with non-sendable type 'any ScheduledTask' in an isolated closure; this is an error in the Swift 6 language mode
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
125 | // // Make sure tasks are updated atomically
126 | self.queue.async {
127 | if let index = self.runningTasks.firstIndex(where: { $0 === task }) {
| `- warning: capture of 'task' with non-sendable type 'any ScheduledTask' in an isolated closure; this is an error in the Swift 6 language mode
128 | self.runningTasks.remove(at: index)
129 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:474:18: warning: stored property 'api' of 'Sendable'-conforming class 'SessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
472 | extension TUSAPI {
473 | final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
474 | weak var api: TUSAPI?
| `- warning: stored property 'api' of 'Sendable'-conforming class 'SessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
475 |
476 | func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:370:23: warning: capture of 'self' with non-sendable type 'TUSAPI?' in a '@Sendable' closure
53 | /// The Uploader's responsibility is to perform work related to uploading.
54 | /// This includes: Making requests, handling requests, handling errors.
55 | final class TUSAPI {
| `- note: class 'TUSAPI' does not conform to the 'Sendable' protocol
56 | enum HTTPMethod: String {
57 | case head = "HEAD"
:
368 |
369 | let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
370 | guard let self, let task else { return }
| `- warning: capture of 'self' with non-sendable type 'TUSAPI?' in a '@Sendable' closure
371 | self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
372 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:406:48: warning: capture of 'metadata' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
404 | session.getAllTasks(completionHandler: { tasks in
405 | let hasTask = tasks.contains(where: { task in
406 | return task.taskDescription == metadata.id.uuidString
| `- warning: capture of 'metadata' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
407 | })
408 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:409:13: warning: capture of 'completion' with non-sendable type '(Bool) -> Void' in a '@Sendable' closure
407 | })
408 |
409 | completion(hasTask)
| |- warning: capture of 'completion' with non-sendable type '(Bool) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
410 | })
411 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:406:48: warning: capture of 'metadata' with non-sendable type 'UploadMetadata' in an isolated closure; this is an error in the Swift 6 language mode
404 | session.getAllTasks(completionHandler: { tasks in
405 | let hasTask = tasks.contains(where: { task in
406 | return task.taskDescription == metadata.id.uuidString
| `- warning: capture of 'metadata' with non-sendable type 'UploadMetadata' in an isolated closure; this is an error in the Swift 6 language mode
407 | })
408 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:532:17: warning: sending 'backgroundHandler' risks causing data races; this is an error in the Swift 6 language mode
530 | if let backgroundHandler {
531 | DispatchQueue.main.async {
532 | backgroundHandler()
| |- warning: sending 'backgroundHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'backgroundHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
533 | self.backgroundHandler = nil
534 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:533:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
531 | DispatchQueue.main.async {
532 | backgroundHandler()
533 | self.backgroundHandler = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
534 | }
535 | }
[11/21] Compiling TUSKit TUSAPI.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:48:20: warning: capture of 'tasks' with non-sendable type '[any ScheduledTask]' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
46 | func addTasks(tasks: [ScheduledTask]) {
47 | queue.async {
48 | guard !tasks.isEmpty else { return }
| `- warning: capture of 'tasks' with non-sendable type '[any ScheduledTask]' in a '@Sendable' closure
49 | self.pendingTasks.append(contentsOf: tasks)
50 | self.checkProcessNextTask()
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:49:13: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
47 | queue.async {
48 | guard !tasks.isEmpty else { return }
49 | self.pendingTasks.append(contentsOf: tasks)
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
50 | self.checkProcessNextTask()
51 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:56:13: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
54 | func addTask(task: ScheduledTask) {
55 | queue.async {
56 | self.pendingTasks.append(task)
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
57 | self.checkProcessNextTask()
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:56:38: warning: capture of 'task' with non-sendable type 'any ScheduledTask' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
54 | func addTask(task: ScheduledTask) {
55 | queue.async {
56 | self.pendingTasks.append(task)
| `- warning: capture of 'task' with non-sendable type 'any ScheduledTask' in a '@Sendable' closure
57 | self.checkProcessNextTask()
58 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:63:13: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
61 | func cancelAll() {
62 | queue.async {
63 | self.pendingTasks = []
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
64 | self.runningTasks.forEach { $0.cancel() }
65 | self.runningTasks = []
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:71:13: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
69 | func cancelTask(by id: UUID) {
70 | queue.async {
71 | self.pendingTasks.removeAll { task in
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
72 | guard let idTask = task as? IdentifiableTask, idTask.id == id else {
73 | return false
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:90:13: warning: capture of 'tasksToCancel' with non-sendable type '[any ScheduledTask]' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
88 | func cancelTasks(_ tasksToCancel: [ScheduledTask]) {
89 | queue.async {
90 | tasksToCancel.forEach { taskToCancel in
| `- warning: capture of 'tasksToCancel' with non-sendable type '[any ScheduledTask]' in a '@Sendable' closure
91 | if let pendingTaskIndex = self.pendingTasks.firstIndex(where: { pendingTask in
92 | pendingTask === taskToCancel
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:91:43: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
89 | queue.async {
90 | tasksToCancel.forEach { taskToCancel in
91 | if let pendingTaskIndex = self.pendingTasks.firstIndex(where: { pendingTask in
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
92 | pendingTask === taskToCancel
93 | }) {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:91:43: warning: capture of 'self' with non-sendable type 'Scheduler' in an isolated closure; this is an error in the Swift 6 language mode
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
89 | queue.async {
90 | tasksToCancel.forEach { taskToCancel in
91 | if let pendingTaskIndex = self.pendingTasks.firstIndex(where: { pendingTask in
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in an isolated closure; this is an error in the Swift 6 language mode
92 | pendingTask === taskToCancel
93 | }) {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:112:30: warning: capture of 'self' with non-sendable type 'Scheduler?' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
110 | private func checkProcessNextTask() {
111 | queue.async { [weak self] in
112 | guard let self = self else { return }
| `- warning: capture of 'self' with non-sendable type 'Scheduler?' in a '@Sendable' closure
113 | guard !self.pendingTasks.isEmpty else { return }
114 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:127:36: warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
27 | /// It keeps track of related tasks, adds limiter capabilities (e.g. only process x amount of tasks) and concurrency.
28 | /// Keeps track of related tasks and their errors.
29 | final class Scheduler {
| `- note: class 'Scheduler' does not conform to the 'Sendable' protocol
30 |
31 | private var pendingTasks = [ScheduledTask]()
:
125 | // // Make sure tasks are updated atomically
126 | self.queue.async {
127 | if let index = self.runningTasks.firstIndex(where: { $0 === task }) {
| `- warning: capture of 'self' with non-sendable type 'Scheduler' in a '@Sendable' closure
128 | self.runningTasks.remove(at: index)
129 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:127:81: warning: capture of 'task' with non-sendable type 'any ScheduledTask' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
125 | // // Make sure tasks are updated atomically
126 | self.queue.async {
127 | if let index = self.runningTasks.firstIndex(where: { $0 === task }) {
| `- warning: capture of 'task' with non-sendable type 'any ScheduledTask' in a '@Sendable' closure
128 | self.runningTasks.remove(at: index)
129 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:133:28: warning: capture of 'result' with non-sendable type 'Result<[any ScheduledTask], any Error>' in a '@Sendable' closure
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
131 | }
132 |
133 | switch result {
| `- warning: capture of 'result' with non-sendable type 'Result<[any ScheduledTask], any Error>' in a '@Sendable' closure
134 | case .success(let newTasks):
135 | if !newTasks.isEmpty {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Scheduler.swift:127:81: warning: capture of 'task' with non-sendable type 'any ScheduledTask' in an isolated closure; this is an error in the Swift 6 language mode
19 | /// Once a Task is finished. It can spawn new tasks that need to be run.
20 | /// E.g. If a task is to upload a file, then it can spawn into tasks to cut up the file first. Which can then cut up into a task to upload, which can then add a task to delete the files.
21 | protocol ScheduledTask: AnyObject {
| `- note: protocol 'ScheduledTask' does not conform to the 'Sendable' protocol
22 | func run(completed: @escaping TaskCompletion)
23 | func cancel()
:
125 | // // Make sure tasks are updated atomically
126 | self.queue.async {
127 | if let index = self.runningTasks.firstIndex(where: { $0 === task }) {
| `- warning: capture of 'task' with non-sendable type 'any ScheduledTask' in an isolated closure; this is an error in the Swift 6 language mode
128 | self.runningTasks.remove(at: index)
129 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:474:18: warning: stored property 'api' of 'Sendable'-conforming class 'SessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
472 | extension TUSAPI {
473 | final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
474 | weak var api: TUSAPI?
| `- warning: stored property 'api' of 'Sendable'-conforming class 'SessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
475 |
476 | func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:370:23: warning: capture of 'self' with non-sendable type 'TUSAPI?' in a '@Sendable' closure
53 | /// The Uploader's responsibility is to perform work related to uploading.
54 | /// This includes: Making requests, handling requests, handling errors.
55 | final class TUSAPI {
| `- note: class 'TUSAPI' does not conform to the 'Sendable' protocol
56 | enum HTTPMethod: String {
57 | case head = "HEAD"
:
368 |
369 | let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
370 | guard let self, let task else { return }
| `- warning: capture of 'self' with non-sendable type 'TUSAPI?' in a '@Sendable' closure
371 | self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
372 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:406:48: warning: capture of 'metadata' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
404 | session.getAllTasks(completionHandler: { tasks in
405 | let hasTask = tasks.contains(where: { task in
406 | return task.taskDescription == metadata.id.uuidString
| `- warning: capture of 'metadata' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
407 | })
408 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:409:13: warning: capture of 'completion' with non-sendable type '(Bool) -> Void' in a '@Sendable' closure
407 | })
408 |
409 | completion(hasTask)
| |- warning: capture of 'completion' with non-sendable type '(Bool) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
410 | })
411 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:406:48: warning: capture of 'metadata' with non-sendable type 'UploadMetadata' in an isolated closure; this is an error in the Swift 6 language mode
404 | session.getAllTasks(completionHandler: { tasks in
405 | let hasTask = tasks.contains(where: { task in
406 | return task.taskDescription == metadata.id.uuidString
| `- warning: capture of 'metadata' with non-sendable type 'UploadMetadata' in an isolated closure; this is an error in the Swift 6 language mode
407 | })
408 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:532:17: warning: sending 'backgroundHandler' risks causing data races; this is an error in the Swift 6 language mode
530 | if let backgroundHandler {
531 | DispatchQueue.main.async {
532 | backgroundHandler()
| |- warning: sending 'backgroundHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'backgroundHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
533 | self.backgroundHandler = nil
534 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:533:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
531 | DispatchQueue.main.async {
532 | backgroundHandler()
533 | self.backgroundHandler = nil
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
534 | }
535 | }
[12/21] Compiling TUSKit Files.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Network.swift:18:59: warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
16 |
17 | func dataTask(request: URLRequest, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionDataTask {
18 | return dataTask(with: request, completionHandler: makeCompletion(completion: completion))
| `- warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Network.swift:22:73: warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
20 |
21 | func uploadTask(request: URLRequest, data: Data, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionUploadTask {
22 | return uploadTask(with: request, from: data, completionHandler: makeCompletion(completion: completion))
| `- warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
23 | }
24 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Network.swift:26:77: warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
24 |
25 | func uploadTask(with request: URLRequest, fromFile file: URL, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionUploadTask {
26 | return uploadTask(with: request, fromFile: file, completionHandler: makeCompletion(completion: completion))
| `- warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
27 | }
28 | }
[13/21] Compiling TUSKit Network.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Network.swift:18:59: warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
16 |
17 | func dataTask(request: URLRequest, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionDataTask {
18 | return dataTask(with: request, completionHandler: makeCompletion(completion: completion))
| `- warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Network.swift:22:73: warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
20 |
21 | func uploadTask(request: URLRequest, data: Data, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionUploadTask {
22 | return uploadTask(with: request, from: data, completionHandler: makeCompletion(completion: completion))
| `- warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
23 | }
24 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Network.swift:26:77: warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
24 |
25 | func uploadTask(with request: URLRequest, fromFile file: URL, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionUploadTask {
26 | return uploadTask(with: request, fromFile: file, completionHandler: makeCompletion(completion: completion))
| `- warning: converting non-sendable function value to '@Sendable (Data?, URLResponse?, (any Error)?) -> Void' may introduce data races
27 | }
28 | }
[14/21] Compiling TUSKit Collection+chunk.swift
[15/21] Compiling TUSKit Data+chunk.swift
[16/21] Compiling TUSKit TUSClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:58:9: warning: 'didFinishUpload(id:url:context:client:)' is deprecated: Use the new didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) method instead.
56 | func didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) {
57 | // Supports calling the existing implementation without forcing conformance to the new delegate function.
58 | didFinishUpload(id: id, url: url, context: context, client: client)
| `- warning: 'didFinishUpload(id:url:context:client:)' is deprecated: Use the new didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) method instead.
59 | }
60 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:548:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
546 | let tusError = TUSClientError.couldnotRemoveFinishedUploads(underlyingError: error)
547 | reportingQueue.async {
548 | self.delegate?.fileError(id: nil, error: tusError , client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
549 | }
550 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:669:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
667 | let tusError = TUSClientError.couldNotLoadData(underlyingError: error)
668 | reportingQueue.async {
669 | self.delegate?.fileError(id: nil, error: tusError, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
670 | }
671 | return []
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:723:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
721 | let tusError = TUSClientError.couldNotDeleteFile(underlyingError: error)
722 | reportingQueue.async {
723 | self.delegate?.fileError(id: uploadTask.metaData.id, error: tusError, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
724 | }
725 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:723:46: warning: capture of 'uploadTask' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
721 | let tusError = TUSClientError.couldNotDeleteFile(underlyingError: error)
722 | reportingQueue.async {
723 | self.delegate?.fileError(id: uploadTask.metaData.id, error: tusError, client: self)
| `- warning: capture of 'uploadTask' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
724 | }
725 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:12:13: note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:741:13: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
739 | headerGenerator.clearHeaders(for: id)
740 | reportingQueue.async {
741 | self.delegate?.didFinishUpload(id: id, url: url, context: context, client: self, responseHeaders: responseHeaders)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
742 | }
743 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:751:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
749 | if isUploadRangeEmpty && task.metaData.errorCount == 0 {
750 | reportingQueue.async {
751 | self.delegate?.didStartUpload(id: task.metaData.id, context: task.metaData.context, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
752 | }
753 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:751:51: warning: capture of 'task' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
749 | if isUploadRangeEmpty && task.metaData.errorCount == 0 {
750 | reportingQueue.async {
751 | self.delegate?.didStartUpload(id: task.metaData.id, context: task.metaData.context, client: self)
| `- warning: capture of 'task' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
752 | }
753 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:12:13: note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:810:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
808 | let tusError = TUSClientError.couldNotStoreFileMetadata(underlyingError: error)
809 | reportingQueue.async {
810 | self.delegate?.fileError(id: metaData.id, error: tusError, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
811 | }
812 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:810:46: warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
808 | let tusError = TUSClientError.couldNotStoreFileMetadata(underlyingError: error)
809 | reportingQueue.async {
810 | self.delegate?.fileError(id: metaData.id, error: tusError, client: self)
| `- warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
811 | }
812 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:823:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
821 | headerGenerator.clearHeaders(for: metaData.id)
822 | reportingQueue.async {
823 | self.delegate?.uploadFailed(id: metaData.id, error: error, context: metaData.context, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
824 | }
825 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:823:49: warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
821 | headerGenerator.clearHeaders(for: metaData.id)
822 | reportingQueue.async {
823 | self.delegate?.uploadFailed(id: metaData.id, error: error, context: metaData.context, client: self)
| `- warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
824 | }
825 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:869:13: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
867 |
868 | reportingQueue.async {
869 | self.delegate?.progressFor(id: metaData.id, context: metaData.context, bytesUploaded: totalUploadedBytes, totalBytes: metaData.size, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
870 | }
871 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:869:44: warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
867 |
868 | reportingQueue.async {
869 | self.delegate?.progressFor(id: metaData.id, context: metaData.context, bytesUploaded: totalUploadedBytes, totalBytes: metaData.size, client: self)
| `- warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
870 | }
871 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:13: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
884 |
885 | reportingQueue.async {
886 | self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
887 | }
888 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:57: warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code
884 |
885 | reportingQueue.async {
886 | self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
| `- warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code
887 | }
888 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:89: warning: reference to captured var 'totalSize' in concurrently-executing code
884 |
885 | reportingQueue.async {
886 | self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
| `- warning: reference to captured var 'totalSize' in concurrently-executing code
887 | }
888 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:926:13: warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
889 | }
890 |
891 | final class HeaderGenerator {
| `- note: class 'HeaderGenerator' does not conform to the 'Sendable' protocol
892 | private let handler: HeaderGenerationHandler?
893 | private let queue = DispatchQueue(label: "com.tuskit.headergenerator")
:
924 | func clearHeaders(for id: UUID) {
925 | queue.async {
926 | self.latestHeaders.removeValue(forKey: id)
| `- warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
927 | }
928 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:932:13: warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
889 | }
890 |
891 | final class HeaderGenerator {
| `- note: class 'HeaderGenerator' does not conform to the 'Sendable' protocol
892 | private let handler: HeaderGenerationHandler?
893 | private let queue = DispatchQueue(label: "com.tuskit.headergenerator")
:
930 | func clearAll() {
931 | queue.async {
932 | self.latestHeaders.removeAll()
| `- warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
933 | }
934 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:949:13: warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
889 | }
890 |
891 | final class HeaderGenerator {
| `- note: class 'HeaderGenerator' does not conform to the 'Sendable' protocol
892 | private let handler: HeaderGenerationHandler?
893 | private let queue = DispatchQueue(label: "com.tuskit.headergenerator")
:
947 | metaData.updateAppliedCustomHeaders(headers)
948 | queue.async {
949 | self.latestHeaders[metaData.id] = headers
| `- warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
950 | }
951 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:949:32: warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
947 | metaData.updateAppliedCustomHeaders(headers)
948 | queue.async {
949 | self.latestHeaders[metaData.id] = headers
| `- warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
950 | }
951 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
[17/21] Compiling TUSKit TUSClientError.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:58:9: warning: 'didFinishUpload(id:url:context:client:)' is deprecated: Use the new didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) method instead.
56 | func didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) {
57 | // Supports calling the existing implementation without forcing conformance to the new delegate function.
58 | didFinishUpload(id: id, url: url, context: context, client: client)
| `- warning: 'didFinishUpload(id:url:context:client:)' is deprecated: Use the new didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) method instead.
59 | }
60 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:548:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
546 | let tusError = TUSClientError.couldnotRemoveFinishedUploads(underlyingError: error)
547 | reportingQueue.async {
548 | self.delegate?.fileError(id: nil, error: tusError , client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
549 | }
550 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:669:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
667 | let tusError = TUSClientError.couldNotLoadData(underlyingError: error)
668 | reportingQueue.async {
669 | self.delegate?.fileError(id: nil, error: tusError, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
670 | }
671 | return []
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:723:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
721 | let tusError = TUSClientError.couldNotDeleteFile(underlyingError: error)
722 | reportingQueue.async {
723 | self.delegate?.fileError(id: uploadTask.metaData.id, error: tusError, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
724 | }
725 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:723:46: warning: capture of 'uploadTask' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
721 | let tusError = TUSClientError.couldNotDeleteFile(underlyingError: error)
722 | reportingQueue.async {
723 | self.delegate?.fileError(id: uploadTask.metaData.id, error: tusError, client: self)
| `- warning: capture of 'uploadTask' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
724 | }
725 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:12:13: note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:741:13: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
739 | headerGenerator.clearHeaders(for: id)
740 | reportingQueue.async {
741 | self.delegate?.didFinishUpload(id: id, url: url, context: context, client: self, responseHeaders: responseHeaders)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
742 | }
743 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:751:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
749 | if isUploadRangeEmpty && task.metaData.errorCount == 0 {
750 | reportingQueue.async {
751 | self.delegate?.didStartUpload(id: task.metaData.id, context: task.metaData.context, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
752 | }
753 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:751:51: warning: capture of 'task' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
749 | if isUploadRangeEmpty && task.metaData.errorCount == 0 {
750 | reportingQueue.async {
751 | self.delegate?.didStartUpload(id: task.metaData.id, context: task.metaData.context, client: self)
| `- warning: capture of 'task' with non-sendable type 'UploadDataTask' in a '@Sendable' closure
752 | }
753 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:12:13: note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
10 | /// The upload task will upload to data a destination.
11 | /// Will spawn more UploadDataTasks if an upload isn't complete.
12 | final class UploadDataTask: NSObject, IdentifiableTask {
| `- note: class 'UploadDataTask' does not conform to the 'Sendable' protocol
13 |
14 | // MARK: - IdentifiableTask
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:810:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
808 | let tusError = TUSClientError.couldNotStoreFileMetadata(underlyingError: error)
809 | reportingQueue.async {
810 | self.delegate?.fileError(id: metaData.id, error: tusError, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
811 | }
812 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:810:46: warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
808 | let tusError = TUSClientError.couldNotStoreFileMetadata(underlyingError: error)
809 | reportingQueue.async {
810 | self.delegate?.fileError(id: metaData.id, error: tusError, client: self)
| `- warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
811 | }
812 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:823:17: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
821 | headerGenerator.clearHeaders(for: metaData.id)
822 | reportingQueue.async {
823 | self.delegate?.uploadFailed(id: metaData.id, error: error, context: metaData.context, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
824 | }
825 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:823:49: warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
821 | headerGenerator.clearHeaders(for: metaData.id)
822 | reportingQueue.async {
823 | self.delegate?.uploadFailed(id: metaData.id, error: error, context: metaData.context, client: self)
| `- warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
824 | }
825 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:869:13: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
867 |
868 | reportingQueue.async {
869 | self.delegate?.progressFor(id: metaData.id, context: metaData.context, bytesUploaded: totalUploadedBytes, totalBytes: metaData.size, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
870 | }
871 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:869:44: warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
867 |
868 | reportingQueue.async {
869 | self.delegate?.progressFor(id: metaData.id, context: metaData.context, bytesUploaded: totalUploadedBytes, totalBytes: metaData.size, client: self)
| `- warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
870 | }
871 |
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:13: warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
72 | public typealias HeaderGenerationHandler = (_ requestID: UUID, _ headers: [String: String], _ completion: @escaping ([String: String]) -> Void) -> Void
73 |
74 | public final class TUSClient {
| `- note: class 'TUSClient' does not conform to the 'Sendable' protocol
75 |
76 | // MARK: - Public Properties
:
884 |
885 | reportingQueue.async {
886 | self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
| `- warning: capture of 'self' with non-sendable type 'TUSClient' in a '@Sendable' closure
887 | }
888 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:57: warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code
884 |
885 | reportingQueue.async {
886 | self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
| `- warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code
887 | }
888 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:89: warning: reference to captured var 'totalSize' in concurrently-executing code
884 |
885 | reportingQueue.async {
886 | self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
| `- warning: reference to captured var 'totalSize' in concurrently-executing code
887 | }
888 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:926:13: warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
889 | }
890 |
891 | final class HeaderGenerator {
| `- note: class 'HeaderGenerator' does not conform to the 'Sendable' protocol
892 | private let handler: HeaderGenerationHandler?
893 | private let queue = DispatchQueue(label: "com.tuskit.headergenerator")
:
924 | func clearHeaders(for id: UUID) {
925 | queue.async {
926 | self.latestHeaders.removeValue(forKey: id)
| `- warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
927 | }
928 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:932:13: warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
889 | }
890 |
891 | final class HeaderGenerator {
| `- note: class 'HeaderGenerator' does not conform to the 'Sendable' protocol
892 | private let handler: HeaderGenerationHandler?
893 | private let queue = DispatchQueue(label: "com.tuskit.headergenerator")
:
930 | func clearAll() {
931 | queue.async {
932 | self.latestHeaders.removeAll()
| `- warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
933 | }
934 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:949:13: warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
889 | }
890 |
891 | final class HeaderGenerator {
| `- note: class 'HeaderGenerator' does not conform to the 'Sendable' protocol
892 | private let handler: HeaderGenerationHandler?
893 | private let queue = DispatchQueue(label: "com.tuskit.headergenerator")
:
947 | metaData.updateAppliedCustomHeaders(headers)
948 | queue.async {
949 | self.latestHeaders[metaData.id] = headers
| `- warning: capture of 'self' with non-sendable type 'HeaderGenerator' in a '@Sendable' closure
950 | }
951 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:949:32: warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
947 | metaData.updateAppliedCustomHeaders(headers)
948 | queue.async {
949 | self.latestHeaders[metaData.id] = headers
| `- warning: capture of 'metaData' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
950 | }
951 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:13:13: note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
[18/21] Emitting module TUSKit
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:474:18: warning: stored property 'api' of 'Sendable'-conforming class 'SessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
472 | extension TUSAPI {
473 | final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
474 | weak var api: TUSAPI?
| `- warning: stored property 'api' of 'Sendable'-conforming class 'SessionDataDelegate' is mutable; this is an error in the Swift 6 language mode
475 |
476 | func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
[19/21] Compiling TUSKit HTTPURLResponse+Headers.swift
[20/21] Compiling TUSKit String+base64.swift
[21/21] Compiling TUSKit UploadMetada.swift
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:48:17: warning: capture of 'self' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
:
46 | } set {
47 | queue.async {
48 | self._filePath = newValue
| `- warning: capture of 'self' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
49 | }
50 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:63:17: warning: capture of 'self' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
:
61 | } set {
62 | queue.async {
63 | self._remoteDestination = newValue
| `- warning: capture of 'self' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
64 | }
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:77:17: warning: capture of 'self' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
:
75 | } set {
76 | queue.async {
77 | self._uploadedRange = newValue
| `- warning: capture of 'self' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
78 | }
79 | }
/Users/admin/builder/spi-builder-workspace/Sources/TUSKit/UploadMetada.swift:167:13: warning: capture of 'self' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
11 | /// E.g. For background uploading or when an app is killed, we can use this data to continue where we left off.
12 | /// The reason this is a class is to preserve reference semantics while the data is being updated.
13 | final class UploadMetadata: Codable {
| `- note: class 'UploadMetadata' does not conform to the 'Sendable' protocol
14 |
15 | let queue = DispatchQueue(label: "com.tuskit.uploadmetadata")
:
165 | func updateAppliedCustomHeaders(_ headers: [String: String]?) {
166 | queue.async {
167 | self._appliedCustomHeaders = headers
| `- warning: capture of 'self' with non-sendable type 'UploadMetadata' in a '@Sendable' closure
168 | }
169 | }
Build complete! (5.52s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "TUSKit",
"name" : "TUSKit",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "10.0"
},
{
"name" : "macos",
"version" : "11.0"
},
{
"name" : "watchos",
"version" : "8.0"
}
],
"products" : [
{
"name" : "TUSKit",
"targets" : [
"TUSKit"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "TUSKitTests",
"module_type" : "SwiftTarget",
"name" : "TUSKitTests",
"path" : "Tests/TUSKitTests",
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Tests/TUSKitTests/Resources/memeCat.jpg",
"rule" : {
"process" : {
}
}
}
],
"sources" : [
"DataTests.swift",
"FilesTests.swift",
"Fixtures.swift",
"Mocks.swift",
"SchedulerTests.swift",
"Support/NetworkSupport.swift",
"Support/Support.swift",
"TUSAPITests.swift",
"TUSClient/TUSClientInternalTests.swift",
"TUSClient/TUSClientTests.swift",
"TUSClient/TUSClient_CacheTests.swift",
"TUSClient/TUSClient_ContextTests.swift",
"TUSClient/TUSClient_CustomHeadersTests.swift",
"TUSClient/TUSClient_DelegateTests.swift",
"TUSClient/TUSClient_HeaderGenerationTests.swift",
"TUSClient/TUSClient_IdsTests.swift",
"TUSClient/TUSClient_RetryTests.swift",
"TUSClient/TUSClient_UploadingTests.swift"
],
"target_dependencies" : [
"TUSKit"
],
"type" : "test"
},
{
"c99name" : "TUSKit",
"module_type" : "SwiftTarget",
"name" : "TUSKit",
"path" : "Sources/TUSKit",
"product_memberships" : [
"TUSKit"
],
"sources" : [
"Extensions/Collection+chunk.swift",
"Extensions/Data+chunk.swift",
"Extensions/HTTPURLResponse+Headers.swift",
"Extensions/String+base64.swift",
"Files.swift",
"Network.swift",
"Scheduler.swift",
"TUSAPI.swift",
"TUSClient.swift",
"TUSClientError.swift",
"TUSProtocolExtension.swift",
"Tasks/CreationTask.swift",
"Tasks/IdentifiableTask.swift",
"Tasks/StatusTask.swift",
"Tasks/UploadDataTask.swift",
"TusServerInfo.swift",
"UploadInfo.swift",
"UploadMetada.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5.1"
}
Done.