The Swift Package Index logo.Swift Package Index

Build Information

Failed to build RestApi, reference v1.2.0 (1cbfa1), with Swift 6.1 for Android on 28 May 2025 16:16:15 UTC.

Build Command

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

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/RxDx/restapi.git
Reference: v1.2.0
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/RxDx/restapi
 * tag               v1.2.0     -> FETCH_HEAD
HEAD is now at 1cbfa11 Throw error when http status code >= 400 (#5)
Cloned https://github.com/RxDx/restapi.git
Revision (git rev-parse @):
1cbfa1191d78444471b8a21a697226dcda8089e8
SUCCESS checkout https://github.com/RxDx/restapi.git at v1.2.0
========================================
Build
========================================
Selected platform:         android
Swift version:             6.1
Building package at path:  $PWD
https://github.com/RxDx/restapi.git
https://github.com/RxDx/restapi.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "RestApi",
  "name" : "RestApi",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "15.0"
    },
    {
      "name" : "macos",
      "version" : "12.0"
    }
  ],
  "products" : [
    {
      "name" : "RestApi",
      "targets" : [
        "RestApi"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "RestApiTests",
      "module_type" : "SwiftTarget",
      "name" : "RestApiTests",
      "path" : "Tests/RestApiTests",
      "sources" : [
        "RestApiTests.swift"
      ],
      "target_dependencies" : [
        "RestApi"
      ],
      "type" : "test"
    },
    {
      "c99name" : "RestApi",
      "module_type" : "SwiftTarget",
      "name" : "RestApi",
      "path" : "Sources/RestApi",
      "product_memberships" : [
        "RestApi"
      ],
      "sources" : [
        "RestApi.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.6"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 -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
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Emitting module RestApi
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:28: error: cannot find type 'URLRequest' in scope
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                            `- error: cannot find type 'URLRequest' in scope
  6 | }
  7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:50: error: cannot find type 'URLSessionTaskDelegate' in scope
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                                                  `- error: cannot find type 'URLSessionTaskDelegate' in scope
  6 | }
  7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:98: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                                                                                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  6 | }
  7 |
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/RestApi/RestApi.swift:9:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
  7 |
  8 | /// An URLSession extension that conforms to URLSessionProtocol
  9 | extension URLSession: URLSessionProtocol {
    | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 10 | }
 11 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:78:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 76 |         ],
 77 |         debug: Bool = false,
 78 |         urlSession: URLSessionProtocol = URLSession.shared,
    |                                                     `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 79 |         encoder: RestApiEncoder = JSONEncoder(),
 80 |         decoder: RestApiDecoder = JSONDecoder()
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:562:17: error: cannot find type 'URLRequest' in scope
560 |         verb: Verb,
561 |         header: [String: String]?
562 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
563 |         var urlRequest = URLRequest(url: url)
564 |         self.header.forEach { (key, value) in
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:579:39: error: cannot find type 'URLRequest' in scope
577 |     ///   - debug: A boolean flag that will print debug logs if true.
578 |     /// - Returns: A response data.
579 |     private func data(for urlRequest: URLRequest, debug: Bool?) async throws -> Data {
    |                                       `- error: cannot find type 'URLRequest' in scope
580 |         let debug = debug ?? self.debug
581 |         if debug {
[4/4] Compiling RestApi RestApi.swift
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:28: error: cannot find type 'URLRequest' in scope
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                            `- error: cannot find type 'URLRequest' in scope
  6 | }
  7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:50: error: cannot find type 'URLSessionTaskDelegate' in scope
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                                                  `- error: cannot find type 'URLSessionTaskDelegate' in scope
  6 | }
  7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:98: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                                                                                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  6 | }
  7 |
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/RestApi/RestApi.swift:9:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
  7 |
  8 | /// An URLSession extension that conforms to URLSessionProtocol
  9 | extension URLSession: URLSessionProtocol {
    | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 10 | }
 11 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:78:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 76 |         ],
 77 |         debug: Bool = false,
 78 |         urlSession: URLSessionProtocol = URLSession.shared,
    |                                                     `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 79 |         encoder: RestApiEncoder = JSONEncoder(),
 80 |         decoder: RestApiDecoder = JSONDecoder()
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:562:17: error: cannot find type 'URLRequest' in scope
560 |         verb: Verb,
561 |         header: [String: String]?
562 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
563 |         var urlRequest = URLRequest(url: url)
564 |         self.header.forEach { (key, value) in
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:579:39: error: cannot find type 'URLRequest' in scope
577 |     ///   - debug: A boolean flag that will print debug logs if true.
578 |     /// - Returns: A response data.
579 |     private func data(for urlRequest: URLRequest, debug: Bool?) async throws -> Data {
    |                                       `- error: cannot find type 'URLRequest' in scope
