The Swift Package Index logo.Swift Package Index

Build Information

Failed to build APIRequest, reference 1.3.5 (779527), with Swift 6.1 for Wasm on 28 May 2025 12:18:51 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/NathanFallet/APIRequest.git
Reference: 1.3.5
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/NathanFallet/APIRequest
 * tag               1.3.5      -> FETCH_HEAD
HEAD is now at 779527d Fixing `No such module 'FoundationNetworking'`
Cloned https://github.com/NathanFallet/APIRequest.git
Revision (git rev-parse @):
779527db3a61c430a7f38e8c15779b5a5fd0510f
SUCCESS checkout https://github.com/NathanFallet/APIRequest.git at 1.3.5
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/NathanFallet/APIRequest.git
https://github.com/NathanFallet/APIRequest.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "APIRequest",
  "name" : "APIRequest",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "APIRequest",
      "targets" : [
        "APIRequest"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "APIRequestTests",
      "module_type" : "SwiftTarget",
      "name" : "APIRequestTests",
      "path" : "Tests/APIRequestTests",
      "sources" : [
        "APIRequestTests.swift",
        "XCTestManifests.swift"
      ],
      "target_dependencies" : [
        "APIRequest"
      ],
      "type" : "test"
    },
    {
      "c99name" : "APIRequest",
      "module_type" : "SwiftTarget",
      "name" : "APIRequest",
      "path" : "Sources/APIRequest",
      "product_memberships" : [
        "APIRequest"
      ],
      "sources" : [
        "Decoder/APIDecoder.swift",
        "Decoder/JSONAPIDecoder.swift",
        "Encoder/APIEncoder.swift",
        "Encoder/EncodableExtension.swift",
        "Encoder/JSONAPIEncoder.swift",
        "Request/APIConfiguration.swift",
        "Request/APIRequest.swift",
        "Request/APIResponseStatus.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling APIRequest JSONAPIEncoder.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/11] Compiling APIRequest APIDecoder.swift
[5/11] Emitting module APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIConfiguration.swift:25:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 |     // Default configuration
25 |     public static var current: APIConfiguration?
   |                       |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: add '@MainActor' to make static property 'current' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 |     // Configuration variables
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:50:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 48 |
 49 |     // Task
 50 |     private var task: URLSessionDataTask?
    |                       `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |
 52 |     /// Create a request to the API
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/APIRequest/Request/APIRequest.swift:267:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - totalBytesSent: The total bytes sent
266 |     ///   - totalBytesExpectedToSend: The total bytes expected to send
267 |     public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                       `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         // Call the upload progress (if specified)
269 |         uploadProgress?(Double(totalBytesSent) / Double(totalBytesExpectedToSend))
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/APIRequest/Request/APIRequest.swift:267:57: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - totalBytesSent: The total bytes sent
266 |     ///   - totalBytesExpectedToSend: The total bytes expected to send
267 |     public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                                         `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         // Call the upload progress (if specified)
269 |         uploadProgress?(Double(totalBytesSent) / Double(totalBytesExpectedToSend))
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:36: error: cannot find type 'URLSessionDelegate' in scope
 24 | #endif
 25 |
 26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
    |                                    `- error: cannot find type 'URLSessionDelegate' in scope
 27 |
 28 |     /// Completion handler of an APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:56: error: cannot find type 'URLSessionTaskDelegate' in scope
 24 | #endif
 25 |
 26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
    |                                                        `- error: cannot find type 'URLSessionTaskDelegate' in scope
 27 |
 28 |     /// Completion handler of an APIRequest
[6/11] Compiling APIRequest APIRequest.swift
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:50:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 48 |
 49 |     // Task
 50 |     private var task: URLSessionDataTask?
    |                       `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |
 52 |     /// Create a request to the API
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/APIRequest/Request/APIRequest.swift:267:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - totalBytesSent: The total bytes sent
266 |     ///   - totalBytesExpectedToSend: The total bytes expected to send
267 |     public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                       `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         // Call the upload progress (if specified)
269 |         uploadProgress?(Double(totalBytesSent) / Double(totalBytesExpectedToSend))
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/APIRequest/Request/APIRequest.swift:267:57: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - totalBytesSent: The total bytes sent
266 |     ///   - totalBytesExpectedToSend: The total bytes expected to send
267 |     public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                                         `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         // Call the upload progress (if specified)
269 |         uploadProgress?(Double(totalBytesSent) / Double(totalBytesExpectedToSend))
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:36: error: cannot find type 'URLSessionDelegate' in scope
 24 | #endif
 25 |
 26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
    |                                    `- error: cannot find type 'URLSessionDelegate' in scope
 27 |
 28 |     /// Completion handler of an APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:56: error: cannot find type 'URLSessionTaskDelegate' in scope
 24 | #endif
 25 |
 26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
    |                                                        `- error: cannot find type 'URLSessionTaskDelegate' in scope
 27 |
 28 |     /// Completion handler of an APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:179:27: error: cannot find 'URLRequest' in scope
177 |         if let url = getURL() {
178 |             // Create the request based on give parameters
179 |             var request = URLRequest(url: url)
    |                           `- error: cannot find 'URLRequest' in scope
180 |             request.cachePolicy = URLRequest.CachePolicy.reloadIgnoringLocalCacheData
181 |             request.httpMethod = method
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:180:35: error: cannot find 'URLRequest' in scope
178 |             // Create the request based on give parameters
179 |             var request = URLRequest(url: url)
180 |             request.cachePolicy = URLRequest.CachePolicy.reloadIgnoringLocalCacheData
    |                                   `- error: cannot find 'URLRequest' in scope
181 |             request.httpMethod = method
182 |             request.allowsCellularAccess = configuration.allowsCellularAccess
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:203:117: error: cannot find 'OperationQueue' in scope
201 |
202 |             // Create the session
203 |             let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: OperationQueue.main)
    |                                                                                                                     `- error: cannot find 'OperationQueue' in scope
204 |
205 |             // Launch the request to server
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:203:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
201 |
202 |             // Create the session
203 |             let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: OperationQueue.main)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
204 |
205 |             // Launch the request to server
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:203:77: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
201 |
202 |             // Create the session
203 |             let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: OperationQueue.main)
    |                                                                             `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
204 |
205 |             // Launch the request to server
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:209:25: error: cannot convert value of type '_' to type 'NSError' in coercion
207 |                 // Check if there is an error
208 |                 if let error = error {
209 |                     if (error as NSError).code == -1009 {
    |                         `- error: cannot convert value of type '_' to type 'NSError' in coercion
210 |                         // Device is offline
211 |                         self.end(data: nil, status: .offline, completionHandler: completionHandler)
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:228:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
226 |                 }
227 |             }
228 |             task?.resume()
    |                   `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
229 |         } else {
230 |             // URL is not valid
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:241:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
239 |     @discardableResult
240 |     public func cancel() -> APIRequest {
241 |         task?.cancel()
    |               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
242 |         task = nil
243 |         return self
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:250:13: error: cannot find 'DispatchQueue' in scope
248 |         if configuration.completionInMainThread {
249 |             // Call main thread
250 |             DispatchQueue.main.async {
    |             `- error: cannot find 'DispatchQueue' in scope
251 |                 // And complete
252 |                 completionHandler(data, status)
[7/11] Compiling APIRequest APIEncoder.swift
[8/11] Compiling APIRequest JSONAPIDecoder.swift
[9/11] Compiling APIRequest EncodableExtension.swift
[10/11] Compiling APIRequest APIConfiguration.swift
/host/spi-builder-workspace/Sources/APIRequest/Request/APIConfiguration.swift:25:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 |     // Default configuration
25 |     public static var current: APIConfiguration?
   |                       |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: add '@MainActor' to make static property 'current' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 |     // Configuration variables
[11/11] Compiling APIRequest APIResponseStatus.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/9] Compiling APIRequest JSONAPIDecoder.swift
[3/9] Compiling APIRequest APIDecoder.swift
[4/10] Compiling APIRequest EncodableExtension.swift
[5/10] Compiling APIRequest JSONAPIEncoder.swift
[6/10] Compiling APIRequest APIEncoder.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/10] Emitting module APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:50:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 48 |
 49 |     // Task
 50 |     private var task: URLSessionDataTask?
    |                       `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |
 52 |     /// Create a request to the API
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/APIRequest/Request/APIRequest.swift:267:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - totalBytesSent: The total bytes sent
266 |     ///   - totalBytesExpectedToSend: The total bytes expected to send
267 |     public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                       `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         // Call the upload progress (if specified)
269 |         uploadProgress?(Double(totalBytesSent) / Double(totalBytesExpectedToSend))
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/APIRequest/Request/APIRequest.swift:267:57: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - totalBytesSent: The total bytes sent
266 |     ///   - totalBytesExpectedToSend: The total bytes expected to send
267 |     public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                                         `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         // Call the upload progress (if specified)
269 |         uploadProgress?(Double(totalBytesSent) / Double(totalBytesExpectedToSend))
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:36: error: cannot find type 'URLSessionDelegate' in scope
 24 | #endif
 25 |
 26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
    |                                    `- error: cannot find type 'URLSessionDelegate' in scope
 27 |
 28 |     /// Completion handler of an APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:56: error: cannot find type 'URLSessionTaskDelegate' in scope
 24 | #endif
 25 |
 26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
    |                                                        `- error: cannot find type 'URLSessionTaskDelegate' in scope
 27 |
 28 |     /// Completion handler of an APIRequest
[8/10] Compiling APIRequest APIConfiguration.swift
[9/10] Compiling APIRequest APIRequest.swift
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:50:23: error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 48 |
 49 |     // Task
 50 |     private var task: URLSessionDataTask?
    |                       `- error: 'URLSessionDataTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 51 |
 52 |     /// Create a request to the API
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/APIRequest/Request/APIRequest.swift:267:39: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - totalBytesSent: The total bytes sent
266 |     ///   - totalBytesExpectedToSend: The total bytes expected to send
267 |     public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                       `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         // Call the upload progress (if specified)
269 |         uploadProgress?(Double(totalBytesSent) / Double(totalBytesExpectedToSend))
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/APIRequest/Request/APIRequest.swift:267:57: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
265 |     ///   - totalBytesSent: The total bytes sent
266 |     ///   - totalBytesExpectedToSend: The total bytes expected to send
267 |     public func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
    |                                                         `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
268 |         // Call the upload progress (if specified)
269 |         uploadProgress?(Double(totalBytesSent) / Double(totalBytesExpectedToSend))
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
  |                  `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:36: error: cannot find type 'URLSessionDelegate' in scope
 24 | #endif
 25 |
 26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
    |                                    `- error: cannot find type 'URLSessionDelegate' in scope
 27 |
 28 |     /// Completion handler of an APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:56: error: cannot find type 'URLSessionTaskDelegate' in scope
 24 | #endif
 25 |
 26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
    |                                                        `- error: cannot find type 'URLSessionTaskDelegate' in scope
 27 |
 28 |     /// Completion handler of an APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:179:27: error: cannot find 'URLRequest' in scope
177 |         if let url = getURL() {
178 |             // Create the request based on give parameters
179 |             var request = URLRequest(url: url)
    |                           `- error: cannot find 'URLRequest' in scope
180 |             request.cachePolicy = URLRequest.CachePolicy.reloadIgnoringLocalCacheData
181 |             request.httpMethod = method
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:180:35: error: cannot find 'URLRequest' in scope
178 |             // Create the request based on give parameters
179 |             var request = URLRequest(url: url)
180 |             request.cachePolicy = URLRequest.CachePolicy.reloadIgnoringLocalCacheData
    |                                   `- error: cannot find 'URLRequest' in scope
181 |             request.httpMethod = method
182 |             request.allowsCellularAccess = configuration.allowsCellularAccess
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:203:117: error: cannot find 'OperationQueue' in scope
201 |
202 |             // Create the session
203 |             let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: OperationQueue.main)
    |                                                                                                                     `- error: cannot find 'OperationQueue' in scope
204 |
205 |             // Launch the request to server
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:203:27: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
201 |
202 |             // Create the session
203 |             let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: OperationQueue.main)
    |                           `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
204 |
205 |             // Launch the request to server
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:203:77: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
201 |
202 |             // Create the session
203 |             let session = URLSession(configuration: URLSessionConfiguration.default, delegate: self, delegateQueue: OperationQueue.main)
    |                                                                             `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
204 |
205 |             // Launch the request to server
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:209:25: error: cannot convert value of type '_' to type 'NSError' in coercion
207 |                 // Check if there is an error
208 |                 if let error = error {
209 |                     if (error as NSError).code == -1009 {
    |                         `- error: cannot convert value of type '_' to type 'NSError' in coercion
210 |                         // Device is offline
211 |                         self.end(data: nil, status: .offline, completionHandler: completionHandler)
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:228:19: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
226 |                 }
227 |             }
228 |             task?.resume()
    |                   `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'resume'
229 |         } else {
230 |             // URL is not valid
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:241:15: error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
239 |     @discardableResult
240 |     public func cancel() -> APIRequest {
241 |         task?.cancel()
    |               `- error: value of type 'URLSessionDataTask' (aka 'AnyObject') has no member 'cancel'
242 |         task = nil
243 |         return self
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:250:13: error: cannot find 'DispatchQueue' in scope
248 |         if configuration.completionInMainThread {
249 |             // Call main thread
250 |             DispatchQueue.main.async {
    |             `- error: cannot find 'DispatchQueue' in scope
251 |                 // And complete
252 |                 completionHandler(data, status)
[10/10] Compiling APIRequest APIResponseStatus.swift
BUILD FAILURE 6.1 wasm