The Swift Package Index logo.Swift Package Index

Build Information

Failed to build TUSKit, reference main (2bc1fb), with Swift 6.2 for Linux on 13 Oct 2026 12:32:01 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-54344849-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 5.1.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/tus/TUSKit.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/tus/TUSKit
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 2bc1fb4 Add FUNDING.yml pointing to the tus Open Collective (#232)
Cloned https://github.com/tus/TUSKit.git
Revision (git rev-parse @):
2bc1fb4dff7b83f0ba52da1e7b886b742d7d0a02
SUCCESS checkout https://github.com/tus/TUSKit.git at main
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.2
Building package at path:  $PWD
https://github.com/tus/TUSKit.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344849-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:basic-6.2-latest swift build --triple x86_64-unknown-linux-gnu 2>&1
basic-6.2-latest: Pulling from saguaro1/spi-images
Digest: sha256:24009fa1488c01937630ee3297a7a7a1872c773069724929dff85071fefc3743
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:basic-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/19] Emitting module TUSKit
/host/spi-builder-workspace/Sources/TUSKit/Extensions/HTTPURLResponse+Headers.swift:10:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
 8 | import Foundation
 9 |
10 | extension HTTPURLResponse {
   | `- error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
11 |     func extractHeaders() -> [String: String] {
12 |         var headers: [String: String] = [:]
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
13 |
14 | // Result support for URLSession
15 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
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:66:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 64 |
 65 |     let sessionIdentifier: String?
 66 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 67 |     private let sessionDelegate = SessionDataDelegate()
 68 |     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:70:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 68 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
 69 |     private var backgroundHandler: (() -> Void)? = nil
 70 |     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.
 71 |     private var taskData: [String: Data] = [:]
 72 |     private var progressObservations: [String: NSKeyValueObservation] = [:]
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:72:48: error: cannot find type 'NSKeyValueObservation' in scope
 70 |     private var callbacks: [String: (Result<(Data?, HTTPURLResponse), Error>) -> Void] = [:]
 71 |     private var taskData: [String: Data] = [:]
 72 |     private var progressObservations: [String: NSKeyValueObservation] = [:]
    |                                                `- error: cannot find type 'NSKeyValueObservation' in scope
 73 |     weak var progressDelegate: ProgressDelegate?
 74 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:82:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 80 |     }
 81 |
 82 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 83 |         self.session = session
 84 |         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:88:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 86 |     }
 87 |
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
    |                                `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 90 |         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:95:105: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 93 |
 94 |     @discardableResult
 95 |     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.
 96 |         let request = makeRequest(url: server, method: .options, headers: [:])
 97 |         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:141:133: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |     ///   - completion: A completion giving us the `Status` of an upload.
140 |     @discardableResult
141 |     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.
142 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
143 |         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:181:137: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
179 |     ///   - completion: Completes with a result that gives a URL to upload to.
180 |     @discardableResult
181 |     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.
182 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
183 |         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:213:90: error: cannot find type 'URLRequest' in scope
211 |     }
212 |
213 |     func makeCreateRequest(metaData: UploadMetadata, customHeaders: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
214 |         func makeUploadMetaHeader() -> [String: String] {
215 |             var metaDataDict: [String: String] = [:]
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:267:176: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - completion: Completionhandler for when the upload is finished.
266 |     @discardableResult
267 |     func upload(data: Data, range: Range<Int>?, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (UploadTaskResult) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         let offset: Int
269 |         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:320:181: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
318 |     }
319 |
320 |     func upload(fromFile file: URL, offset: Int = 0, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (UploadTaskResult) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                     `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
321 |         let length: Int
322 |         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:366:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
364 |     }
365 |
366 |     func observeProgressForCompatibility(task: URLSessionTask, totalBytesExpectedToSend: Int64) {
    |                                                `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
367 |         guard let identifier = task.taskDescription else { return }
368 |
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:379:40: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
377 |     }
378 |
379 |     func handleProgressForTask(_ task: URLSessionTask, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                        `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
380 |         guard let identifier = task.taskDescription, let id = UUID(uuidString: identifier) else { return }
381 |         progressDelegate?.progressUpdated(forID: id, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
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:419:90: error: cannot find type 'URLRequest' in scope
417 |     ///   - headers: The headers to add to the request.
418 |     /// - Returns: A new URLRequest to use in any TUS API call.
419 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
420 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
421 |         request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:473:48: error: cannot find type 'URLSessionDataDelegate' in scope
471 |
472 | extension TUSAPI {
473 |     final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
    |                                                `- error: cannot find type 'URLSessionDataDelegate' in scope
474 |         weak var api: TUSAPI?
475 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:476:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
474 |         weak var api: TUSAPI?
475 |
476 |         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.
477 |             guard let api, let identifier = dataTask.taskDescription else {
478 |                 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:476:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
474 |         weak var api: TUSAPI?
475 |
476 |         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.
477 |             guard let api, let identifier = dataTask.taskDescription else {
478 |                 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:484:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |         }
483 |
484 |         func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |             api?.handleProgressForTask(task, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
486 |         }
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:484:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |         }
483 |
484 |         func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |             api?.handleProgressForTask(task, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
486 |         }
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:488:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
486 |         }
487 |
488 |         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.
489 |             api?.handleCompletionOfTask(task, withError: error)
490 |         }
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:488:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
486 |         }
487 |
488 |         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.
489 |             api?.handleCompletionOfTask(task, withError: error)
490 |         }
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:492:73: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
490 |         }
491 |
492 |         func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {
    |                                                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
493 |             api?.handleFinishOfBackgroundURLSessionEvents()
494 |         }
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:497:41: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
495 |     }
496 |
497 |     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.
498 |         queue.sync {
499 |             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:116:79: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     ///   make sure that you provide an empty array in the `supportExtensions` parameter.
115 |     /// - Throws: File related errors when it can't make a directory at the designated path.
116 |     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.
117 |                 storageDirectory: URL? = nil, chunkSize: Int = 500 * 1024,
118 |                 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:164:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 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.
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 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:164:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:164:50: error: default argument value of type '_' cannot be converted to type 'AnyObject'
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: default argument value of type '_' cannot be converted to type 'AnyObject'
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:200:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 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.
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 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:200:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:200:50: error: default argument value of type '_' cannot be converted to type 'AnyObject'
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: default argument value of type '_' cannot be converted to type 'AnyObject'
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:27:35: 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 |     private 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.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:26:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 24 |     private let headerGenerator: HeaderGenerator
 25 |     private var didCancel: Bool = false
 26 |     weak var sessionTask: URLSessionDataTask?
    |                           `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |
 28 |     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:29:35: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |     private let files: Files
 28 |     private let range: Range<Int>?
 29 |     private weak var sessionTask: URLSessionUploadTask?
    |                                   `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 30 |     private let headerGenerator: HeaderGenerator
 31 |
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
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[4/21] 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:66:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 64 |
 65 |     let sessionIdentifier: String?
 66 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 67 |     private let sessionDelegate = SessionDataDelegate()
 68 |     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:70:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 68 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
 69 |     private var backgroundHandler: (() -> Void)? = nil
 70 |     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.
 71 |     private var taskData: [String: Data] = [:]
 72 |     private var progressObservations: [String: NSKeyValueObservation] = [:]
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:72:48: error: cannot find type 'NSKeyValueObservation' in scope
 70 |     private var callbacks: [String: (Result<(Data?, HTTPURLResponse), Error>) -> Void] = [:]
 71 |     private var taskData: [String: Data] = [:]
 72 |     private var progressObservations: [String: NSKeyValueObservation] = [:]
    |                                                `- error: cannot find type 'NSKeyValueObservation' in scope
 73 |     weak var progressDelegate: ProgressDelegate?
 74 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:82:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 80 |     }
 81 |
 82 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 83 |         self.session = session
 84 |         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:88:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 86 |     }
 87 |
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
    |                                `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 90 |         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:95:105: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 93 |
 94 |     @discardableResult
 95 |     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.
 96 |         let request = makeRequest(url: server, method: .options, headers: [:])
 97 |         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:141:133: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |     ///   - completion: A completion giving us the `Status` of an upload.
140 |     @discardableResult
141 |     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.
142 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
143 |         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:181:137: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
179 |     ///   - completion: Completes with a result that gives a URL to upload to.
180 |     @discardableResult
181 |     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.
182 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
183 |         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:213:90: error: cannot find type 'URLRequest' in scope
211 |     }
212 |
213 |     func makeCreateRequest(metaData: UploadMetadata, customHeaders: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
214 |         func makeUploadMetaHeader() -> [String: String] {
215 |             var metaDataDict: [String: String] = [:]
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:267:176: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - completion: Completionhandler for when the upload is finished.
266 |     @discardableResult
267 |     func upload(data: Data, range: Range<Int>?, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (UploadTaskResult) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         let offset: Int
269 |         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:320:181: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
318 |     }
319 |
320 |     func upload(fromFile file: URL, offset: Int = 0, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (UploadTaskResult) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                     `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
321 |         let length: Int
322 |         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:366:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
364 |     }
365 |
366 |     func observeProgressForCompatibility(task: URLSessionTask, totalBytesExpectedToSend: Int64) {
    |                                                `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
367 |         guard let identifier = task.taskDescription else { return }
368 |
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:379:40: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
377 |     }
378 |
379 |     func handleProgressForTask(_ task: URLSessionTask, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                        `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
380 |         guard let identifier = task.taskDescription, let id = UUID(uuidString: identifier) else { return }
381 |         progressDelegate?.progressUpdated(forID: id, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
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:419:90: error: cannot find type 'URLRequest' in scope
417 |     ///   - headers: The headers to add to the request.
418 |     /// - Returns: A new URLRequest to use in any TUS API call.
419 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
420 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
421 |         request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:473:48: error: cannot find type 'URLSessionDataDelegate' in scope
471 |
472 | extension TUSAPI {
473 |     final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
    |                                                `- error: cannot find type 'URLSessionDataDelegate' in scope
474 |         weak var api: TUSAPI?
475 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:476:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
474 |         weak var api: TUSAPI?
475 |
476 |         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.
477 |             guard let api, let identifier = dataTask.taskDescription else {
478 |                 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:476:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
474 |         weak var api: TUSAPI?
475 |
476 |         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.
477 |             guard let api, let identifier = dataTask.taskDescription else {
478 |                 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:484:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |         }
483 |
484 |         func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |             api?.handleProgressForTask(task, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
486 |         }
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:484:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |         }
483 |
484 |         func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |             api?.handleProgressForTask(task, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
486 |         }
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:488:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
486 |         }
487 |
488 |         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.
489 |             api?.handleCompletionOfTask(task, withError: error)
490 |         }
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:488:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
486 |         }
487 |
488 |         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.
489 |             api?.handleCompletionOfTask(task, withError: error)
490 |         }
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:492:73: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
490 |         }
491 |
492 |         func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {
    |                                                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
493 |             api?.handleFinishOfBackgroundURLSessionEvents()
494 |         }
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:497:41: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
495 |     }
496 |
497 |     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.
498 |         queue.sync {
499 |             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:77:20: error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
 75 |     deinit {
 76 |         progressObservations.values.forEach { $0.invalidate() }
 77 |         if session.delegate is SessionDataDelegate {
    |                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
 78 |             session.finishTasksAndInvalidate()
 79 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:78:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
 76 |         progressObservations.values.forEach { $0.invalidate() }
 77 |         if session.delegate is SessionDataDelegate {
 78 |             session.finishTasksAndInvalidate()
    |                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
 79 |         }
 80 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:84:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
 82 |     init(session: URLSession) {
 83 |         self.session = session
 84 |         self.sessionIdentifier = session.configuration.identifier
    |                                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
 85 |         self.sessionDelegate.api = self
 86 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:89:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 87 |
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
    |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 90 |         self.sessionIdentifier = sessionConfiguration.identifier
 91 |         self.sessionDelegate.api = self
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:89:114: error: 'nil' requires a contextual type
 87 |
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
    |                                                                                                                  `- error: 'nil' requires a contextual type
 90 |         self.sessionIdentifier = sessionConfiguration.identifier
 91 |         self.sessionDelegate.api = self
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:90:55: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'identifier'
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 90 |         self.sessionIdentifier = sessionConfiguration.identifier
    |                                                       `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'identifier'
 91 |         self.sessionDelegate.api = self
 92 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:96:57: error: cannot infer contextual base in reference to member 'options'
 94 |     @discardableResult
 95 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
 96 |         let request = makeRequest(url: server, method: .options, headers: [:])
    |                                                         `- error: cannot infer contextual base in reference to member 'options'
 97 |         let task = session.dataTask(request: request) { result in
 98 |             processResult(completion: completion) {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:97:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 95 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
 96 |         let request = makeRequest(url: server, method: .options, headers: [:])
 97 |         let task = session.dataTask(request: request) { result in
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 98 |             processResult(completion: completion) {
 99 |                 let (_, response) = try result.get()
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:142:68: error: cannot infer contextual base in reference to member 'head'
140 |     @discardableResult
141 |     func status(remoteDestination: URL, headers: [String: String]?, completion: @escaping (Result<Status, TUSAPIError>) -> Void) -> URLSessionDataTask {
142 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
    |                                                                    `- error: cannot infer contextual base in reference to member 'head'
143 |         let identifier = UUID().uuidString
144 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:145:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
143 |         let identifier = UUID().uuidString
144 |
145 |         let task = session.dataTask(with: request)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
146 |         task.taskDescription = identifier
147 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:147:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
145 |         let task = session.dataTask(with: request)
146 |         task.taskDescription = identifier
147 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
148 |             task.delegate = sessionDelegate
149 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:156:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
154 |                     let (data, response) =  try result.get()
155 |
156 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
157 |                         throw TUSAPIError.failedRequest(response, data)
158 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:184:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
182 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
183 |         let identifier = UUID().uuidString
184 |         let task = session.dataTask(with: request)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
185 |         task.taskDescription = identifier
186 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:186:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
184 |         let task = session.dataTask(with: request)
185 |         task.taskDescription = identifier
186 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
187 |             task.delegate = sessionDelegate
188 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:195:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
193 |                     let (data, response) = try result.get()
194 |
195 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
196 |                         throw TUSAPIError.failedRequest(response, data)
197 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:288:59: error: cannot infer contextual base in reference to member 'patch'
286 |         let headersWithCustom = headers.merging(customHeaders) { _, new in new }
287 |
288 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
289 |         let task = session.uploadTask(with: request, from: data)
290 |         task.taskDescription = metaData.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:289:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
287 |
288 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
289 |         let task = session.uploadTask(with: request, from: data)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
290 |         task.taskDescription = metaData.id.uuidString
291 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:291:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
289 |         let task = session.uploadTask(with: request, from: data)
290 |         task.taskDescription = metaData.id.uuidString
291 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
292 |             task.delegate = sessionDelegate
293 |         } else if !(session.delegate is SessionDataDelegate) {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:293:29: error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
291 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
292 |             task.delegate = sessionDelegate
293 |         } else if !(session.delegate is SessionDataDelegate) {
    |                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
294 |             observeProgressForCompatibility(task: task, totalBytesExpectedToSend: Int64(data.count))
295 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:302:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
300 |                     let (data, response) = try result.get()
301 |
302 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
303 |                         throw TUSAPIError.failedRequest(response, data)
304 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:341:59: error: cannot infer contextual base in reference to member 'patch'
339 |         let headersWithCustom = headers.merging(customHeaders) { _, new in new }
340 |
341 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
342 |         let task = session.uploadTask(with: request, fromFile: file)
343 |         task.taskDescription = metaData.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:342:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
340 |
341 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
342 |         let task = session.uploadTask(with: request, fromFile: file)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
343 |         task.taskDescription = metaData.id.uuidString
344 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:344:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
342 |         let task = session.uploadTask(with: request, fromFile: file)
343 |         task.taskDescription = metaData.id.uuidString
344 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
345 |             task.delegate = sessionDelegate
346 |         } else if !(session.delegate is SessionDataDelegate) {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:346:29: error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
344 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
345 |             task.delegate = sessionDelegate
346 |         } else if !(session.delegate is SessionDataDelegate) {
    |                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
347 |             observeProgressForCompatibility(task: task, totalBytesExpectedToSend: Int64(length))
348 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:354:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
352 |                 processResult(completion: completion) {
353 |                     let (_, response) = try result.get()
354 |                     guard let offsetStr = response.allHeaderFields[caseInsensitive: "upload-offset"] as? String,
    |                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
355 |                           let offset = Int(offsetStr) else {
356 |                         throw TUSAPIError.couldNotRetrieveOffset
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:367:37: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
365 |
366 |     func observeProgressForCompatibility(task: URLSessionTask, totalBytesExpectedToSend: Int64) {
367 |         guard let identifier = task.taskDescription else { return }
    |                                     `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:369:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'progress'
367 |         guard let identifier = task.taskDescription else { return }
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
    |                                `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'progress'
370 |             guard let self, let task else { return }
371 |             self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:369:49: error: cannot infer key path type from context; consider explicitly specifying a root type
367 |         guard let identifier = task.taskDescription else { return }
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
    |                                                 `- error: cannot infer key path type from context; consider explicitly specifying a root type
370 |             guard let self, let task else { return }
371 |             self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:369:96: error: cannot infer type of closure parameter 'progress' without a type annotation
367 |         guard let identifier = task.taskDescription else { return }
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
    |                                                                                                `- error: cannot infer type of closure parameter 'progress' without a type annotation
370 |             guard let self, let task else { return }
371 |             self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:369:106: error: cannot infer type of closure parameter '_' without a type annotation
367 |         guard let identifier = task.taskDescription else { return }
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
    |                                                                                                          `- error: cannot infer type of closure parameter '_' without a type annotation
370 |             guard let self, let task else { return }
371 |             self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:380:37: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
378 |
379 |     func handleProgressForTask(_ task: URLSessionTask, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
380 |         guard let identifier = task.taskDescription, let id = UUID(uuidString: identifier) else { return }
    |                                     `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
381 |         progressDelegate?.progressUpdated(forID: id, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
382 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:389:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
387 |                 processResult(completion: completion) {
388 |                     let (_, response) = try result.get()
389 |                     guard let offsetStr = response.allHeaderFields[caseInsensitive: "upload-offset"] as? String,
    |                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
390 |                           let offset = Int(offsetStr) else {
391 |                         throw TUSAPIError.couldNotRetrieveOffset
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:404:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'getAllTasks'
402 |
403 |     func checkTaskExists(for metadata: UploadMetadata, completion: @escaping (Bool) -> Void) {
404 |         session.getAllTasks(completionHandler: { tasks in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'getAllTasks'
405 |             let hasTask = tasks.contains(where: { task in
406 |                 return task.taskDescription == metadata.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:420:23: error: cannot find 'URLRequest' in scope
418 |     /// - Returns: A new URLRequest to use in any TUS API call.
419 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
420 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
    |                       `- error: cannot find 'URLRequest' in scope
421 |         request.httpMethod = method.rawValue
422 |         request.addValue("1.0.0", forHTTPHeaderField: "TUS-Resumable")
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:420:58: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
418 |     /// - Returns: A new URLRequest to use in any TUS API call.
419 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
420 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
    |                                                          `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
421 |         request.httpMethod = method.rawValue
422 |         request.addValue("1.0.0", forHTTPHeaderField: "TUS-Resumable")
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:477:54: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskDescription'
475 |
476 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
477 |             guard let api, let identifier = dataTask.taskDescription else {
    |                                                      `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskDescription'
478 |                 return
479 |             }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:499:41: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
497 |     func handleCompletionOfTask(_ task: URLSessionTask, withError error: Error?) {
498 |         queue.sync {
499 |             guard let identifier = task.taskDescription else {
    |                                         `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
500 |                 return
501 |             }
[5/21] 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:66:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 64 |
 65 |     let sessionIdentifier: String?
 66 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 67 |     private let sessionDelegate = SessionDataDelegate()
 68 |     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:70:53: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 68 |     private let queue = DispatchQueue(label: "com.tus.TUSAPI")
 69 |     private var backgroundHandler: (() -> Void)? = nil
 70 |     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.
 71 |     private var taskData: [String: Data] = [:]
 72 |     private var progressObservations: [String: NSKeyValueObservation] = [:]
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:72:48: error: cannot find type 'NSKeyValueObservation' in scope
 70 |     private var callbacks: [String: (Result<(Data?, HTTPURLResponse), Error>) -> Void] = [:]
 71 |     private var taskData: [String: Data] = [:]
 72 |     private var progressObservations: [String: NSKeyValueObservation] = [:]
    |                                                `- error: cannot find type 'NSKeyValueObservation' in scope
 73 |     weak var progressDelegate: ProgressDelegate?
 74 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:82:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 80 |     }
 81 |
 82 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 83 |         self.session = session
 84 |         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:88:32: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 86 |     }
 87 |
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
    |                                `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 90 |         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:95:105: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 93 |
 94 |     @discardableResult
 95 |     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.
 96 |         let request = makeRequest(url: server, method: .options, headers: [:])
 97 |         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:141:133: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 |     ///   - completion: A completion giving us the `Status` of an upload.
140 |     @discardableResult
141 |     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.
142 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
143 |         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:181:137: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
179 |     ///   - completion: Completes with a result that gives a URL to upload to.
180 |     @discardableResult
181 |     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.
182 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
183 |         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:213:90: error: cannot find type 'URLRequest' in scope
211 |     }
212 |
213 |     func makeCreateRequest(metaData: UploadMetadata, customHeaders: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
214 |         func makeUploadMetaHeader() -> [String: String] {
215 |             var metaDataDict: [String: String] = [:]
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:267:176: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - completion: Completionhandler for when the upload is finished.
266 |     @discardableResult
267 |     func upload(data: Data, range: Range<Int>?, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (UploadTaskResult) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         let offset: Int
269 |         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:320:181: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
318 |     }
319 |
320 |     func upload(fromFile file: URL, offset: Int = 0, location: URL, metaData: UploadMetadata, customHeaders: [String: String], completion: @escaping (UploadTaskResult) -> Void) -> URLSessionUploadTask {
    |                                                                                                                                                                                     `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
321 |         let length: Int
322 |         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:366:48: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
364 |     }
365 |
366 |     func observeProgressForCompatibility(task: URLSessionTask, totalBytesExpectedToSend: Int64) {
    |                                                `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
367 |         guard let identifier = task.taskDescription else { return }
368 |
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:379:40: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
377 |     }
378 |
379 |     func handleProgressForTask(_ task: URLSessionTask, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                        `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
380 |         guard let identifier = task.taskDescription, let id = UUID(uuidString: identifier) else { return }
381 |         progressDelegate?.progressUpdated(forID: id, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
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:419:90: error: cannot find type 'URLRequest' in scope
417 |     ///   - headers: The headers to add to the request.
418 |     /// - Returns: A new URLRequest to use in any TUS API call.
419 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
    |                                                                                          `- error: cannot find type 'URLRequest' in scope
420 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
421 |         request.httpMethod = method.rawValue
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:473:48: error: cannot find type 'URLSessionDataDelegate' in scope
471 |
472 | extension TUSAPI {
473 |     final class SessionDataDelegate: NSObject, URLSessionDataDelegate {
    |                                                `- error: cannot find type 'URLSessionDataDelegate' in scope
474 |         weak var api: TUSAPI?
475 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:476:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
474 |         weak var api: TUSAPI?
475 |
476 |         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.
477 |             guard let api, let identifier = dataTask.taskDescription else {
478 |                 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:476:58: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
474 |         weak var api: TUSAPI?
475 |
476 |         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.
477 |             guard let api, let identifier = dataTask.taskDescription else {
478 |                 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:484:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |         }
483 |
484 |         func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                    `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |             api?.handleProgressForTask(task, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
486 |         }
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:484:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
482 |         }
483 |
484 |         func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                                      `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
485 |             api?.handleProgressForTask(task, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
486 |         }
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:488:36: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
486 |         }
487 |
488 |         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.
489 |             api?.handleCompletionOfTask(task, withError: error)
490 |         }
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:488:54: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
486 |         }
487 |
488 |         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.
489 |             api?.handleCompletionOfTask(task, withError: error)
490 |         }
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:492:73: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
490 |         }
491 |
492 |         func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {
    |                                                                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
493 |             api?.handleFinishOfBackgroundURLSessionEvents()
494 |         }
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:497:41: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
495 |     }
496 |
497 |     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.
498 |         queue.sync {
499 |             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:77:20: error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
 75 |     deinit {
 76 |         progressObservations.values.forEach { $0.invalidate() }
 77 |         if session.delegate is SessionDataDelegate {
    |                    `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
 78 |             session.finishTasksAndInvalidate()
 79 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:78:21: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
 76 |         progressObservations.values.forEach { $0.invalidate() }
 77 |         if session.delegate is SessionDataDelegate {
 78 |             session.finishTasksAndInvalidate()
    |                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
 79 |         }
 80 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:84:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
 82 |     init(session: URLSession) {
 83 |         self.session = session
 84 |         self.sessionIdentifier = session.configuration.identifier
    |                                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
 85 |         self.sessionDelegate.api = self
 86 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:89:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 87 |
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
    |                        `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 90 |         self.sessionIdentifier = sessionConfiguration.identifier
 91 |         self.sessionDelegate.api = self
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:89:114: error: 'nil' requires a contextual type
 87 |
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
    |                                                                                                                  `- error: 'nil' requires a contextual type
 90 |         self.sessionIdentifier = sessionConfiguration.identifier
 91 |         self.sessionDelegate.api = self
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:90:55: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'identifier'
 88 |     init(sessionConfiguration: URLSessionConfiguration) {
 89 |         self.session = URLSession(configuration: sessionConfiguration, delegate: sessionDelegate, delegateQueue: nil)
 90 |         self.sessionIdentifier = sessionConfiguration.identifier
    |                                                       `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'identifier'
 91 |         self.sessionDelegate.api = self
 92 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:96:57: error: cannot infer contextual base in reference to member 'options'
 94 |     @discardableResult
 95 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
 96 |         let request = makeRequest(url: server, method: .options, headers: [:])
    |                                                         `- error: cannot infer contextual base in reference to member 'options'
 97 |         let task = session.dataTask(request: request) { result in
 98 |             processResult(completion: completion) {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:97:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 95 |     func serverInfo(server: URL, completion: @escaping (Result<TusServerInfo, TUSAPIError>) -> Void) -> URLSessionDataTask {
 96 |         let request = makeRequest(url: server, method: .options, headers: [:])
 97 |         let task = session.dataTask(request: request) { result in
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 98 |             processResult(completion: completion) {
 99 |                 let (_, response) = try result.get()
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:142:68: error: cannot infer contextual base in reference to member 'head'
140 |     @discardableResult
141 |     func status(remoteDestination: URL, headers: [String: String]?, completion: @escaping (Result<Status, TUSAPIError>) -> Void) -> URLSessionDataTask {
142 |         let request = makeRequest(url: remoteDestination, method: .head, headers: headers ?? [:])
    |                                                                    `- error: cannot infer contextual base in reference to member 'head'
143 |         let identifier = UUID().uuidString
144 |
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:145:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
143 |         let identifier = UUID().uuidString
144 |
145 |         let task = session.dataTask(with: request)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
146 |         task.taskDescription = identifier
147 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:147:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
145 |         let task = session.dataTask(with: request)
146 |         task.taskDescription = identifier
147 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
148 |             task.delegate = sessionDelegate
149 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:156:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
154 |                     let (data, response) =  try result.get()
155 |
156 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
157 |                         throw TUSAPIError.failedRequest(response, data)
158 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:184:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
182 |         let request = makeCreateRequest(metaData: metaData, customHeaders: customHeaders)
183 |         let identifier = UUID().uuidString
184 |         let task = session.dataTask(with: request)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
185 |         task.taskDescription = identifier
186 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:186:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
184 |         let task = session.dataTask(with: request)
185 |         task.taskDescription = identifier
186 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
187 |             task.delegate = sessionDelegate
188 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:195:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
193 |                     let (data, response) = try result.get()
194 |
195 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
196 |                         throw TUSAPIError.failedRequest(response, data)
197 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:288:59: error: cannot infer contextual base in reference to member 'patch'
286 |         let headersWithCustom = headers.merging(customHeaders) { _, new in new }
287 |
288 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
289 |         let task = session.uploadTask(with: request, from: data)
290 |         task.taskDescription = metaData.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:289:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
287 |
288 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
289 |         let task = session.uploadTask(with: request, from: data)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
290 |         task.taskDescription = metaData.id.uuidString
291 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:291:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
289 |         let task = session.uploadTask(with: request, from: data)
290 |         task.taskDescription = metaData.id.uuidString
291 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
292 |             task.delegate = sessionDelegate
293 |         } else if !(session.delegate is SessionDataDelegate) {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:293:29: error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
291 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
292 |             task.delegate = sessionDelegate
293 |         } else if !(session.delegate is SessionDataDelegate) {
    |                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
294 |             observeProgressForCompatibility(task: task, totalBytesExpectedToSend: Int64(data.count))
295 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:302:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
300 |                     let (data, response) = try result.get()
301 |
302 |                     guard (200...299).contains(response.statusCode) else {
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
303 |                         throw TUSAPIError.failedRequest(response, data)
304 |                     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:341:59: error: cannot infer contextual base in reference to member 'patch'
339 |         let headersWithCustom = headers.merging(customHeaders) { _, new in new }
340 |
341 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
    |                                                           `- error: cannot infer contextual base in reference to member 'patch'
342 |         let task = session.uploadTask(with: request, fromFile: file)
343 |         task.taskDescription = metaData.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:342:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
340 |
341 |         let request = makeRequest(url: location, method: .patch, headers: headersWithCustom)
342 |         let task = session.uploadTask(with: request, fromFile: file)
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'uploadTask'
343 |         task.taskDescription = metaData.id.uuidString
344 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:344:56: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
342 |         let task = session.uploadTask(with: request, fromFile: file)
343 |         task.taskDescription = metaData.id.uuidString
344 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
    |                                                        `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
345 |             task.delegate = sessionDelegate
346 |         } else if !(session.delegate is SessionDataDelegate) {
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:346:29: error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
344 |         if #available(iOS 15.0, macOS 12, *), !session.configuration.sessionSendsLaunchEvents {
345 |             task.delegate = sessionDelegate
346 |         } else if !(session.delegate is SessionDataDelegate) {
    |                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'delegate'
347 |             observeProgressForCompatibility(task: task, totalBytesExpectedToSend: Int64(length))
348 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:354:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
352 |                 processResult(completion: completion) {
353 |                     let (_, response) = try result.get()
354 |                     guard let offsetStr = response.allHeaderFields[caseInsensitive: "upload-offset"] as? String,
    |                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
355 |                           let offset = Int(offsetStr) else {
356 |                         throw TUSAPIError.couldNotRetrieveOffset
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:367:37: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
365 |
366 |     func observeProgressForCompatibility(task: URLSessionTask, totalBytesExpectedToSend: Int64) {
367 |         guard let identifier = task.taskDescription else { return }
    |                                     `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:369:32: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'progress'
367 |         guard let identifier = task.taskDescription else { return }
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
    |                                `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'progress'
370 |             guard let self, let task else { return }
371 |             self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:369:49: error: cannot infer key path type from context; consider explicitly specifying a root type
367 |         guard let identifier = task.taskDescription else { return }
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
    |                                                 `- error: cannot infer key path type from context; consider explicitly specifying a root type
370 |             guard let self, let task else { return }
371 |             self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:369:96: error: cannot infer type of closure parameter 'progress' without a type annotation
367 |         guard let identifier = task.taskDescription else { return }
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
    |                                                                                                `- error: cannot infer type of closure parameter 'progress' without a type annotation
370 |             guard let self, let task else { return }
371 |             self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:369:106: error: cannot infer type of closure parameter '_' without a type annotation
367 |         guard let identifier = task.taskDescription else { return }
368 |
369 |         let observation = task.progress.observe(\.completedUnitCount) { [weak self, weak task] progress, _ in
    |                                                                                                          `- error: cannot infer type of closure parameter '_' without a type annotation
370 |             guard let self, let task else { return }
371 |             self.handleProgressForTask(task, totalBytesSent: progress.completedUnitCount, totalBytesExpectedToSend: totalBytesExpectedToSend)
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:380:37: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
378 |
379 |     func handleProgressForTask(_ task: URLSessionTask, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
380 |         guard let identifier = task.taskDescription, let id = UUID(uuidString: identifier) else { return }
    |                                     `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
381 |         progressDelegate?.progressUpdated(forID: id, totalBytesSent: totalBytesSent, totalBytesExpectedToSend: totalBytesExpectedToSend)
382 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:389:52: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
387 |                 processResult(completion: completion) {
388 |                     let (_, response) = try result.get()
389 |                     guard let offsetStr = response.allHeaderFields[caseInsensitive: "upload-offset"] as? String,
    |                                                    `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
390 |                           let offset = Int(offsetStr) else {
391 |                         throw TUSAPIError.couldNotRetrieveOffset
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:404:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'getAllTasks'
402 |
403 |     func checkTaskExists(for metadata: UploadMetadata, completion: @escaping (Bool) -> Void) {
404 |         session.getAllTasks(completionHandler: { tasks in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'getAllTasks'
405 |             let hasTask = tasks.contains(where: { task in
406 |                 return task.taskDescription == metadata.id.uuidString
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:420:23: error: cannot find 'URLRequest' in scope
418 |     /// - Returns: A new URLRequest to use in any TUS API call.
419 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
420 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
    |                       `- error: cannot find 'URLRequest' in scope
421 |         request.httpMethod = method.rawValue
422 |         request.addValue("1.0.0", forHTTPHeaderField: "TUS-Resumable")
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:420:58: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
418 |     /// - Returns: A new URLRequest to use in any TUS API call.
419 |     private func makeRequest(url: URL, method: HTTPMethod, headers: [String: String]) -> URLRequest {
420 |         var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30)
    |                                                          `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
421 |         request.httpMethod = method.rawValue
422 |         request.addValue("1.0.0", forHTTPHeaderField: "TUS-Resumable")
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:477:54: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskDescription'
475 |
476 |         func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {
477 |             guard let api, let identifier = dataTask.taskDescription else {
    |                                                      `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'taskDescription'
478 |                 return
479 |             }
/host/spi-builder-workspace/Sources/TUSKit/TUSAPI.swift:499:41: error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
497 |     func handleCompletionOfTask(_ task: URLSessionTask, withError error: Error?) {
498 |         queue.sync {
499 |             guard let identifier = task.taskDescription else {
    |                                         `- error: value of type 'URLSessionTask' (aka 'AnyObject') has no member 'taskDescription'
500 |                 return
501 |             }
[6/21] Compiling TUSKit UploadDataTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:29:35: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |     private let files: Files
 28 |     private let range: Range<Int>?
 29 |     private weak var sessionTask: URLSessionUploadTask?
    |                                   `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 30 |     private let headerGenerator: HeaderGenerator
 31 |
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:173:17: error: cannot find 'autoreleasepool' in scope
171 |
172 |             return try files.streamingData({
173 |                 autoreleasepool {
    |                 `- error: cannot find 'autoreleasepool' in scope
174 |                     do {
175 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:177:69: error: 'nil' requires a contextual type
175 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
176 |                         try fileHandle.seek(toOffset: UInt64(offset))
177 |                         guard offset < range.endIndex else { return nil }
    |                                                                     `- error: 'nil' requires a contextual type
178 |
179 |                         let data = fileHandle.readData(ofLength: chunkSize)
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:205:31: error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'cancel'
203 |         queue.async {
204 |             self.isCanceled = true
205 |             self.sessionTask?.cancel()
    |                               `- error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'cancel'
206 |         }
207 |     }
[7/21] Compiling TUSKit TusServerInfo.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:29:35: error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |     private let files: Files
 28 |     private let range: Range<Int>?
 29 |     private weak var sessionTask: URLSessionUploadTask?
    |                                   `- error: 'URLSessionUploadTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 30 |     private let headerGenerator: HeaderGenerator
 31 |
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:173:17: error: cannot find 'autoreleasepool' in scope
171 |
172 |             return try files.streamingData({
173 |                 autoreleasepool {
    |                 `- error: cannot find 'autoreleasepool' in scope
174 |                     do {
175 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:177:69: error: 'nil' requires a contextual type
175 |                         let chunkSize = min(1024 * 1024 * 500, range.endIndex - offset)
176 |                         try fileHandle.seek(toOffset: UInt64(offset))
177 |                         guard offset < range.endIndex else { return nil }
    |                                                                     `- error: 'nil' requires a contextual type
178 |
179 |                         let data = fileHandle.readData(ofLength: chunkSize)
/host/spi-builder-workspace/Sources/TUSKit/Tasks/UploadDataTask.swift:205:31: error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'cancel'
203 |         queue.async {
204 |             self.isCanceled = true
205 |             self.sessionTask?.cancel()
    |                               `- error: value of type 'URLSessionUploadTask' (aka 'AnyObject') has no member 'cancel'
206 |         }
207 |     }
[8/21] Compiling TUSKit UploadInfo.swift
[9/21] Compiling TUSKit UploadMetada.swift
[10/21] Compiling TUSKit TUSProtocolExtension.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:27:35: 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 |     private 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.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:90:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
88 |         queue.async {
89 |             self.didCancel = true
90 |             self.sessionTask?.cancel()
   |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
91 |         }
92 |     }
[11/21] Compiling TUSKit CreationTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/CreationTask.swift:27:35: 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 |     private 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.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:90:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
88 |         queue.async {
89 |             self.didCancel = true
90 |             self.sessionTask?.cancel()
   |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
91 |         }
92 |     }
[12/21] Compiling TUSKit IdentifiableTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:26:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 24 |     private let headerGenerator: HeaderGenerator
 25 |     private var didCancel: Bool = false
 26 |     weak var sessionTask: URLSessionDataTask?
    |                           `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |
 28 |     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:110:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
108 |         queue.async {
109 |             self.didCancel = true
110 |             self.sessionTask?.cancel()
    |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
111 |         }
112 |     }
[13/21] Compiling TUSKit StatusTask.swift
/host/spi-builder-workspace/Sources/TUSKit/Tasks/StatusTask.swift:26:27: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 24 |     private let headerGenerator: HeaderGenerator
 25 |     private var didCancel: Bool = false
 26 |     weak var sessionTask: URLSessionDataTask?
    |                           `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 27 |
 28 |     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:110:31: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
108 |         queue.async {
109 |             self.didCancel = true
110 |             self.sessionTask?.cancel()
    |                               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
111 |         }
112 |     }
[14/21] Compiling TUSKit Collection+chunk.swift
/host/spi-builder-workspace/Sources/TUSKit/Extensions/HTTPURLResponse+Headers.swift:10:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
 8 | import Foundation
 9 |
10 | extension HTTPURLResponse {
   | `- error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
11 |     func extractHeaders() -> [String: String] {
12 |         var headers: [String: String] = [:]
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[15/21] Compiling TUSKit Data+chunk.swift
/host/spi-builder-workspace/Sources/TUSKit/Extensions/HTTPURLResponse+Headers.swift:10:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
 8 | import Foundation
 9 |
10 | extension HTTPURLResponse {
   | `- error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
11 |     func extractHeaders() -> [String: String] {
12 |         var headers: [String: String] = [:]
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[16/21] Compiling TUSKit HTTPURLResponse+Headers.swift
/host/spi-builder-workspace/Sources/TUSKit/Extensions/HTTPURLResponse+Headers.swift:10:1: error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
 8 | import Foundation
 9 |
10 | extension HTTPURLResponse {
   | `- error: non-nominal type 'HTTPURLResponse' (aka 'AnyObject') cannot be extended [#NominalTypes]
11 |     func extractHeaders() -> [String: String] {
12 |         var headers: [String: String] = [:]
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[17/21] Compiling TUSKit TUSClient.swift
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:116:79: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     ///   make sure that you provide an empty array in the `supportExtensions` parameter.
115 |     /// - Throws: File related errors when it can't make a directory at the designated path.
116 |     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.
117 |                 storageDirectory: URL? = nil, chunkSize: Int = 500 * 1024,
118 |                 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:164:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 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.
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 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:164:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:164:50: error: default argument value of type '_' cannot be converted to type 'AnyObject'
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: default argument value of type '_' cannot be converted to type 'AnyObject'
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:200:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 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.
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 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:200:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:200:50: error: default argument value of type '_' cannot be converted to type 'AnyObject'
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: default argument value of type '_' cannot be converted to type 'AnyObject'
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:58:9: warning: 'didFinishUpload(id:url:context:client:)' is deprecated: Use the new didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) method instead. [#DeprecatedDeclaration]
 56 |     func didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) {
 57 |         // Supports calling the existing implementation without forcing conformance to the new delegate function.
 58 |         didFinishUpload(id: id, url: url, context: context, client: client)
    |         `- warning: 'didFinishUpload(id:url:context:client:)' is deprecated: Use the new didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) method instead. [#DeprecatedDeclaration]
 59 |     }
 60 |
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:122:35: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sessionSendsLaunchEvents'
120 |
121 |         if #available(iOS 7.0, macOS 11.0, watchOS 6.0, *) {
122 |           if sessionConfiguration.sessionSendsLaunchEvents == false {
    |                                   `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sessionSendsLaunchEvents'
123 |             print("TUSClient warning: initializing with a session configuration that's not suited for background uploads.")
124 |           }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:203:23: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
203 |         guard session.configuration.sessionSendsLaunchEvents == false else {
    |                       `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
204 |             throw TUSClientError.customURLSessionWithBackgroundConfigurationNotSupported
205 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:206:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
204 |             throw TUSClientError.customURLSessionWithBackgroundConfigurationNotSupported
205 |         }
206 |         self.sessionIdentifier = session.configuration.identifier ?? ""
    |                                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
207 |         self.api = TUSAPI(session: session)
208 |         self.files = try Files(storageDirectory: storageDirectory)
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:57: warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
884 |
885 |         reportingQueue.async {
886 |             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 [#SendableClosureCaptures]
887 |         }
888 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:89: warning: reference to captured var 'totalSize' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
884 |
885 |         reportingQueue.async {
886 |             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 [#SendableClosureCaptures]
887 |         }
888 |     }
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[18/21] Compiling TUSKit TUSClientError.swift
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:116:79: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     ///   make sure that you provide an empty array in the `supportExtensions` parameter.
115 |     /// - Throws: File related errors when it can't make a directory at the designated path.
116 |     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.
117 |                 storageDirectory: URL? = nil, chunkSize: Int = 500 * 1024,
118 |                 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:164:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 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.
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 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:164:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:164:50: error: default argument value of type '_' cannot be converted to type 'AnyObject'
162 |     @available(*, deprecated, message: "Use the init(server:sessionIdentifier:sessionConfiguration:storageDirectory:chunkSize:supportedExtension) initializer instead.")
163 |     public init(server: URL, sessionIdentifier: String, storageDirectory: URL? = nil,
164 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: default argument value of type '_' cannot be converted to type 'AnyObject'
165 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
166 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:200:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 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.
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 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:200:50: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:200:50: error: default argument value of type '_' cannot be converted to type 'AnyObject'
198 |     @available(iOS 15.0, macOS 12.0, watchOS 8.0, *)
199 |     public init(server: URL, storageDirectory: URL? = nil,
200 |                 session: URLSession = URLSession.shared, chunkSize: Int = 500 * 1024,
    |                                                  `- error: default argument value of type '_' cannot be converted to type 'AnyObject'
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:58:9: warning: 'didFinishUpload(id:url:context:client:)' is deprecated: Use the new didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) method instead. [#DeprecatedDeclaration]
 56 |     func didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) {
 57 |         // Supports calling the existing implementation without forcing conformance to the new delegate function.
 58 |         didFinishUpload(id: id, url: url, context: context, client: client)
    |         `- warning: 'didFinishUpload(id:url:context:client:)' is deprecated: Use the new didFinishUpload(id: UUID, url: URL, context: [String: String]?, client: TUSClient, responseHeaders: [String: String]?) method instead. [#DeprecatedDeclaration]
 59 |     }
 60 |
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:122:35: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sessionSendsLaunchEvents'
120 |
121 |         if #available(iOS 7.0, macOS 11.0, watchOS 6.0, *) {
122 |           if sessionConfiguration.sessionSendsLaunchEvents == false {
    |                                   `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'sessionSendsLaunchEvents'
123 |             print("TUSClient warning: initializing with a session configuration that's not suited for background uploads.")
124 |           }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:203:23: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
201 |                 supportedExtensions: [TUSProtocolExtension] = [.creation], reportingQueue: DispatchQueue = DispatchQueue.main,
202 |                 generateHeaders: HeaderGenerationHandler? = nil) throws {
203 |         guard session.configuration.sessionSendsLaunchEvents == false else {
    |                       `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
204 |             throw TUSClientError.customURLSessionWithBackgroundConfigurationNotSupported
205 |         }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:206:42: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
204 |             throw TUSClientError.customURLSessionWithBackgroundConfigurationNotSupported
205 |         }
206 |         self.sessionIdentifier = session.configuration.identifier ?? ""
    |                                          `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
207 |         self.api = TUSAPI(session: session)
208 |         self.files = try Files(storageDirectory: storageDirectory)
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:57: warning: reference to captured var 'totalBytesUploaded' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
884 |
885 |         reportingQueue.async {
886 |             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 [#SendableClosureCaptures]
887 |         }
888 |     }
/host/spi-builder-workspace/Sources/TUSKit/TUSClient.swift:886:89: warning: reference to captured var 'totalSize' in concurrently-executing code; this is an error in the Swift 6 language mode [#SendableClosureCaptures]
884 |
885 |         reportingQueue.async {
886 |             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 [#SendableClosureCaptures]
887 |         }
888 |     }
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
[#SendableClosureCaptures]: <https://docs.swift.org/compiler/documentation/diagnostics/sendable-closure-captures>
[19/21] Compiling TUSKit String+base64.swift
/host/spi-builder-workspace/Sources/TUSKit/Files.swift:174:37: warning: result of call to 'createFile(atPath:contents:attributes:)' is unused [#no-usage]
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 [#no-usage]
175 |             }
176 |
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
13 |
14 | // Result support for URLSession
15 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
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 |     }
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[20/21] 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 [#no-usage]
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 [#no-usage]
175 |             }
176 |
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
13 |
14 | // Result support for URLSession
15 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
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 |     }
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
[21/21] 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 [#no-usage]
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 [#no-usage]
175 |             }
176 |
/host/spi-builder-workspace/Sources/TUSKit/Network.swift:15:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
13 |
14 | // Result support for URLSession
15 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended [#NominalTypes]
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 |     }
[#NominalTypes]: <https://docs.swift.org/compiler/documentation/diagnostics/nominal-types>
BUILD FAILURE 6.2 linux