The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build EazyRestClient, reference main (52be6d), with Swift 6.1 for Wasm on 29 Aug 2025 07:18:39 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:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.67.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/nissaba/EasyRestClient.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/nissaba/EasyRestClient
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 52be6d5 feat(tests): Add comprehensive tests for `EazyRestError.badResponse`
Cloned https://github.com/nissaba/EasyRestClient.git
Revision (git rev-parse @):
52be6d56b35892e3f9bef77e5ec37b2ae7ee7edc
SUCCESS checkout https://github.com/nissaba/EasyRestClient.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/nissaba/EasyRestClient.git
https://github.com/nissaba/EasyRestClient.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "EazyRestClient",
  "name" : "EazyRestClient",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "tvos",
      "version" : "15.0"
    },
    {
      "name" : "watchos",
      "version" : "8.0"
    },
    {
      "name" : "visionos",
      "version" : "1.0"
    }
  ],
  "products" : [
    {
      "name" : "EazyRestClient",
      "targets" : [
        "EazyRestClient"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "EazyRestClientTests",
      "module_type" : "SwiftTarget",
      "name" : "EazyRestClientTests",
      "path" : "Tests",
      "sources" : [
        "RestEasyAPITests/EazyRestErrorTests.swift",
        "RestEasyAPITests/MockURLProtocol.swift"
      ],
      "target_dependencies" : [
        "EazyRestClient"
      ],
      "type" : "test"
    },
    {
      "c99name" : "EazyRestClient",
      "module_type" : "SwiftTarget",
      "name" : "EazyRestClient",
      "path" : "Sources",
      "product_memberships" : [
        "EazyRestClient"
      ],
      "sources" : [
        "EasyRestClient/Decodable+EasyRest.swift",
        "EasyRestClient/EasyRestClient.swift",
        "EasyRestClient/EasyRestDefaultResponse.swift",
        "EasyRestClient/EasyRestError.swift",
        "EasyRestClient/EasyRestResponse.swift",
        "EasyRestClient/EazyRestRequest+defaults.swift",
        "EasyRestClient/EazyRestRequest.swift",
        "EasyRestClient/HTTPMethods.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9.2"
}
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: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:eb0758f51dbd6991fb9e51dedbfbcbec142ffc0d3b9b8ad91fa19d35e5136f0a
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 EazyRestClient EazyRestRequest.swift
[4/11] Compiling EazyRestClient EasyRestError.swift
[5/11] Compiling EazyRestClient EazyRestRequest+defaults.swift
[6/11] Compiling EazyRestClient EasyRestDefaultResponse.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/11] Compiling EazyRestClient Decodable+EasyRest.swift
[8/11] Emitting module EazyRestClient
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:39:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 37 | /// Handles request building, header injection, and response decoding.
 38 | public class EazyRestClient {
 39 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 40 |     private let baseURL: URL
 41 |
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/EasyRestClient/EasyRestClient.swift:49:43: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 47 |     ///   - baseURL: The root endpoint for all requests (e.g. "https://api.example.com/").
 48 |     ///   - session: URLSession instance to use; defaults to `URLSession.shared`.
 49 |     public init(baseURL: String, session: URLSession = .shared) {
    |                                           `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 50 |         guard let url = URL(string: baseURL) else {
 51 |             fatalError("Invalid base URL: \(baseURL)")
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/EasyRestClient/EasyRestClient.swift:49:57: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 47 |     ///   - baseURL: The root endpoint for all requests (e.g. "https://api.example.com/").
 48 |     ///   - session: URLSession instance to use; defaults to `URLSession.shared`.
 49 |     public init(baseURL: String, session: URLSession = .shared) {
    |                                                         `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 50 |         guard let url = URL(string: baseURL) else {
 51 |             fatalError("Invalid base URL: \(baseURL)")
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:189:17: error: cannot find type 'URLRequest' in scope
187 |     private func buildURLRequest<Request: EazyRestRequest>(
188 |         for request: Request
189 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
190 |         guard var components = URLComponents(
191 |             url: baseURL.appendingPathComponent(request.resourceName),
[9/11] Compiling EazyRestClient EasyRestResponse.swift
[10/11] Compiling EazyRestClient EasyRestClient.swift
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:39:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 37 | /// Handles request building, header injection, and response decoding.
 38 | public class EazyRestClient {
 39 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 40 |     private let baseURL: URL
 41 |
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/EasyRestClient/EasyRestClient.swift:49:43: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 47 |     ///   - baseURL: The root endpoint for all requests (e.g. "https://api.example.com/").
 48 |     ///   - session: URLSession instance to use; defaults to `URLSession.shared`.
 49 |     public init(baseURL: String, session: URLSession = .shared) {
    |                                           `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 50 |         guard let url = URL(string: baseURL) else {
 51 |             fatalError("Invalid base URL: \(baseURL)")
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/EasyRestClient/EasyRestClient.swift:49:57: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 47 |     ///   - baseURL: The root endpoint for all requests (e.g. "https://api.example.com/").
 48 |     ///   - session: URLSession instance to use; defaults to `URLSession.shared`.
 49 |     public init(baseURL: String, session: URLSession = .shared) {
    |                                                         `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 50 |         guard let url = URL(string: baseURL) else {
 51 |             fatalError("Invalid base URL: \(baseURL)")
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:189:17: error: cannot find type 'URLRequest' in scope
187 |     private func buildURLRequest<Request: EazyRestRequest>(
188 |         for request: Request
189 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
190 |         guard var components = URLComponents(
191 |             url: baseURL.appendingPathComponent(request.resourceName),
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:67:25: error: cannot find type 'URLRequest' in scope
 65 |         completion: @escaping ResultCallback<Request.Response>
 66 |     ) {
 67 |         let urlRequest: URLRequest
    |                         `- error: cannot find type 'URLRequest' in scope
 68 |         do {
 69 |             urlRequest = try buildURLRequest(for: request)
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:71:13: error: cannot find 'DispatchQueue' in scope
 69 |             urlRequest = try buildURLRequest(for: request)
 70 |         } catch {
 71 |             DispatchQueue.main.async {
    |             `- error: cannot find 'DispatchQueue' in scope
 72 |                 completion(.failure(EazyRestError.invalidURL))
 73 |             }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:79:24: error: cannot find 'DispatchQueue' in scope
 77 |         let task = session.dataTask(with: urlRequest) { data, response, error in
 78 |             if let error = error {
 79 |                 return DispatchQueue.main.async {
    |                        `- error: cannot find 'DispatchQueue' in scope
 80 |                     completion(.failure(EazyRestError.transportError(error)))
 81 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:84:24: error: cannot find 'DispatchQueue' in scope
 82 |             }
 83 |             guard let http = response as? HTTPURLResponse else {
 84 |                 return DispatchQueue.main.async {
    |                        `- error: cannot find 'DispatchQueue' in scope
 85 |                     completion(.failure(EazyRestError.badResponse))
 86 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:104:24: error: cannot find 'DispatchQueue' in scope
102 |                     err = .serverError(http.statusCode)
103 |                 }
104 |                 return DispatchQueue.main.async {
    |                        `- error: cannot find 'DispatchQueue' in scope
105 |                     completion(.failure(err))
106 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:109:24: error: cannot find 'DispatchQueue' in scope
107 |             }
108 |             guard let data = data else {
109 |                 return DispatchQueue.main.async {
    |                        `- error: cannot find 'DispatchQueue' in scope
110 |                     completion(.failure(EazyRestError.badResponse))
111 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:115:17: error: cannot find 'DispatchQueue' in scope
113 |             do {
114 |                 let decoded = try JSONDecoder().decode(Request.Response.self, from: data)
115 |                 DispatchQueue.main.async {
    |                 `- error: cannot find 'DispatchQueue' in scope
116 |                     completion(.success(decoded))
117 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:119:17: error: cannot find 'DispatchQueue' in scope
117 |                 }
118 |             } catch {
119 |                 DispatchQueue.main.async {
    |                 `- error: cannot find 'DispatchQueue' in scope
120 |                     completion(.failure(EazyRestError.decodingError(error)))
121 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:77:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 75 |         }
 76 |
 77 |         let task = session.dataTask(with: urlRequest) { data, response, error in
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 78 |             if let error = error {
 79 |                 return DispatchQueue.main.async {
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:137:25: error: cannot find type 'URLRequest' in scope
135 |         _ request: Request
136 |     ) async throws -> Request.Response {
137 |         let urlRequest: URLRequest
    |                         `- error: cannot find type 'URLRequest' in scope
138 |         do {
139 |             urlRequest = try buildURLRequest(for: request)
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:146:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 |         }
145 |
146 |         let (data, response): (Data, URLResponse)
    |                                      `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
147 |         do {
148 |             (data, response) = try await session.data(for: urlRequest)
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/EasyRestClient/EasyRestClient.swift:148:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
146 |         let (data, response): (Data, URLResponse)
147 |         do {
148 |             (data, response) = try await session.data(for: urlRequest)
    |                                                  `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
149 |         } catch {
150 |             throw EazyRestError.transportError(error)
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:153:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
151 |         }
152 |
153 |         guard let http = response as? HTTPURLResponse else {
    |                                   `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
154 |             throw EazyRestError.badResponse
155 |         }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:153:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |         }
152 |
153 |         guard let http = response as? HTTPURLResponse else {
    |                                       `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
154 |             throw EazyRestError.badResponse
155 |         }
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/EasyRestClient/EasyRestClient.swift:157:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
155 |         }
156 |
157 |         if !(200..<300).contains(http.statusCode) {
    |                                       `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
158 |             switch http.statusCode {
159 |             case 401:
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:158:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
156 |
157 |         if !(200..<300).contains(http.statusCode) {
158 |             switch http.statusCode {
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
159 |             case 401:
160 |                 throw EazyRestError.unauthorized
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:168:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
166 |                 throw EazyRestError.timeout
167 |             case 400..<600:
168 |                 throw EazyRestError.serverError(http.statusCode)
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
169 |             default:
170 |                 throw EazyRestError.serverError(http.statusCode)
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:170:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
168 |                 throw EazyRestError.serverError(http.statusCode)
169 |             default:
170 |                 throw EazyRestError.serverError(http.statusCode)
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
171 |             }
172 |         }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:202:26: error: cannot find 'URLRequest' in scope
200 |             throw EazyRestError.invalidURL
201 |         }
202 |         var urlRequest = URLRequest(url: url)
    |                          `- error: cannot find 'URLRequest' in scope
203 |         urlRequest.httpMethod = request.httpMethod.rawValue
204 |         urlRequest.httpShouldHandleCookies = false
[11/11] Compiling EazyRestClient HTTPMethods.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:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:eb0758f51dbd6991fb9e51dedbfbcbec142ffc0d3b9b8ad91fa19d35e5136f0a
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 EazyRestClient EazyRestRequest.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/10] Emitting module EazyRestClient
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:39:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 37 | /// Handles request building, header injection, and response decoding.
 38 | public class EazyRestClient {
 39 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 40 |     private let baseURL: URL
 41 |
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/EasyRestClient/EasyRestClient.swift:49:43: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 47 |     ///   - baseURL: The root endpoint for all requests (e.g. "https://api.example.com/").
 48 |     ///   - session: URLSession instance to use; defaults to `URLSession.shared`.
 49 |     public init(baseURL: String, session: URLSession = .shared) {
    |                                           `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 50 |         guard let url = URL(string: baseURL) else {
 51 |             fatalError("Invalid base URL: \(baseURL)")
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/EasyRestClient/EasyRestClient.swift:49:57: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 47 |     ///   - baseURL: The root endpoint for all requests (e.g. "https://api.example.com/").
 48 |     ///   - session: URLSession instance to use; defaults to `URLSession.shared`.
 49 |     public init(baseURL: String, session: URLSession = .shared) {
    |                                                         `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 50 |         guard let url = URL(string: baseURL) else {
 51 |             fatalError("Invalid base URL: \(baseURL)")
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:189:17: error: cannot find type 'URLRequest' in scope
187 |     private func buildURLRequest<Request: EazyRestRequest>(
188 |         for request: Request
189 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
190 |         guard var components = URLComponents(
191 |             url: baseURL.appendingPathComponent(request.resourceName),
[4/10] Compiling EazyRestClient EasyRestDefaultResponse.swift
[5/10] Compiling EazyRestClient EasyRestError.swift
[6/10] Compiling EazyRestClient Decodable+EasyRest.swift
[7/10] Compiling EazyRestClient EasyRestClient.swift
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:39:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 37 | /// Handles request building, header injection, and response decoding.
 38 | public class EazyRestClient {
 39 |     private let session: URLSession
    |                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 40 |     private let baseURL: URL
 41 |
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/EasyRestClient/EasyRestClient.swift:49:43: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 47 |     ///   - baseURL: The root endpoint for all requests (e.g. "https://api.example.com/").
 48 |     ///   - session: URLSession instance to use; defaults to `URLSession.shared`.
 49 |     public init(baseURL: String, session: URLSession = .shared) {
    |                                           `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 50 |         guard let url = URL(string: baseURL) else {
 51 |             fatalError("Invalid base URL: \(baseURL)")
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/EasyRestClient/EasyRestClient.swift:49:57: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 47 |     ///   - baseURL: The root endpoint for all requests (e.g. "https://api.example.com/").
 48 |     ///   - session: URLSession instance to use; defaults to `URLSession.shared`.
 49 |     public init(baseURL: String, session: URLSession = .shared) {
    |                                                         `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 50 |         guard let url = URL(string: baseURL) else {
 51 |             fatalError("Invalid base URL: \(baseURL)")
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:189:17: error: cannot find type 'URLRequest' in scope
187 |     private func buildURLRequest<Request: EazyRestRequest>(
188 |         for request: Request
189 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
190 |         guard var components = URLComponents(
191 |             url: baseURL.appendingPathComponent(request.resourceName),
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:67:25: error: cannot find type 'URLRequest' in scope
 65 |         completion: @escaping ResultCallback<Request.Response>
 66 |     ) {
 67 |         let urlRequest: URLRequest
    |                         `- error: cannot find type 'URLRequest' in scope
 68 |         do {
 69 |             urlRequest = try buildURLRequest(for: request)
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:71:13: error: cannot find 'DispatchQueue' in scope
 69 |             urlRequest = try buildURLRequest(for: request)
 70 |         } catch {
 71 |             DispatchQueue.main.async {
    |             `- error: cannot find 'DispatchQueue' in scope
 72 |                 completion(.failure(EazyRestError.invalidURL))
 73 |             }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:79:24: error: cannot find 'DispatchQueue' in scope
 77 |         let task = session.dataTask(with: urlRequest) { data, response, error in
 78 |             if let error = error {
 79 |                 return DispatchQueue.main.async {
    |                        `- error: cannot find 'DispatchQueue' in scope
 80 |                     completion(.failure(EazyRestError.transportError(error)))
 81 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:84:24: error: cannot find 'DispatchQueue' in scope
 82 |             }
 83 |             guard let http = response as? HTTPURLResponse else {
 84 |                 return DispatchQueue.main.async {
    |                        `- error: cannot find 'DispatchQueue' in scope
 85 |                     completion(.failure(EazyRestError.badResponse))
 86 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:104:24: error: cannot find 'DispatchQueue' in scope
102 |                     err = .serverError(http.statusCode)
103 |                 }
104 |                 return DispatchQueue.main.async {
    |                        `- error: cannot find 'DispatchQueue' in scope
105 |                     completion(.failure(err))
106 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:109:24: error: cannot find 'DispatchQueue' in scope
107 |             }
108 |             guard let data = data else {
109 |                 return DispatchQueue.main.async {
    |                        `- error: cannot find 'DispatchQueue' in scope
110 |                     completion(.failure(EazyRestError.badResponse))
111 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:115:17: error: cannot find 'DispatchQueue' in scope
113 |             do {
114 |                 let decoded = try JSONDecoder().decode(Request.Response.self, from: data)
115 |                 DispatchQueue.main.async {
    |                 `- error: cannot find 'DispatchQueue' in scope
116 |                     completion(.success(decoded))
117 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:119:17: error: cannot find 'DispatchQueue' in scope
117 |                 }
118 |             } catch {
119 |                 DispatchQueue.main.async {
    |                 `- error: cannot find 'DispatchQueue' in scope
120 |                     completion(.failure(EazyRestError.decodingError(error)))
121 |                 }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:77:28: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 75 |         }
 76 |
 77 |         let task = session.dataTask(with: urlRequest) { data, response, error in
    |                            `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
 78 |             if let error = error {
 79 |                 return DispatchQueue.main.async {
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:137:25: error: cannot find type 'URLRequest' in scope
135 |         _ request: Request
136 |     ) async throws -> Request.Response {
137 |         let urlRequest: URLRequest
    |                         `- error: cannot find type 'URLRequest' in scope
138 |         do {
139 |             urlRequest = try buildURLRequest(for: request)
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:146:38: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
144 |         }
145 |
146 |         let (data, response): (Data, URLResponse)
    |                                      `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
147 |         do {
148 |             (data, response) = try await session.data(for: urlRequest)
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/EasyRestClient/EasyRestClient.swift:148:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
146 |         let (data, response): (Data, URLResponse)
147 |         do {
148 |             (data, response) = try await session.data(for: urlRequest)
    |                                                  `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
149 |         } catch {
150 |             throw EazyRestError.transportError(error)
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:153:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
151 |         }
152 |
153 |         guard let http = response as? HTTPURLResponse else {
    |                                   `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
154 |             throw EazyRestError.badResponse
155 |         }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:153:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
151 |         }
152 |
153 |         guard let http = response as? HTTPURLResponse else {
    |                                       `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
154 |             throw EazyRestError.badResponse
155 |         }
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/EasyRestClient/EasyRestClient.swift:157:39: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
155 |         }
156 |
157 |         if !(200..<300).contains(http.statusCode) {
    |                                       `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
158 |             switch http.statusCode {
159 |             case 401:
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:158:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
156 |
157 |         if !(200..<300).contains(http.statusCode) {
158 |             switch http.statusCode {
    |                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
159 |             case 401:
160 |                 throw EazyRestError.unauthorized
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:168:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
166 |                 throw EazyRestError.timeout
167 |             case 400..<600:
168 |                 throw EazyRestError.serverError(http.statusCode)
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
169 |             default:
170 |                 throw EazyRestError.serverError(http.statusCode)
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:170:54: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
168 |                 throw EazyRestError.serverError(http.statusCode)
169 |             default:
170 |                 throw EazyRestError.serverError(http.statusCode)
    |                                                      `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
171 |             }
172 |         }
/host/spi-builder-workspace/Sources/EasyRestClient/EasyRestClient.swift:202:26: error: cannot find 'URLRequest' in scope
200 |             throw EazyRestError.invalidURL
201 |         }
202 |         var urlRequest = URLRequest(url: url)
    |                          `- error: cannot find 'URLRequest' in scope
203 |         urlRequest.httpMethod = request.httpMethod.rawValue
204 |         urlRequest.httpShouldHandleCookies = false
[8/10] Compiling EazyRestClient EazyRestRequest+defaults.swift
[9/10] Compiling EazyRestClient EasyRestResponse.swift
[10/10] Compiling EazyRestClient HTTPMethods.swift
BUILD FAILURE 6.1 wasm