580 |         let debug = debug ?? self.debug
581 |         if debug {
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:113:63: error: cannot infer contextual base in reference to member 'get'
111 |     ) async throws -> T {
112 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
113 |         let urlRequest = try buildUrlRequest(url: url, verb: .get, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'get'
114 |         let data = try await data(for: urlRequest, debug: debug)
115 |         return try decoder.decode(T.self, from: data)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:140:63: error: cannot infer contextual base in reference to member 'post'
138 |     ) async throws -> T? {
139 |         let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
140 |         var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'post'
141 |         if let resource = resource {
142 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:167:63: error: cannot infer contextual base in reference to member 'post'
165 |     ) async throws {
166 |         let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
167 |         var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'post'
168 |         if let resource = resource {
169 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:194:63: error: cannot infer contextual base in reference to member 'post'
192 |     ) async throws -> T? {
193 |         let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
194 |         var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'post'
195 |         if let payload = payload {
196 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:221:63: error: cannot infer contextual base in reference to member 'post'
219 |     ) async throws {
220 |         let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
221 |         var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'post'
222 |         if let payload = payload {
223 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:252:63: error: cannot infer contextual base in reference to member 'put'
250 |     ) async throws -> T? {
251 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
252 |         var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'put'
253 |         if let resource = resource {
254 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:281:63: error: cannot infer contextual base in reference to member 'put'
279 |     ) async throws {
280 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
281 |         var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'put'
282 |         if let resource = resource {
283 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:310:63: error: cannot infer contextual base in reference to member 'put'
308 |     ) async throws -> T? {
309 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
310 |         var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'put'
311 |         if let payload = payload {
312 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:339:63: error: cannot infer contextual base in reference to member 'put'
337 |     ) async throws {
338 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
339 |         var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'put'
340 |         if let payload = payload {
341 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:371:63: error: cannot infer contextual base in reference to member 'patch'
369 |     ) async throws -> T? {
370 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
371 |         var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'patch'
372 |         if let resource = resource {
373 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:400:63: error: cannot infer contextual base in reference to member 'patch'
398 |     ) async throws {
399 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
400 |         var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'patch'
401 |         if let resource = resource {
402 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:429:63: error: cannot infer contextual base in reference to member 'patch'
427 |     ) async throws -> T? {
428 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
429 |         var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'patch'
430 |         if let payload = payload {
431 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:458:63: error: cannot infer contextual base in reference to member 'patch'
456 |     ) async throws {
457 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
458 |         var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'patch'
459 |         if let payload = payload {
460 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:487:63: error: cannot infer contextual base in reference to member 'delete'
485 |     ) async throws -> T? {
486 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
487 |         let urlRequest = try buildUrlRequest(url: url, verb: .delete, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'delete'
488 |         let data = try await data(for: urlRequest, debug: debug)
489 |         return try? decoder.decode(T.self, from: data)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:511:63: error: cannot infer contextual base in reference to member 'delete'
509 |     ) async throws {
510 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
511 |         let urlRequest = try buildUrlRequest(url: url, verb: .delete, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'delete'
512 |         let _ = try await data(for: urlRequest, debug: debug)
513 |     }
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:563:26: error: cannot find 'URLRequest' in scope
561 |         header: [String: String]?
562 |     ) throws -> URLRequest {
563 |         var urlRequest = URLRequest(url: url)
    |                          `- error: cannot find 'URLRequest' in scope
564 |         self.header.forEach { (key, value) in
565 |             urlRequest.setValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:591:85: error: 'nil' requires a contextual type
589 |             }
590 |         }
591 |         let (data, response) = try await urlSession.data(for: urlRequest, delegate: nil)
    |                                                                                     `- error: 'nil' requires a contextual type
592 |         let responseStatusCode = (response as? HTTPURLResponse)?.statusCode
593 |         if debug {
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:592:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
590 |         }
591 |         let (data, response) = try await urlSession.data(for: urlRequest, delegate: nil)
592 |         let responseStatusCode = (response as? HTTPURLResponse)?.statusCode
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
593 |         if debug {
594 |             debugPrint("Response: \(response.debugDescription)")
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:fe1962677657b2408c217cb5cceb3c09bc1d91486e360cebbc6eee461a5945d8
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/3] Emitting module RestApi
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:28: error: cannot find type 'URLRequest' in scope
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                            `- error: cannot find type 'URLRequest' in scope
  6 | }
  7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:50: error: cannot find type 'URLSessionTaskDelegate' in scope
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                                                  `- error: cannot find type 'URLSessionTaskDelegate' in scope
  6 | }
  7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:98: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                                                                                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  6 | }
  7 |
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/RestApi/RestApi.swift:9:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
  7 |
  8 | /// An URLSession extension that conforms to URLSessionProtocol
  9 | extension URLSession: URLSessionProtocol {
    | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 10 | }
 11 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:78:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 76 |         ],
 77 |         debug: Bool = false,
 78 |         urlSession: URLSessionProtocol = URLSession.shared,
    |                                                     `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 79 |         encoder: RestApiEncoder = JSONEncoder(),
 80 |         decoder: RestApiDecoder = JSONDecoder()
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:562:17: error: cannot find type 'URLRequest' in scope
560 |         verb: Verb,
561 |         header: [String: String]?
562 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
563 |         var urlRequest = URLRequest(url: url)
564 |         self.header.forEach { (key, value) in
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:579:39: error: cannot find type 'URLRequest' in scope
577 |     ///   - debug: A boolean flag that will print debug logs if true.
578 |     /// - Returns: A response data.
579 |     private func data(for urlRequest: URLRequest, debug: Bool?) async throws -> Data {
    |                                       `- error: cannot find type 'URLRequest' in scope
580 |         let debug = debug ?? self.debug
581 |         if debug {
[3/3] Compiling RestApi RestApi.swift
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:28: error: cannot find type 'URLRequest' in scope
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                            `- error: cannot find type 'URLRequest' in scope
  6 | }
  7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:50: error: cannot find type 'URLSessionTaskDelegate' in scope
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                                                  `- error: cannot find type 'URLSessionTaskDelegate' in scope
  6 | }
  7 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:5:98: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  3 | /// An URLSessionProtocol that contains the method used to request data from network
  4 | public protocol URLSessionProtocol {
  5 |     func data(for request: URLRequest, delegate: URLSessionTaskDelegate?) async throws -> (Data, URLResponse)
    |                                                                                                  `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  6 | }
  7 |
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/RestApi/RestApi.swift:9:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
  7 |
  8 | /// An URLSession extension that conforms to URLSessionProtocol
  9 | extension URLSession: URLSessionProtocol {
    | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 10 | }
 11 |
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:78:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 76 |         ],
 77 |         debug: Bool = false,
 78 |         urlSession: URLSessionProtocol = URLSession.shared,
    |                                                     `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 79 |         encoder: RestApiEncoder = JSONEncoder(),
 80 |         decoder: RestApiDecoder = JSONDecoder()
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:562:17: error: cannot find type 'URLRequest' in scope
560 |         verb: Verb,
561 |         header: [String: String]?
562 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
563 |         var urlRequest = URLRequest(url: url)
564 |         self.header.forEach { (key, value) in
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:579:39: error: cannot find type 'URLRequest' in scope
577 |     ///   - debug: A boolean flag that will print debug logs if true.
578 |     /// - Returns: A response data.
579 |     private func data(for urlRequest: URLRequest, debug: Bool?) async throws -> Data {
    |                                       `- error: cannot find type 'URLRequest' in scope
580 |         let debug = debug ?? self.debug
581 |         if debug {
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:113:63: error: cannot infer contextual base in reference to member 'get'
111 |     ) async throws -> T {
112 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
113 |         let urlRequest = try buildUrlRequest(url: url, verb: .get, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'get'
114 |         let data = try await data(for: urlRequest, debug: debug)
115 |         return try decoder.decode(T.self, from: data)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:140:63: error: cannot infer contextual base in reference to member 'post'
138 |     ) async throws -> T? {
139 |         let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
140 |         var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'post'
141 |         if let resource = resource {
142 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:167:63: error: cannot infer contextual base in reference to member 'post'
165 |     ) async throws {
166 |         let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
167 |         var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'post'
168 |         if let resource = resource {
169 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:194:63: error: cannot infer contextual base in reference to member 'post'
192 |     ) async throws -> T? {
193 |         let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
194 |         var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'post'
195 |         if let payload = payload {
196 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:221:63: error: cannot infer contextual base in reference to member 'post'
219 |     ) async throws {
220 |         let url = try buildUrl(url: url, path: path, suffix: suffix, params: params)
221 |         var urlRequest = try buildUrlRequest(url: url, verb: .post, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'post'
222 |         if let payload = payload {
223 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:252:63: error: cannot infer contextual base in reference to member 'put'
250 |     ) async throws -> T? {
251 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
252 |         var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'put'
253 |         if let resource = resource {
254 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:281:63: error: cannot infer contextual base in reference to member 'put'
279 |     ) async throws {
280 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
281 |         var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'put'
282 |         if let resource = resource {
283 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:310:63: error: cannot infer contextual base in reference to member 'put'
308 |     ) async throws -> T? {
309 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
310 |         var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'put'
311 |         if let payload = payload {
312 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:339:63: error: cannot infer contextual base in reference to member 'put'
337 |     ) async throws {
338 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
339 |         var urlRequest = try buildUrlRequest(url: url, verb: .put, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'put'
340 |         if let payload = payload {
341 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:371:63: error: cannot infer contextual base in reference to member 'patch'
369 |     ) async throws -> T? {
370 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
371 |         var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'patch'
372 |         if let resource = resource {
373 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:400:63: error: cannot infer contextual base in reference to member 'patch'
398 |     ) async throws {
399 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
400 |         var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'patch'
401 |         if let resource = resource {
402 |             urlRequest.httpBody = try encoder.encode(resource)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:429:63: error: cannot infer contextual base in reference to member 'patch'
427 |     ) async throws -> T? {
428 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
429 |         var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'patch'
430 |         if let payload = payload {
431 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:458:63: error: cannot infer contextual base in reference to member 'patch'
456 |     ) async throws {
457 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
458 |         var urlRequest = try buildUrlRequest(url: url, verb: .patch, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'patch'
459 |         if let payload = payload {
460 |             urlRequest.httpBody = try JSONSerialization.data(withJSONObject: payload)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:487:63: error: cannot infer contextual base in reference to member 'delete'
485 |     ) async throws -> T? {
486 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
487 |         let urlRequest = try buildUrlRequest(url: url, verb: .delete, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'delete'
488 |         let data = try await data(for: urlRequest, debug: debug)
489 |         return try? decoder.decode(T.self, from: data)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:511:63: error: cannot infer contextual base in reference to member 'delete'
509 |     ) async throws {
510 |         let url = try buildUrl(url: url, path: path, resourceId: resourceId, suffix: suffix, params: params)
511 |         let urlRequest = try buildUrlRequest(url: url, verb: .delete, header: header)
    |                                                               `- error: cannot infer contextual base in reference to member 'delete'
512 |         let _ = try await data(for: urlRequest, debug: debug)
513 |     }
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:563:26: error: cannot find 'URLRequest' in scope
561 |         header: [String: String]?
562 |     ) throws -> URLRequest {
563 |         var urlRequest = URLRequest(url: url)
    |                          `- error: cannot find 'URLRequest' in scope
564 |         self.header.forEach { (key, value) in
565 |             urlRequest.setValue(value, forHTTPHeaderField: key)
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:591:85: error: 'nil' requires a contextual type
589 |             }
590 |         }
591 |         let (data, response) = try await urlSession.data(for: urlRequest, delegate: nil)
    |                                                                                     `- error: 'nil' requires a contextual type
592 |         let responseStatusCode = (response as? HTTPURLResponse)?.statusCode
593 |         if debug {
/host/spi-builder-workspace/Sources/RestApi/RestApi.swift:592:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
590 |         }
591 |         let (data, response) = try await urlSession.data(for: urlRequest, delegate: nil)
592 |         let responseStatusCode = (response as? HTTPURLResponse)?.statusCode
    |                                                                  `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
593 |         if debug {
594 |             debugPrint("Response: \(response.debugDescription)")
BUILD FAILURE 6.1 android