The Swift Package Index logo.Swift Package Index

Build Information

Failed to build TUSKit, reference main (167938), with Swift 6.1 for Android on 11 Feb 2026 21:32:43 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1

Build Log

72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     completed(.failure(TUSClientError.taskCancelled))
   |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
   |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74: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
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     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'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:48:24: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
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
   :
46 |
47 |                 self.queue.async {
48 |                     if self.didCancel { return }
   |                        `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
49 |
50 |                     self.sessionTask = self.api.create(metaData: self.metaData, customHeaders: customHeaders) { [weak self] result in
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     completed(.failure(TUSClientError.taskCancelled))
   |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
   |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74: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
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     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'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:55:44: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
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
   :
53 |                         // File is created remotely. Now start first datatask.
54 |                         self.queue.async {
55 |                             let metaData = self.metaData
   |                                            `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
56 |                             let files = self.files
57 |                             let chunkSize = self.chunkSize
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     completed(.failure(TUSClientError.taskCancelled))
   |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
   |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:93:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
91 |         queue.async {
92 |             self.didCancel = true
93 |             self.sessionTask?.cancel()
   |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
94 |         }
95 |     }
[13/20] Compiling TUSKit CreationTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:28:35: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |     private let headerGenerator: HeaderGenerator
27 |     private var didCancel: Bool = false
28 |     private weak var sessionTask: URLSessionDataTask?
   |                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 |     private let queue = DispatchQueue(label: "com.tuskit.creationtask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:42:16: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
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
   :
40 |     func run(completed: @escaping TaskCompletion) {
41 |         queue.async {
42 |             if self.didCancel { return }
   |                `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
43 |
44 |             self.headerGenerator.resolveHeaders(for: self.metaData) { [weak self] customHeaders in
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     completed(.failure(TUSClientError.taskCancelled))
   |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
   |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74: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
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     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'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:48:24: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
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
   :
46 |
47 |                 self.queue.async {
48 |                     if self.didCancel { return }
   |                        `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
49 |
50 |                     self.sessionTask = self.api.create(metaData: self.metaData, customHeaders: customHeaders) { [weak self] result in
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     completed(.failure(TUSClientError.taskCancelled))
   |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
   |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74: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
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     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'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:55:44: warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
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
   :
53 |                         // File is created remotely. Now start first datatask.
54 |                         self.queue.async {
55 |                             let metaData = self.metaData
   |                                            `- warning: capture of 'self' with non-sendable type 'CreationTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
56 |                             let files = self.files
57 |                             let chunkSize = self.chunkSize
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:74:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
72 |                                 task.progressDelegate = progressDelegate
73 |                                 if self.didCancel {
74 |                                     completed(.failure(TUSClientError.taskCancelled))
   |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
   |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
75 |                                 } else {
76 |                                     completed(.success([task]))
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:93:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
91 |         queue.async {
92 |             self.didCancel = true
93 |             self.sessionTask?.cancel()
   |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
94 |         }
95 |     }
[14/20] Compiling TUSKit IdentifiableTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:27:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 25 |     private let headerGenerator: HeaderGenerator
 26 |     private var didCancel: Bool = false
 27 |     weak var sessionTask: URLSessionDataTask?
    |                           `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 28 |
 29 |     private let queue = DispatchQueue(label: "com.tuskit.statustask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:43:16: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  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
    :
 41 |         // Improvement: On failure, try uploading from the start. Create creationtask.
 42 |         queue.async {
 43 |             if self.didCancel { return }
    |                `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
 44 |
 45 |             self.headerGenerator.resolveHeaders(for: self.metaData) { [weak self] customHeaders in
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     completed(.success([]))
    |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
    |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79: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
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     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'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:49:24: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  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
    :
 47 |
 48 |                 self.queue.async {
 49 |                     if self.didCancel { return }
    |                        `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
 50 |
 51 |                     self.sessionTask = self.api.status(remoteDestination: self.remoteDestination, headers: customHeaders) { [weak self] result in
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     completed(.success([]))
    |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
    |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79: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
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     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'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:56:44: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  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
    :
 54 |                         self.queue.async {
 55 |                             // Getting rid of self. in this closure
 56 |                             let metaData = self.metaData
    |                                            `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
 57 |                             let files = self.files
 58 |                             let chunkSize = self.chunkSize
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     completed(.success([]))
    |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
    |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:113:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
111 |         queue.async {
112 |             self.didCancel = true
113 |             self.sessionTask?.cancel()
    |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
114 |         }
115 |     }
[15/20] Compiling TUSKit StatusTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:27:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 25 |     private let headerGenerator: HeaderGenerator
 26 |     private var didCancel: Bool = false
 27 |     weak var sessionTask: URLSessionDataTask?
    |                           `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 28 |
 29 |     private let queue = DispatchQueue(label: "com.tuskit.statustask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:43:16: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  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
    :
 41 |         // Improvement: On failure, try uploading from the start. Create creationtask.
 42 |         queue.async {
 43 |             if self.didCancel { return }
    |                `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
 44 |
 45 |             self.headerGenerator.resolveHeaders(for: self.metaData) { [weak self] customHeaders in
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     completed(.success([]))
    |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
    |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79: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
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     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'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:49:24: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  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
    :
 47 |
 48 |                 self.queue.async {
 49 |                     if self.didCancel { return }
    |                        `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
 50 |
 51 |                     self.sessionTask = self.api.status(remoteDestination: self.remoteDestination, headers: customHeaders) { [weak self] result in
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     completed(.success([]))
    |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
    |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79: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
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     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'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:56:44: warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
  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
    :
 54 |                         self.queue.async {
 55 |                             // Getting rid of self. in this closure
 56 |                             let metaData = self.metaData
    |                                            `- warning: capture of 'self' with non-sendable type 'StatusTask' in a '@Sendable' closure; this is an error in the Swift 6 language mode
 57 |                             let files = self.files
 58 |                             let chunkSize = self.chunkSize
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:79:37: warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
 77 |
 78 |                                 if offset == metaData.size {
 79 |                                     completed(.success([]))
    |                                     |- warning: capture of 'completed' with non-sendable type 'TaskCompletion' (aka '(Result<Array<any ScheduledTask>, any Error>) -> ()') in a '@Sendable' closure; this is an error in the Swift 6 language mode
    |                                     `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
 80 |                                 } else {
 81 |                                     // If the task has been canceled
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:113:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
111 |         queue.async {
112 |             self.didCancel = true
113 |             self.sessionTask?.cancel()
    |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
114 |         }
115 |     }
[16/20] Compiling TUSKit UploadDataTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:30:30: error: cannot find type 'NSKeyValueObservation' in scope
 28 |     private let files: Files
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
    |                              `- error: cannot find type 'NSKeyValueObservation' in scope
 31 |     private weak var sessionTask: URLSessionUploadTask?
 32 |     private let headerGenerator: HeaderGenerator
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:31:35: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
 31 |     private weak var sessionTask: URLSessionUploadTask?
    |                                   `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |     private let headerGenerator: HeaderGenerator
 33 |
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:175:28: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |
174 |     @available(iOS 11.0, macOS 10.13, *)
175 |     func observeTask(task: URLSessionUploadTask, size: Int) {
    |                            `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |         let targetRange = 0..<size
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:28: error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'progress'
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                            `- error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'progress'
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:45: error: cannot infer key path type from context; consider explicitly specifying a root type
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                             `- error: cannot infer key path type from context; consider explicitly specifying a root type
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:80: error: cannot infer type of closure parameter 'progress' without a type annotation
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                                                                `- error: cannot infer type of closure parameter 'progress' without a type annotation
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:90: error: cannot infer type of closure parameter '_' without a type annotation
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                                                                          `- error: cannot infer type of closure parameter '_' without a type annotation
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:203:17: error: cannot find 'autoreleasepool' in scope
201 |
202 |             return try files.streamingData({
203 |                 autoreleasepool {
    |                 `- error: cannot find 'autoreleasepool' in scope
204 |                     do {
205 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:207:69: error: 'nil' requires a contextual type
205 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
206 |                         try fileHandle.seek(toOffset: UInt64(offset))
207 |                         guard offset < range.endIndex else { return nil }
    |                                                                     `- error: 'nil' requires a contextual type
208 |
209 |                         let data = fileHandle.readData(ofLength: chunkSize)
[17/20] Compiling TUSKit TusServerInfo.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:30:30: error: cannot find type 'NSKeyValueObservation' in scope
 28 |     private let files: Files
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
    |                              `- error: cannot find type 'NSKeyValueObservation' in scope
 31 |     private weak var sessionTask: URLSessionUploadTask?
 32 |     private let headerGenerator: HeaderGenerator
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:31:35: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
 31 |     private weak var sessionTask: URLSessionUploadTask?
    |                                   `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |     private let headerGenerator: HeaderGenerator
 33 |
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:175:28: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |
174 |     @available(iOS 11.0, macOS 10.13, *)
175 |     func observeTask(task: URLSessionUploadTask, size: Int) {
    |                            `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |         let targetRange = 0..<size
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:28: error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'progress'
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                            `- error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'progress'
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:45: error: cannot infer key path type from context; consider explicitly specifying a root type
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                             `- error: cannot infer key path type from context; consider explicitly specifying a root type
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:80: error: cannot infer type of closure parameter 'progress' without a type annotation
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                                                                `- error: cannot infer type of closure parameter 'progress' without a type annotation
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:90: error: cannot infer type of closure parameter '_' without a type annotation
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                                                                          `- error: cannot infer type of closure parameter '_' without a type annotation
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:203:17: error: cannot find 'autoreleasepool' in scope
201 |
202 |             return try files.streamingData({
203 |                 autoreleasepool {
    |                 `- error: cannot find 'autoreleasepool' in scope
204 |                     do {
205 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:207:69: error: 'nil' requires a contextual type
205 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
206 |                         try fileHandle.seek(toOffset: UInt64(offset))
207 |                         guard offset < range.endIndex else { return nil }
    |                                                                     `- error: 'nil' requires a contextual type
208 |
209 |                         let data = fileHandle.readData(ofLength: chunkSize)
[18/20] Compiling TUSKit Collection+chunk.swift
[19/20] Compiling TUSKit Data+chunk.swift
[20/20] Compiling TUSKit String+base64.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:08fa5f1bd27c53c71ebe7c2842e29d52715d90da2c5b8f52513c9039c232613d
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/17] Emitting module TUSKit
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
13 |
14 | // Result support for URLSession
15 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
16 |
17 |     func dataTask(request: URLRequest, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionDataTask {
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:33:67: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | /// - Parameter completion: A completionhandler to call
32 | /// - Returns: A new function that you can pass to URLSession's dataTask
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
   |                                                                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:33:113: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | /// - Parameter completion: A completionhandler to call
32 | /// - Returns: A new function that you can pass to URLSession's dataTask
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
   |                                                                                                                 `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:17:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 15 |     case couldNotRetrieveOffset
 16 |     case couldNotRetrieveLocation
 17 |     case failedRequest(HTTPURLResponse, Data?)
    |                        `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     public var localizedDescription: String {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:64:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 62 |
 63 |     let sessionIdentifier: String?
 64 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 65 |     private let sessionDelegate = SessionDataDelegate()
 66 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:68:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 66 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
 67 |     private var backgroundHandler: (() -> Void)? = nil
 68 |     private var callbacks: [String: (Result<(Data?, HTTPURLResponse), Error>) -> Void] = [:]
    |                                                     `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 69 |     private var taskData: [String: Data] = [:]
 70 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:77:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 75 |     }
 76 |
 77 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 78 |         self.session = session
 79 |         self.sessionIdentifier = session.configuration.identifier
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:83:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 81 |     }
 82 |
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
    |                                `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:90:105: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 88 |
 89 |     @discardableResult
 90 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                         `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 91 |         let request = makeRequest(url: server, method: .options, headers: [:])
 92 |         let task = session.dataTask(request: request) { result in
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:136:133: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 |     ///   - completion: A completion giving us the `Status` of an upload.
135 |     @discardableResult
136 |     func status(remoteDestination: URL, headers: [String: String]?, completion: @escaping (Result<Status, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                                                     `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
137 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
138 |         let identifier = UUID().uuidString
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:176:137: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
174 |     ///   - completion: Completes with a result that gives a URL to upload to.
175 |     @discardableResult
176 |     func create(metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<URL, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                                                         `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
177 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
178 |         let identifier = UUID().uuidString
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:208:90: error: cannot find type 'URLRequest' in scope
206 |     }
207 |
208 |     func makeCreateRequest(metaData: UploadMetadata, customHeaders: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
209 |         func makeUploadMetaHeader() -> [String: String] {
210 |             var metaDataDict: [String: String] = [:]
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:262:184: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
260 |     ///   - completion: Completionhandler for when the upload is finished.
261 |     @discardableResult
262 |     func upload(data: Data, range: Range<Int>?, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<Int, TUSAPIError>) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                        `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 |         let offset: Int
264 |         let length: Int
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:313:189: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
311 |     }
312 |
313 |     func upload(fromFile file: URL, offset: Int = 0, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<Int, TUSAPIError>) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                             `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
314 |         let length: Int
315 |         if let fileAttributes = try? FileManager.default.attributesOfItem(atPath: file.path) {
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:392:90: error: cannot find type 'URLRequest' in scope
390 |     ///   - headers: The headers to add to the request.
391 |     /// - Returns: A new URLRequest to use in any TUS API call.
392 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
393 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
394 |         request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:446:48: error: cannot find type 'URLSessionDataDelegate' in scope
444 |
445 | private extension TUSAPI {
446 |     final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
    |                                                `- error: cannot find type 'URLSessionDataDelegate' in scope
447 |         weak var api: TUSAPI?
448 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:449:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |         weak var api: TUSAPI?
448 |
449 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 |             guard let api, let identifier = dataTask.taskDescription else {
451 |                 return
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:449:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |         weak var api: TUSAPI?
448 |
449 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                                          `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 |             guard let api, let identifier = dataTask.taskDescription else {
451 |                 return
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:457:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
455 |         }
456 |
457 |         func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
458 |             api?.handleCompletionOfTask(task, withError: error)
459 |         }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:457:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
455 |         }
456 |
457 |         func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
458 |             api?.handleCompletionOfTask(task, withError: error)
459 |         }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:461:73: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
459 |         }
460 |
461 |         func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {
    |                                                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
462 |             api?.handleFinishOfBackgroundURLSessionEvents()
463 |         }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:466:41: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
464 |     }
465 |
466 |     func handleCompletionOfTask(_ task: URLSessionTask, withError error: Error?) {
    |                                         `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
467 |         queue.sync {
468 |             guard let identifier = task.taskDescription else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:110:79: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 |     ///   make sure that you provide an empty array in the `supportExtensions` parameter.
109 |     /// - Throws: File related errors when it can't make a directory at the designated path.
110 |     public init(server: URL, sessionIdentifier: String, sessionConfiguration: URLSessionConfiguration,
    |                                                                               `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 |                 storageDirectory: URL? = nil, chunkSize: Int = 500 * 1024,
112 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:157:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
155 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
156 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
157 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
158 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
159 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:157:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
155 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
156 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
157 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
158 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
159 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:192:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
191 |     public init(server: URL, storageDirectory: URL? = nil,
192 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
193 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
194 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:192:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
190 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
191 |     public init(server: URL, storageDirectory: URL? = nil,
192 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
193 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
194 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:28:35: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |     private let headerGenerator: HeaderGenerator
27 |     private var didCancel: Bool = false
28 |     private weak var sessionTask: URLSessionDataTask?
   |                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 |     private let queue = DispatchQueue(label: "com.tuskit.creationtask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:27:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 25 |     private let headerGenerator: HeaderGenerator
 26 |     private var didCancel: Bool = false
 27 |     weak var sessionTask: URLSessionDataTask?
    |                           `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 28 |
 29 |     private let queue = DispatchQueue(label: "com.tuskit.statustask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:30:30: error: cannot find type 'NSKeyValueObservation' in scope
 28 |     private let files: Files
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
    |                              `- error: cannot find type 'NSKeyValueObservation' in scope
 31 |     private weak var sessionTask: URLSessionUploadTask?
 32 |     private let headerGenerator: HeaderGenerator
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:31:35: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
 31 |     private weak var sessionTask: URLSessionUploadTask?
    |                                   `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |     private let headerGenerator: HeaderGenerator
 33 |
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:175:28: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |
174 |     @available(iOS 11.0, macOS 10.13, *)
175 |     func observeTask(task: URLSessionUploadTask, size: Int) {
    |                            `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |         let targetRange = 0..<size
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
[3/19] Compiling TUSKit TUSClient.swift
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:110:79: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 |     ///   make sure that you provide an empty array in the `supportExtensions` parameter.
109 |     /// - Throws: File related errors when it can't make a directory at the designated path.
110 |     public init(server: URL, sessionIdentifier: String, sessionConfiguration: URLSessionConfiguration,
    |                                                                               `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 |                 storageDirectory: URL? = nil, chunkSize: Int = 500 * 1024,
112 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:157:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
155 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
156 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
157 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
158 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
159 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:157:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
155 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
156 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
157 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
158 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
159 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:192:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
191 |     public init(server: URL, storageDirectory: URL? = nil,
192 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
193 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
194 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:192:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
190 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
191 |     public init(server: URL, storageDirectory: URL? = nil,
192 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
193 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
194 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:116:35: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sessionSendsLaunchEvents'
114 |
115 |         if #available(iOS 7.0, macOS 11.0, watchOS 6.0, *) {
116 |           if sessionConfiguration.sessionSendsLaunchEvents == false {
    |                                   `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sessionSendsLaunchEvents'
117 |             print("TUSClient warning: initializing with a session configuration that's not suited for background uploads.")
118 |           }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:195:23: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
193 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
194 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
195 |         guard session.configuration.sessionSendsLaunchEvents == false else {
    |                       `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
196 |             throw TUSClientError.customURLSessionWithBackgroundConfigurationNotSupported
197 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:198:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
196 |             throw TUSClientError.customURLSessionWithBackgroundConfigurationNotSupported
197 |         }
198 |         self.sessionIdentifier = session.configuration.identifier ?? ""
    |                                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
199 |         self.api = TUSAPI(session: session)
200 |         self.files = try Files(storageDirectory: storageDirectory)
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:563:29: warning: result of 'try?' is unused
561 |                     task.taskCompleted(result: result, completed: { [weak self] result in
562 |                         if case .failure = result {
563 |                             try? self?.retry(id: metadata.id)
    |                             `- warning: result of 'try?' is unused
564 |                         }
565 |                     })
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:870:57: warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code; this is an error in the Swift 6 language mode
868 |
869 |         reportingQueue.async {
870 |             self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
    |                                                         `- warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code; this is an error in the Swift 6 language mode
871 |         }
872 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:870:89: warning: reference to captured var 'totalSize' in concurrently-executing code; this is an error in the Swift 6 language mode
868 |
869 |         reportingQueue.async {
870 |             self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
    |                                                                                         `- warning: reference to captured var 'totalSize' in concurrently-executing code; this is an error in the Swift 6 language mode
871 |         }
872 |     }
[4/19] Compiling TUSKit TUSClientError.swift
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:110:79: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
108 |     ///   make sure that you provide an empty array in the `supportExtensions` parameter.
109 |     /// - Throws: File related errors when it can't make a directory at the designated path.
110 |     public init(server: URL, sessionIdentifier: String, sessionConfiguration: URLSessionConfiguration,
    |                                                                               `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
111 |                 storageDirectory: URL? = nil, chunkSize: Int = 500 * 1024,
112 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:157:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
155 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
156 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
157 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
158 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
159 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:157:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
155 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
156 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
157 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
158 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
159 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:192:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
191 |     public init(server: URL, storageDirectory: URL? = nil,
192 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
193 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
194 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:192:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
190 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
191 |     public init(server: URL, storageDirectory: URL? = nil,
192 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
193 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
194 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:116:35: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sessionSendsLaunchEvents'
114 |
115 |         if #available(iOS 7.0, macOS 11.0, watchOS 6.0, *) {
116 |           if sessionConfiguration.sessionSendsLaunchEvents == false {
    |                                   `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sessionSendsLaunchEvents'
117 |             print("TUSClient warning: initializing with a session configuration that's not suited for background uploads.")
118 |           }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:195:23: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
193 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
194 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
195 |         guard session.configuration.sessionSendsLaunchEvents == false else {
    |                       `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
196 |             throw TUSClientError.customURLSessionWithBackgroundConfigurationNotSupported
197 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:198:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
196 |             throw TUSClientError.customURLSessionWithBackgroundConfigurationNotSupported
197 |         }
198 |         self.sessionIdentifier = session.configuration.identifier ?? ""
    |                                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
199 |         self.api = TUSAPI(session: session)
200 |         self.files = try Files(storageDirectory: storageDirectory)
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:563:29: warning: result of 'try?' is unused
561 |                     task.taskCompleted(result: result, completed: { [weak self] result in
562 |                         if case .failure = result {
563 |                             try? self?.retry(id: metadata.id)
    |                             `- warning: result of 'try?' is unused
564 |                         }
565 |                     })
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:870:57: warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code; this is an error in the Swift 6 language mode
868 |
869 |         reportingQueue.async {
870 |             self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
    |                                                         `- warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code; this is an error in the Swift 6 language mode
871 |         }
872 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:870:89: warning: reference to captured var 'totalSize' in concurrently-executing code; this is an error in the Swift 6 language mode
868 |
869 |         reportingQueue.async {
870 |             self.delegate?.totalProgress(bytesUploaded: totalBytesUploaded, totalBytes: totalSize, client: self)
    |                                                                                         `- warning: reference to captured var 'totalSize' in concurrently-executing code; this is an error in the Swift 6 language mode
871 |         }
872 |     }
[5/19] Compiling TUSKit Collection+chunk.swift
[6/19] Compiling TUSKit Data+chunk.swift
[7/19] Compiling TUSKit String+base64.swift
[8/19] Compiling TUSKit IdentifiableTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:27:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 25 |     private let headerGenerator: HeaderGenerator
 26 |     private var didCancel: Bool = false
 27 |     weak var sessionTask: URLSessionDataTask?
    |                           `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 28 |
 29 |     private let queue = DispatchQueue(label: "com.tuskit.statustask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:113:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
111 |         queue.async {
112 |             self.didCancel = true
113 |             self.sessionTask?.cancel()
    |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
114 |         }
115 |     }
[9/19] Compiling TUSKit StatusTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:27:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 25 |     private let headerGenerator: HeaderGenerator
 26 |     private var didCancel: Bool = false
 27 |     weak var sessionTask: URLSessionDataTask?
    |                           `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 28 |
 29 |     private let queue = DispatchQueue(label: "com.tuskit.statustask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:113:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
111 |         queue.async {
112 |             self.didCancel = true
113 |             self.sessionTask?.cancel()
    |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
114 |         }
115 |     }
[10/19] Compiling TUSKit Scheduler.swift
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:17:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 15 |     case couldNotRetrieveOffset
 16 |     case couldNotRetrieveLocation
 17 |     case failedRequest(HTTPURLResponse, Data?)
    |                        `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     public var localizedDescription: String {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:64:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 62 |
 63 |     let sessionIdentifier: String?
 64 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 65 |     private let sessionDelegate = SessionDataDelegate()
 66 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:68:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 66 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
 67 |     private var backgroundHandler: (() -> Void)? = nil
 68 |     private var callbacks: [String: (Result<(Data?, HTTPURLResponse), Error>) -> Void] = [:]
    |                                                     `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 69 |     private var taskData: [String: Data] = [:]
 70 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:77:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 75 |     }
 76 |
 77 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 78 |         self.session = session
 79 |         self.sessionIdentifier = session.configuration.identifier
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:83:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 81 |     }
 82 |
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
    |                                `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:90:105: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 88 |
 89 |     @discardableResult
 90 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                         `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 91 |         let request = makeRequest(url: server, method: .options, headers: [:])
 92 |         let task = session.dataTask(request: request) { result in
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:136:133: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 |     ///   - completion: A completion giving us the `Status` of an upload.
135 |     @discardableResult
136 |     func status(remoteDestination: URL, headers: [String: String]?, completion: @escaping (Result<Status, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                                                     `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
137 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
138 |         let identifier = UUID().uuidString
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:176:137: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
174 |     ///   - completion: Completes with a result that gives a URL to upload to.
175 |     @discardableResult
176 |     func create(metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<URL, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                                                         `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
177 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
178 |         let identifier = UUID().uuidString
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:208:90: error: cannot find type 'URLRequest' in scope
206 |     }
207 |
208 |     func makeCreateRequest(metaData: UploadMetadata, customHeaders: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
209 |         func makeUploadMetaHeader() -> [String: String] {
210 |             var metaDataDict: [String: String] = [:]
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:262:184: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
260 |     ///   - completion: Completionhandler for when the upload is finished.
261 |     @discardableResult
262 |     func upload(data: Data, range: Range<Int>?, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<Int, TUSAPIError>) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                        `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 |         let offset: Int
264 |         let length: Int
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:313:189: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
311 |     }
312 |
313 |     func upload(fromFile file: URL, offset: Int = 0, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<Int, TUSAPIError>) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                             `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
314 |         let length: Int
315 |         if let fileAttributes = try? FileManager.default.attributesOfItem(atPath: file.path) {
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:392:90: error: cannot find type 'URLRequest' in scope
390 |     ///   - headers: The headers to add to the request.
391 |     /// - Returns: A new URLRequest to use in any TUS API call.
392 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
393 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
394 |         request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:446:48: error: cannot find type 'URLSessionDataDelegate' in scope
444 |
445 | private extension TUSAPI {
446 |     final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
    |                                                `- error: cannot find type 'URLSessionDataDelegate' in scope
447 |         weak var api: TUSAPI?
448 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:449:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |         weak var api: TUSAPI?
448 |
449 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 |             guard let api, let identifier = dataTask.taskDescription else {
451 |                 return
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:449:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |         weak var api: TUSAPI?
448 |
449 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                                          `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 |             guard let api, let identifier = dataTask.taskDescription else {
451 |                 return
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:457:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
455 |         }
456 |
457 |         func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
458 |             api?.handleCompletionOfTask(task, withError: error)
459 |         }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:457:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
455 |         }
456 |
457 |         func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
458 |             api?.handleCompletionOfTask(task, withError: error)
459 |         }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:461:73: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
459 |         }
460 |
461 |         func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {
    |                                                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
462 |             api?.handleFinishOfBackgroundURLSessionEvents()
463 |         }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:466:41: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
464 |     }
465 |
466 |     func handleCompletionOfTask(_ task: URLSessionTask, withError error: Error?) {
    |                                         `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
467 |         queue.sync {
468 |             guard let identifier = task.taskDescription else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:33:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 31 |         case .failedRequest(let response, let data):
 32 |             if let data, let message = String(data: data, encoding: .utf8) {
 33 |                 return "Failed request with status code \(response.statusCode): \(message)"
    |                                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 34 |             } else {
 35 |                 return "Failed request with status code \(response.statusCode)."
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:35:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 33 |                 return "Failed request with status code \(response.statusCode): \(message)"
 34 |             } else {
 35 |                 return "Failed request with status code \(response.statusCode)."
    |                                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 36 |             }
 37 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:72:20: error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
 70 |
 71 |     deinit {
 72 |         if session.delegate is SessionDataDelegate {
    |                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
 73 |             session.finishTasksAndInvalidate()
 74 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:73:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
 71 |     deinit {
 72 |         if session.delegate is SessionDataDelegate {
 73 |             session.finishTasksAndInvalidate()
    |                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
 74 |         }
 75 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:79:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
 77 |     init(session: URLSession) {
 78 |         self.session = session
 79 |         self.sessionIdentifier = session.configuration.identifier
    |                                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
 80 |         self.sessionDelegate.api = self
 81 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:84:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 82 |
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
    |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
 86 |         self.sessionDelegate.api = self
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:84:114: error: 'nil' requires a contextual type
 82 |
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
    |                                                                                                                  `- error: 'nil' requires a contextual type
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
 86 |         self.sessionDelegate.api = self
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:85:55: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'identifier'
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
    |                                                       `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'identifier'
 86 |         self.sessionDelegate.api = self
 87 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:91:57: error: cannot infer contextual base in reference to member 'options'
 89 |     @discardableResult
 90 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
 91 |         let request = makeRequest(url: server, method: .options, headers: [:])
    |                                                         `- error: cannot infer contextual base in reference to member 'options'
 92 |         let task = session.dataTask(request: request) { result in
 93 |             processResult(completion: completion) {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:92:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 90 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
 91 |         let request = makeRequest(url: server, method: .options, headers: [:])
 92 |         let task = session.dataTask(request: request) { result in
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 93 |             processResult(completion: completion) {
 94 |                 let (_, response) = try result.get()
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:137:68: error: cannot infer contextual base in reference to member 'head'
135 |     @discardableResult
136 |     func status(remoteDestination: URL, headers: [String: String]?, completion: @escaping (Result<Status, TUSAPIError>) -> Void) -> URLSessionDataTask {
137 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
    |                                                                    `- error: cannot infer contextual base in reference to member 'head'
138 |         let identifier = UUID().uuidString
139 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:140:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
138 |         let identifier = UUID().uuidString
139 |
140 |         let task = session.dataTask(with: request)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
141 |         task.taskDescription = identifier
142 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:142:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
140 |         let task = session.dataTask(with: request)
141 |         task.taskDescription = identifier
142 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
143 |             task.delegate = sessionDelegate
144 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:151:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
149 |                     let (data, response) =  try result.get()
150 |
151 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
152 |                         throw TUSAPIError.failedRequest(response, data)
153 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:179:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
177 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
178 |         let identifier = UUID().uuidString
179 |         let task = session.dataTask(with: request)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
180 |         task.taskDescription = identifier
181 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:181:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
179 |         let task = session.dataTask(with: request)
180 |         task.taskDescription = identifier
181 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
182 |             task.delegate = sessionDelegate
183 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:190:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
188 |                     let (data, response) = try result.get()
189 |
190 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
191 |                         throw TUSAPIError.failedRequest(response, data)
192 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:283:59: error: cannot infer contextual base in reference to member 'patch'
281 |         let headersWithCustom = headers.merging(customHeaders) { _, new in new }
282 |
283 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
284 |         let task = session.uploadTask(with: request, from: data)
285 |         task.taskDescription = metaData.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:284:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
282 |
283 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
284 |         let task = session.uploadTask(with: request, from: data)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
285 |         task.taskDescription = metaData.id.uuidString
286 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:286:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
284 |         let task = session.uploadTask(with: request, from: data)
285 |         task.taskDescription = metaData.id.uuidString
286 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
287 |             task.delegate = sessionDelegate
288 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:295:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
293 |                     let (data, response) = try result.get()
294 |
295 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
296 |                         throw TUSAPIError.failedRequest(response, data)
297 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:334:59: error: cannot infer contextual base in reference to member 'patch'
332 |         let headersWithCustom = headers.merging(customHeaders) { _, new in new }
333 |
334 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
335 |         let task = session.uploadTask(with: request, fromFile: file)
336 |         task.taskDescription = metaData.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:335:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
333 |
334 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
335 |         let task = session.uploadTask(with: request, fromFile: file)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
336 |         task.taskDescription = metaData.id.uuidString
337 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:337:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
335 |         let task = session.uploadTask(with: request, fromFile: file)
336 |         task.taskDescription = metaData.id.uuidString
337 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
338 |             task.delegate = sessionDelegate
339 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:345:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
343 |                 processResult(completion: completion) {
344 |                     let (data, response) = try result.get()
345 |                     guard let offsetStr = response.allHeaderFields[caseInsensitive: "upload-offset"] as? String,
    |                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
346 |                           let offset = Int(offsetStr) else {
347 |                         throw TUSAPIError.couldNotRetrieveOffset
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:362:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
360 |                 processResult(completion: completion) {
361 |                     let (data, response) = try result.get()
362 |                     guard let offsetStr = response.allHeaderFields[caseInsensitive: "upload-offset"] as? String,
    |                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
363 |                           let offset = Int(offsetStr) else {
364 |                         throw TUSAPIError.couldNotRetrieveOffset
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:377:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'getAllTasks'
375 |
376 |     func checkTaskExists(for metadata: UploadMetadata, completion: @escaping (Bool) -> Void) {
377 |         session.getAllTasks(completionHandler: { tasks in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'getAllTasks'
378 |             let hasTask = tasks.contains(where: { task in
379 |                 return task.taskDescription == metadata.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:393:23: error: cannot find 'URLRequest' in scope
391 |     /// - Returns: A new URLRequest to use in any TUS API call.
392 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
393 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
    |                       `- error: cannot find 'URLRequest' in scope
394 |         request.httpMethod = method.rawValue
395 |         request.addValue("1.0.0", forHTTPHeaderField: "TUS-Resumable")
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:393:58: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
391 |     /// - Returns: A new URLRequest to use in any TUS API call.
392 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
393 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
    |                                                          `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
394 |         request.httpMethod = method.rawValue
395 |         request.addValue("1.0.0", forHTTPHeaderField: "TUS-Resumable")
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:450:54: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskDescription'
448 |
449 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
450 |             guard let api, let identifier = dataTask.taskDescription else {
    |                                                      `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskDescription'
451 |                 return
452 |             }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:467:20: error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
465 |
466 |     func handleCompletionOfTask(_ task: URLSessionTask, withError error: Error?) {
467 |         queue.sync {
    |                    `- error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
468 |             guard let identifier = task.taskDescription else {
469 |                 return
Dispatch.DispatchQueue.sync:3:15: note: 'sync(execute:)' declared here
1 | class DispatchQueue {
2 | @available(macOS 10.10, iOS 8.0, *)
3 |   public func sync(execute workItem: DispatchWorkItem)}
  |               `- note: 'sync(execute:)' declared here
4 |
[11/19] Compiling TUSKit TUSAPI.swift
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:17:24: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 15 |     case couldNotRetrieveOffset
 16 |     case couldNotRetrieveLocation
 17 |     case failedRequest(HTTPURLResponse, Data?)
    |                        `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |
 19 |     public var localizedDescription: String {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:64:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 62 |
 63 |     let sessionIdentifier: String?
 64 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 65 |     private let sessionDelegate = SessionDataDelegate()
 66 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:68:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 66 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
 67 |     private var backgroundHandler: (() -> Void)? = nil
 68 |     private var callbacks: [String: (Result<(Data?, HTTPURLResponse), Error>) -> Void] = [:]
    |                                                     `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 69 |     private var taskData: [String: Data] = [:]
 70 |
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:77:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 75 |     }
 76 |
 77 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 78 |         self.session = session
 79 |         self.sessionIdentifier = session.configuration.identifier
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:83:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 81 |     }
 82 |
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
    |                                `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionConfiguration = AnyObject
  |                  `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:90:105: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 88 |
 89 |     @discardableResult
 90 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                         `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 91 |         let request = makeRequest(url: server, method: .options, headers: [:])
 92 |         let task = session.dataTask(request: request) { result in
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:136:133: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
134 |     ///   - completion: A completion giving us the `Status` of an upload.
135 |     @discardableResult
136 |     func status(remoteDestination: URL, headers: [String: String]?, completion: @escaping (Result<Status, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                                                     `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
137 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
138 |         let identifier = UUID().uuidString
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:176:137: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
174 |     ///   - completion: Completes with a result that gives a URL to upload to.
175 |     @discardableResult
176 |     func create(metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<URL, TUSAPIError>) -> Void) -> URLSessionDataTask {
    |                                                                                                                                         `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
177 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
178 |         let identifier = UUID().uuidString
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:208:90: error: cannot find type 'URLRequest' in scope
206 |     }
207 |
208 |     func makeCreateRequest(metaData: UploadMetadata, customHeaders: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
209 |         func makeUploadMetaHeader() -> [String: String] {
210 |             var metaDataDict: [String: String] = [:]
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:262:184: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
260 |     ///   - completion: Completionhandler for when the upload is finished.
261 |     @discardableResult
262 |     func upload(data: Data, range: Range<Int>?, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<Int, TUSAPIError>) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                        `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
263 |         let offset: Int
264 |         let length: Int
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:313:189: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
311 |     }
312 |
313 |     func upload(fromFile file: URL, offset: Int = 0, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (Result<Int, TUSAPIError>) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                             `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
314 |         let length: Int
315 |         if let fileAttributes = try? FileManager.default.attributesOfItem(atPath: file.path) {
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:392:90: error: cannot find type 'URLRequest' in scope
390 |     ///   - headers: The headers to add to the request.
391 |     /// - Returns: A new URLRequest to use in any TUS API call.
392 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
393 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
394 |         request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:446:48: error: cannot find type 'URLSessionDataDelegate' in scope
444 |
445 | private extension TUSAPI {
446 |     final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
    |                                                `- error: cannot find type 'URLSessionDataDelegate' in scope
447 |         weak var api: TUSAPI?
448 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:449:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |         weak var api: TUSAPI?
448 |
449 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 |             guard let api, let identifier = dataTask.taskDescription else {
451 |                 return
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:449:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
447 |         weak var api: TUSAPI?
448 |
449 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
    |                                                          `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
450 |             guard let api, let identifier = dataTask.taskDescription else {
451 |                 return
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:457:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
455 |         }
456 |
457 |         func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
458 |             api?.handleCompletionOfTask(task, withError: error)
459 |         }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:457:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
455 |         }
456 |
457 |         func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
    |                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
458 |             api?.handleCompletionOfTask(task, withError: error)
459 |         }
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:461:73: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
459 |         }
460 |
461 |         func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {
    |                                                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
462 |             api?.handleFinishOfBackgroundURLSessionEvents()
463 |         }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:466:41: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
464 |     }
465 |
466 |     func handleCompletionOfTask(_ task: URLSessionTask, withError error: Error?) {
    |                                         `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
467 |         queue.sync {
468 |             guard let identifier = task.taskDescription else {
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:33:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 31 |         case .failedRequest(let response, let data):
 32 |             if let data, let message = String(data: data, encoding: .utf8) {
 33 |                 return "Failed request with status code \(response.statusCode): \(message)"
    |                                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 34 |             } else {
 35 |                 return "Failed request with status code \(response.statusCode)."
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:35:68: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 33 |                 return "Failed request with status code \(response.statusCode): \(message)"
 34 |             } else {
 35 |                 return "Failed request with status code \(response.statusCode)."
    |                                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 36 |             }
 37 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:72:20: error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
 70 |
 71 |     deinit {
 72 |         if session.delegate is SessionDataDelegate {
    |                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
 73 |             session.finishTasksAndInvalidate()
 74 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:73:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
 71 |     deinit {
 72 |         if session.delegate is SessionDataDelegate {
 73 |             session.finishTasksAndInvalidate()
    |                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
 74 |         }
 75 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:79:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
 77 |     init(session: URLSession) {
 78 |         self.session = session
 79 |         self.sessionIdentifier = session.configuration.identifier
    |                                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
 80 |         self.sessionDelegate.api = self
 81 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:84:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 82 |
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
    |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
 86 |         self.sessionDelegate.api = self
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:84:114: error: 'nil' requires a contextual type
 82 |
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
    |                                                                                                                  `- error: 'nil' requires a contextual type
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
 86 |         self.sessionDelegate.api = self
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:85:55: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'identifier'
 83 |     init(sessionConfiguration: URLSessionConfiguration) {
 84 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 85 |         self.sessionIdentifier = sessionConfiguration.identifier
    |                                                       `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'identifier'
 86 |         self.sessionDelegate.api = self
 87 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:91:57: error: cannot infer contextual base in reference to member 'options'
 89 |     @discardableResult
 90 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
 91 |         let request = makeRequest(url: server, method: .options, headers: [:])
    |                                                         `- error: cannot infer contextual base in reference to member 'options'
 92 |         let task = session.dataTask(request: request) { result in
 93 |             processResult(completion: completion) {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:92:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 90 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
 91 |         let request = makeRequest(url: server, method: .options, headers: [:])
 92 |         let task = session.dataTask(request: request) { result in
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 93 |             processResult(completion: completion) {
 94 |                 let (_, response) = try result.get()
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:137:68: error: cannot infer contextual base in reference to member 'head'
135 |     @discardableResult
136 |     func status(remoteDestination: URL, headers: [String: String]?, completion: @escaping (Result<Status, TUSAPIError>) -> Void) -> URLSessionDataTask {
137 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
    |                                                                    `- error: cannot infer contextual base in reference to member 'head'
138 |         let identifier = UUID().uuidString
139 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:140:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
138 |         let identifier = UUID().uuidString
139 |
140 |         let task = session.dataTask(with: request)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
141 |         task.taskDescription = identifier
142 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:142:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
140 |         let task = session.dataTask(with: request)
141 |         task.taskDescription = identifier
142 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
143 |             task.delegate = sessionDelegate
144 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:151:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
149 |                     let (data, response) =  try result.get()
150 |
151 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
152 |                         throw TUSAPIError.failedRequest(response, data)
153 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:179:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
177 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
178 |         let identifier = UUID().uuidString
179 |         let task = session.dataTask(with: request)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
180 |         task.taskDescription = identifier
181 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:181:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
179 |         let task = session.dataTask(with: request)
180 |         task.taskDescription = identifier
181 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
182 |             task.delegate = sessionDelegate
183 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:190:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
188 |                     let (data, response) = try result.get()
189 |
190 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
191 |                         throw TUSAPIError.failedRequest(response, data)
192 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:283:59: error: cannot infer contextual base in reference to member 'patch'
281 |         let headersWithCustom = headers.merging(customHeaders) { _, new in new }
282 |
283 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
284 |         let task = session.uploadTask(with: request, from: data)
285 |         task.taskDescription = metaData.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:284:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
282 |
283 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
284 |         let task = session.uploadTask(with: request, from: data)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
285 |         task.taskDescription = metaData.id.uuidString
286 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:286:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
284 |         let task = session.uploadTask(with: request, from: data)
285 |         task.taskDescription = metaData.id.uuidString
286 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
287 |             task.delegate = sessionDelegate
288 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:295:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
293 |                     let (data, response) = try result.get()
294 |
295 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
296 |                         throw TUSAPIError.failedRequest(response, data)
297 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:334:59: error: cannot infer contextual base in reference to member 'patch'
332 |         let headersWithCustom = headers.merging(customHeaders) { _, new in new }
333 |
334 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
335 |         let task = session.uploadTask(with: request, fromFile: file)
336 |         task.taskDescription = metaData.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:335:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
333 |
334 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
335 |         let task = session.uploadTask(with: request, fromFile: file)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
336 |         task.taskDescription = metaData.id.uuidString
337 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:337:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
335 |         let task = session.uploadTask(with: request, fromFile: file)
336 |         task.taskDescription = metaData.id.uuidString
337 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
338 |             task.delegate = sessionDelegate
339 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:345:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
343 |                 processResult(completion: completion) {
344 |                     let (data, response) = try result.get()
345 |                     guard let offsetStr = response.allHeaderFields[caseInsensitive: "upload-offset"] as? String,
    |                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
346 |                           let offset = Int(offsetStr) else {
347 |                         throw TUSAPIError.couldNotRetrieveOffset
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:362:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
360 |                 processResult(completion: completion) {
361 |                     let (data, response) = try result.get()
362 |                     guard let offsetStr = response.allHeaderFields[caseInsensitive: "upload-offset"] as? String,
    |                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
363 |                           let offset = Int(offsetStr) else {
364 |                         throw TUSAPIError.couldNotRetrieveOffset
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:377:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'getAllTasks'
375 |
376 |     func checkTaskExists(for metadata: UploadMetadata, completion: @escaping (Bool) -> Void) {
377 |         session.getAllTasks(completionHandler: { tasks in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'getAllTasks'
378 |             let hasTask = tasks.contains(where: { task in
379 |                 return task.taskDescription == metadata.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:393:23: error: cannot find 'URLRequest' in scope
391 |     /// - Returns: A new URLRequest to use in any TUS API call.
392 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
393 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
    |                       `- error: cannot find 'URLRequest' in scope
394 |         request.httpMethod = method.rawValue
395 |         request.addValue("1.0.0", forHTTPHeaderField: "TUS-Resumable")
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:393:58: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
391 |     /// - Returns: A new URLRequest to use in any TUS API call.
392 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
393 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
    |                                                          `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
394 |         request.httpMethod = method.rawValue
395 |         request.addValue("1.0.0", forHTTPHeaderField: "TUS-Resumable")
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:450:54: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskDescription'
448 |
449 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
450 |             guard let api, let identifier = dataTask.taskDescription else {
    |                                                      `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskDescription'
451 |                 return
452 |             }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:467:20: error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
465 |
466 |     func handleCompletionOfTask(_ task: URLSessionTask, withError error: Error?) {
467 |         queue.sync {
    |                    `- error: trailing closure passed to parameter of type 'DispatchWorkItem' that does not accept a closure
468 |             guard let identifier = task.taskDescription else {
469 |                 return
Dispatch.DispatchQueue.sync:3:15: note: 'sync(execute:)' declared here
1 | class DispatchQueue {
2 | @available(macOS 10.10, iOS 8.0, *)
3 |   public func sync(execute workItem: DispatchWorkItem)}
  |               `- note: 'sync(execute:)' declared here
4 |
[12/19] Compiling TUSKit UploadDataTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:30:30: error: cannot find type 'NSKeyValueObservation' in scope
 28 |     private let files: Files
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
    |                              `- error: cannot find type 'NSKeyValueObservation' in scope
 31 |     private weak var sessionTask: URLSessionUploadTask?
 32 |     private let headerGenerator: HeaderGenerator
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:31:35: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
 31 |     private weak var sessionTask: URLSessionUploadTask?
    |                                   `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |     private let headerGenerator: HeaderGenerator
 33 |
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:175:28: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |
174 |     @available(iOS 11.0, macOS 10.13, *)
175 |     func observeTask(task: URLSessionUploadTask, size: Int) {
    |                            `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |         let targetRange = 0..<size
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:28: error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'progress'
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                            `- error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'progress'
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:45: error: cannot infer key path type from context; consider explicitly specifying a root type
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                             `- error: cannot infer key path type from context; consider explicitly specifying a root type
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:80: error: cannot infer type of closure parameter 'progress' without a type annotation
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                                                                `- error: cannot infer type of closure parameter 'progress' without a type annotation
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:90: error: cannot infer type of closure parameter '_' without a type annotation
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                                                                          `- error: cannot infer type of closure parameter '_' without a type annotation
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:203:17: error: cannot find 'autoreleasepool' in scope
201 |
202 |             return try files.streamingData({
203 |                 autoreleasepool {
    |                 `- error: cannot find 'autoreleasepool' in scope
204 |                     do {
205 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:207:69: error: 'nil' requires a contextual type
205 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
206 |                         try fileHandle.seek(toOffset: UInt64(offset))
207 |                         guard offset < range.endIndex else { return nil }
    |                                                                     `- error: 'nil' requires a contextual type
208 |
209 |                         let data = fileHandle.readData(ofLength: chunkSize)
[13/19] Compiling TUSKit TusServerInfo.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:30:30: error: cannot find type 'NSKeyValueObservation' in scope
 28 |     private let files: Files
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
    |                              `- error: cannot find type 'NSKeyValueObservation' in scope
 31 |     private weak var sessionTask: URLSessionUploadTask?
 32 |     private let headerGenerator: HeaderGenerator
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:31:35: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 29 |     private let range: Range<Int>?
 30 |     private var observation: NSKeyValueObservation?
 31 |     private weak var sessionTask: URLSessionUploadTask?
    |                                   `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 32 |     private let headerGenerator: HeaderGenerator
 33 |
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:175:28: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
173 |
174 |     @available(iOS 11.0, macOS 10.13, *)
175 |     func observeTask(task: URLSessionUploadTask, size: Int) {
    |                            `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
176 |         let targetRange = 0..<size
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
Foundation.URLSessionUploadTask:2:18: note: 'URLSessionUploadTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionUploadTask = AnyObject
  |                  `- note: 'URLSessionUploadTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:28: error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'progress'
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                            `- error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'progress'
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:45: error: cannot infer key path type from context; consider explicitly specifying a root type
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                             `- error: cannot infer key path type from context; consider explicitly specifying a root type
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:80: error: cannot infer type of closure parameter 'progress' without a type annotation
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                                                                `- error: cannot infer type of closure parameter 'progress' without a type annotation
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:179:90: error: cannot infer type of closure parameter '_' without a type annotation
177 |         let uploaded = metaData.uploadedRange?.count ?? 0
178 |
179 |         observation = task.progress.observe(\.fractionCompleted) { [weak self] progress, _ in
    |                                                                                          `- error: cannot infer type of closure parameter '_' without a type annotation
180 |             guard let self = self else { return }
181 |             self.queue.async {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:203:17: error: cannot find 'autoreleasepool' in scope
201 |
202 |             return try files.streamingData({
203 |                 autoreleasepool {
    |                 `- error: cannot find 'autoreleasepool' in scope
204 |                     do {
205 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:207:69: error: 'nil' requires a contextual type
205 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
206 |                         try fileHandle.seek(toOffset: UInt64(offset))
207 |                         guard offset < range.endIndex else { return nil }
    |                                                                     `- error: 'nil' requires a contextual type
208 |
209 |                         let data = fileHandle.readData(ofLength: chunkSize)
[14/19] Compiling TUSKit Files.swift
/host/spi-builder-workspace/Sources/TUSKit/Files.swift:174:37: warning: result of call to 'createFile(atPath:contents:attributes:)' is unused
172 |             let targetLocation = storageDirectory.appendingPathComponent(fileName)
173 |             if !FileManager.default.fileExists(atPath: targetLocation.path) {
174 |                 FileManager.default.createFile(atPath: targetLocation.path, contents: nil)
    |                                     `- warning: result of call to 'createFile(atPath:contents:attributes:)' is unused
175 |             }
176 |
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
13 |
14 | // Result support for URLSession
15 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
16 |
17 |     func dataTask(request: URLRequest, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionDataTask {
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:33:67: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | /// - Parameter completion: A completionhandler to call
32 | /// - Returns: A new function that you can pass to URLSession's dataTask
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
   |                                                                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:33:113: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | /// - Parameter completion: A completionhandler to call
32 | /// - Returns: A new function that you can pass to URLSession's dataTask
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
   |                                                                                                                 `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:35:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
   |                                           `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
36 |             completion(.failure(NetworkError.noHTTPURLResponse))
37 |             return
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:35:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
   |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |             completion(.failure(NetworkError.noHTTPURLResponse))
37 |             return
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:17:28: error: cannot find type 'URLRequest' in scope
15 | extension URLSession {
16 |
17 |     func dataTask(request: URLRequest, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionDataTask {
   |                            `- error: cannot find type 'URLRequest' in scope
18 |         return dataTask(with: request, completionHandler: makeCompletion(completion: completion))
19 |     }
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:21:30: error: cannot find type 'URLRequest' in scope
19 |     }
20 |
21 |     func uploadTask(request: URLRequest, data: Data, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionUploadTask {
   |                              `- error: cannot find type 'URLRequest' in scope
22 |         return uploadTask(with: request, from: data, completionHandler: makeCompletion(completion: completion))
23 |     }
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:25:35: error: cannot find type 'URLRequest' in scope
23 |     }
24 |
25 |     func uploadTask(with request: URLRequest, fromFile file: URL, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionUploadTask {
   |                                   `- error: cannot find type 'URLRequest' in scope
26 |         return uploadTask(with: request, fromFile: file, completionHandler: makeCompletion(completion: completion))
27 |     }
[15/19] Compiling TUSKit Network.swift
/host/spi-builder-workspace/Sources/TUSKit/Files.swift:174:37: warning: result of call to 'createFile(atPath:contents:attributes:)' is unused
172 |             let targetLocation = storageDirectory.appendingPathComponent(fileName)
173 |             if !FileManager.default.fileExists(atPath: targetLocation.path) {
174 |                 FileManager.default.createFile(atPath: targetLocation.path, contents: nil)
    |                                     `- warning: result of call to 'createFile(atPath:contents:attributes:)' is unused
175 |             }
176 |
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
13 |
14 | // Result support for URLSession
15 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
16 |
17 |     func dataTask(request: URLRequest, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionDataTask {
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:33:67: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | /// - Parameter completion: A completionhandler to call
32 | /// - Returns: A new function that you can pass to URLSession's dataTask
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
   |                                                                   `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:33:113: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 | /// - Parameter completion: A completionhandler to call
32 | /// - Returns: A new function that you can pass to URLSession's dataTask
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
   |                                                                                                                 `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:35:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
   |                                           `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
36 |             completion(.failure(NetworkError.noHTTPURLResponse))
37 |             return
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:35:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | private func makeCompletion(completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> (Data?, URLResponse?, Error?) -> Void {
34 |     return { data, response, error in
35 |         guard let httpResponse = response as? HTTPURLResponse else {
   |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
36 |             completion(.failure(NetworkError.noHTTPURLResponse))
37 |             return
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:17:28: error: cannot find type 'URLRequest' in scope
15 | extension URLSession {
16 |
17 |     func dataTask(request: URLRequest, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionDataTask {
   |                            `- error: cannot find type 'URLRequest' in scope
18 |         return dataTask(with: request, completionHandler: makeCompletion(completion: completion))
19 |     }
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:21:30: error: cannot find type 'URLRequest' in scope
19 |     }
20 |
21 |     func uploadTask(request: URLRequest, data: Data, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionUploadTask {
   |                              `- error: cannot find type 'URLRequest' in scope
22 |         return uploadTask(with: request, from: data, completionHandler: makeCompletion(completion: completion))
23 |     }
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:25:35: error: cannot find type 'URLRequest' in scope
23 |     }
24 |
25 |     func uploadTask(with request: URLRequest, fromFile file: URL, completion: @escaping (Result<(Data?, HTTPURLResponse), Error>) -> Void) -> URLSessionUploadTask {
   |                                   `- error: cannot find type 'URLRequest' in scope
26 |         return uploadTask(with: request, fromFile: file, completionHandler: makeCompletion(completion: completion))
27 |     }
[16/19] Compiling TUSKit TUSProtocolExtension.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:28:35: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |     private let headerGenerator: HeaderGenerator
27 |     private var didCancel: Bool = false
28 |     private weak var sessionTask: URLSessionDataTask?
   |                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 |     private let queue = DispatchQueue(label: "com.tuskit.creationtask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:93:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
91 |         queue.async {
92 |             self.didCancel = true
93 |             self.sessionTask?.cancel()
   |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
94 |         }
95 |     }
[17/19] Compiling TUSKit CreationTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:28:35: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 |     private let headerGenerator: HeaderGenerator
27 |     private var didCancel: Bool = false
28 |     private weak var sessionTask: URLSessionDataTask?
   |                                   `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
29 |
30 |     private let queue = DispatchQueue(label: "com.tuskit.creationtask")
Foundation.URLSessionDataTask:2:18: note: 'URLSessionDataTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionDataTask = AnyObject
  |                  `- note: 'URLSessionDataTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:93:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
91 |         queue.async {
92 |             self.didCancel = true
93 |             self.sessionTask?.cancel()
   |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
94 |         }
95 |     }
[18/19] Compiling TUSKit UploadInfo.swift
[19/19] Compiling TUSKit UploadMetada.swift
BUILD FAILURE 6.1 android