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