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