The Swift Package Index logo.Swift Package Index

Build Information

Failed to build HTTPClient, reference main (9187bb), with Swift 6.1 for Wasm on 28 May 2025 03:47:49 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/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/uhooi/swift-http-client.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/uhooi/swift-http-client
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 9187bb1 Update README.md
Cloned https://github.com/uhooi/swift-http-client.git
Revision (git rev-parse @):
9187bb195fa3e1e2a508a1f55b85f443ed486e3b
SUCCESS checkout https://github.com/uhooi/swift-http-client.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/uhooi/swift-http-client.git
https://github.com/uhooi/swift-http-client.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "HTTPClient",
  "name" : "HTTPClient",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    }
  ],
  "products" : [
    {
      "name" : "HTTPClient",
      "targets" : [
        "HTTPClient"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "HTTPClientTests",
      "module_type" : "SwiftTarget",
      "name" : "HTTPClientTests",
      "path" : "Tests/HTTPClientTests",
      "sources" : [
        "HTTPClientTests.swift"
      ],
      "target_dependencies" : [
        "HTTPClient"
      ],
      "type" : "test"
    },
    {
      "c99name" : "HTTPClient",
      "module_type" : "SwiftTarget",
      "name" : "HTTPClient",
      "path" : "Sources/HTTPClient",
      "product_memberships" : [
        "HTTPClient"
      ],
      "sources" : [
        "Enums/ContentType.swift",
        "Enums/HTTPHeaderField.swift",
        "Enums/HTTPMethod.swift",
        "Enums/RequestError.swift",
        "Extensions/Foundation/URLSession+Async.swift",
        "HTTPClient.swift",
        "Request.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/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
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/10] Compiling HTTPClient ContentType.swift
[4/10] Emitting module HTTPClient
/host/spi-builder-workspace/Sources/HTTPClient/Extensions/Foundation/URLSession+Async.swift:7:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 5 |
 6 | @available(iOS, introduced: 13.0, deprecated: 15.0, message: "Use the built-in API instead")
 7 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 8 |
 9 |     func data(from request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:89:76: error: cannot find type 'URLRequest' in scope
 87 |     // MARK: Other Private Methods
 88 |
 89 |     private func createRequest<T: Request>(_ requestContents: T) throws -> URLRequest {
    |                                                                            `- error: cannot find type 'URLRequest' in scope
 90 |         guard let url = URL(string: baseURLString + requestContents.path),
 91 |               var components = URLComponents(url: url, resolvingAgainstBaseURL: url.baseURL != nil)
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:111:69: error: cannot find type 'URLRequest' in scope
109 |     }
110 |
111 |     private func request<T: Request>(_ requestContents: T, request: URLRequest) async throws -> T.ResponseBody {
    |                                                                     `- error: cannot find type 'URLRequest' in scope
112 |         let (data, response) = try await URLSession.shared.data(from: request)
113 |         if let requestError = validateResponse(response) {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:121:69: error: cannot find type 'URLRequest' in scope
119 |     }
120 |
121 |     private func request<T: Request>(_ requestContents: T, request: URLRequest, completion: @escaping (Result<T.ResponseBody, Error>) -> Void) {
    |                                                                     `- error: cannot find type 'URLRequest' in scope
122 |         URLSession.shared.dataTask(with: request) { data, response, error in
123 |             if let error = error {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:148:48: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |     }
147 |
148 |     private func validateResponse( _ response: URLResponse?) -> RequestError? {
    |                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
149 |         guard let response = response as? HTTPURLResponse else {
150 |             return .invalidResponse
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
[5/10] Compiling HTTPClient HTTPHeaderField.swift
[6/10] Compiling HTTPClient HTTPMethod.swift
[7/10] Compiling HTTPClient HTTPClient.swift
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:89:76: error: cannot find type 'URLRequest' in scope
 87 |     // MARK: Other Private Methods
 88 |
 89 |     private func createRequest<T: Request>(_ requestContents: T) throws -> URLRequest {
    |                                                                            `- error: cannot find type 'URLRequest' in scope
 90 |         guard let url = URL(string: baseURLString + requestContents.path),
 91 |               var components = URLComponents(url: url, resolvingAgainstBaseURL: url.baseURL != nil)
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:111:69: error: cannot find type 'URLRequest' in scope
109 |     }
110 |
111 |     private func request<T: Request>(_ requestContents: T, request: URLRequest) async throws -> T.ResponseBody {
    |                                                                     `- error: cannot find type 'URLRequest' in scope
112 |         let (data, response) = try await URLSession.shared.data(from: request)
113 |         if let requestError = validateResponse(response) {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:121:69: error: cannot find type 'URLRequest' in scope
119 |     }
120 |
121 |     private func request<T: Request>(_ requestContents: T, request: URLRequest, completion: @escaping (Result<T.ResponseBody, Error>) -> Void) {
    |                                                                     `- error: cannot find type 'URLRequest' in scope
122 |         URLSession.shared.dataTask(with: request) { data, response, error in
123 |             if let error = error {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:148:48: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |     }
147 |
148 |     private func validateResponse( _ response: URLResponse?) -> RequestError? {
    |                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
149 |         guard let response = response as? HTTPURLResponse else {
150 |             return .invalidResponse
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/HTTPClient/HTTPClient.swift:30:38: error: incorrect argument label in call (have '_:request:', expected '_:requestBody:')
 28 |     public func request<T: Request>(_ requestContents: T) async throws -> T.ResponseBody {
 29 |         let request = try createRequest(requestContents)
 30 |         return try await self.request(requestContents, request: request)
    |                                      `- error: incorrect argument label in call (have '_:request:', expected '_:requestBody:')
 31 |     }
 32 |
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:40:22: error: cannot find type 'URLRequest' in scope
 38 |     /// - SeeAlso: ``request(_:)``
 39 |     public func request<T: Request, U: Encodable>(_ requestContents: T, requestBody: U) async throws -> T.ResponseBody {
 40 |         var request: URLRequest
    |                      `- error: cannot find type 'URLRequest' in scope
 41 |         request = try createRequest(requestContents)
 42 |         request.httpBody = try JSONEncoder().encode(requestBody)
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:43:38: error: incorrect argument label in call (have '_:request:', expected '_:requestBody:')
 41 |         request = try createRequest(requestContents)
 42 |         request.httpBody = try JSONEncoder().encode(requestBody)
 43 |         return try await self.request(requestContents, request: request)
    |                                      `- error: incorrect argument label in call (have '_:request:', expected '_:requestBody:')
 44 |     }
 45 |
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:58:25: error: incorrect argument label in call (have '_:request:completion:', expected '_:requestBody:completion:')
 56 |         do {
 57 |             let request = try createRequest(requestContents)
 58 |             self.request(requestContents, request: request, completion: completion)
    |                         `- error: incorrect argument label in call (have '_:request:completion:', expected '_:requestBody:completion:')
 59 |         } catch {
 60 |             completion(.failure(error))
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:77:26: error: cannot find type 'URLRequest' in scope
 75 |     public func request<T: Request, U: Encodable>(_ requestContents: T, requestBody: U, completion: @escaping (Result<T.ResponseBody, Error>) -> Void) {
 76 |         do {
 77 |             var request: URLRequest
    |                          `- error: cannot find type 'URLRequest' in scope
 78 |             request = try createRequest(requestContents)
 79 |             request.httpBody = try JSONEncoder().encode(requestBody)
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:80:25: error: incorrect argument label in call (have '_:request:completion:', expected '_:requestBody:completion:')
 78 |             request = try createRequest(requestContents)
 79 |             request.httpBody = try JSONEncoder().encode(requestBody)
 80 |             self.request(requestContents, request: request, completion: completion)
    |                         `- error: incorrect argument label in call (have '_:request:completion:', expected '_:requestBody:completion:')
 81 |         } catch {
 82 |             completion(.failure(error))
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:100:23: error: cannot find 'URLRequest' in scope
 98 |         }
 99 |
100 |         var request = URLRequest(url: components.url!)
    |                       `- error: cannot find 'URLRequest' in scope
101 |         request.httpMethod = requestContents.httpMethod.rawValue
102 |         if let httpHeaders = requestContents.httpHeaders {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:112:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
110 |
111 |     private func request<T: Request>(_ requestContents: T, request: URLRequest) async throws -> T.ResponseBody {
112 |         let (data, response) = try await URLSession.shared.data(from: request)
    |                                                     `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
113 |         if let requestError = validateResponse(response) {
114 |             throw requestError
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:122:20: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
120 |
121 |     private func request<T: Request>(_ requestContents: T, request: URLRequest, completion: @escaping (Result<T.ResponseBody, Error>) -> Void) {
122 |         URLSession.shared.dataTask(with: request) { data, response, error in
    |                    `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
123 |             if let error = error {
124 |                 completion(.failure(error))
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:127:57: error: argument type '_' expected to be an instance of a class or class-constrained type
125 |                 return
126 |             }
127 |             if let requestError = self.validateResponse(response) {
    |                                                         `- error: argument type '_' expected to be an instance of a class or class-constrained type
128 |                 completion(.failure(requestError))
129 |                 return
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:149:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
147 |
148 |     private func validateResponse( _ response: URLResponse?) -> RequestError? {
149 |         guard let response = response as? HTTPURLResponse else {
    |                                       `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
150 |             return .invalidResponse
151 |         }
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:149:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
147 |
148 |     private func validateResponse( _ response: URLResponse?) -> RequestError? {
149 |         guard let response = response as? HTTPURLResponse else {
    |                                           `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
150 |             return .invalidResponse
151 |         }
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/HTTPClient/HTTPClient.swift:152:64: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
150 |             return .invalidResponse
151 |         }
152 |         if let requestError = self.validateStatusCode(response.statusCode) {
    |                                                                `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
153 |             return requestError
154 |         }
[8/10] Compiling HTTPClient URLSession+Async.swift
/host/spi-builder-workspace/Sources/HTTPClient/Extensions/Foundation/URLSession+Async.swift:7:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 5 |
 6 | @available(iOS, introduced: 13.0, deprecated: 15.0, message: "Use the built-in API instead")
 7 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 8 |
 9 |     func data(from request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/HTTPClient/Extensions/Foundation/URLSession+Async.swift:9:29: error: cannot find type 'URLRequest' in scope
 7 | extension URLSession {
 8 |
 9 |     func data(from request: URLRequest) async throws -> (Data, URLResponse) {
   |                             `- error: cannot find type 'URLRequest' in scope
10 |         try await withCheckedThrowingContinuation { continuation in
11 |             self.dataTask(with: request) { data, response, error in
[9/10] Compiling HTTPClient RequestError.swift
[10/10] Compiling HTTPClient Request.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/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 HTTPClient RequestError.swift
[3/9] Compiling HTTPClient ContentType.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/9] Emitting module HTTPClient
/host/spi-builder-workspace/Sources/HTTPClient/Extensions/Foundation/URLSession+Async.swift:7:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 5 |
 6 | @available(iOS, introduced: 13.0, deprecated: 15.0, message: "Use the built-in API instead")
 7 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 8 |
 9 |     func data(from request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:89:76: error: cannot find type 'URLRequest' in scope
 87 |     // MARK: Other Private Methods
 88 |
 89 |     private func createRequest<T: Request>(_ requestContents: T) throws -> URLRequest {
    |                                                                            `- error: cannot find type 'URLRequest' in scope
 90 |         guard let url = URL(string: baseURLString + requestContents.path),
 91 |               var components = URLComponents(url: url, resolvingAgainstBaseURL: url.baseURL != nil)
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:111:69: error: cannot find type 'URLRequest' in scope
109 |     }
110 |
111 |     private func request<T: Request>(_ requestContents: T, request: URLRequest) async throws -> T.ResponseBody {
    |                                                                     `- error: cannot find type 'URLRequest' in scope
112 |         let (data, response) = try await URLSession.shared.data(from: request)
113 |         if let requestError = validateResponse(response) {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:121:69: error: cannot find type 'URLRequest' in scope
119 |     }
120 |
121 |     private func request<T: Request>(_ requestContents: T, request: URLRequest, completion: @escaping (Result<T.ResponseBody, Error>) -> Void) {
    |                                                                     `- error: cannot find type 'URLRequest' in scope
122 |         URLSession.shared.dataTask(with: request) { data, response, error in
123 |             if let error = error {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:148:48: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |     }
147 |
148 |     private func validateResponse( _ response: URLResponse?) -> RequestError? {
    |                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
149 |         guard let response = response as? HTTPURLResponse else {
150 |             return .invalidResponse
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
[5/9] Compiling HTTPClient URLSession+Async.swift
/host/spi-builder-workspace/Sources/HTTPClient/Extensions/Foundation/URLSession+Async.swift:7:1: error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 5 |
 6 | @available(iOS, introduced: 13.0, deprecated: 15.0, message: "Use the built-in API instead")
 7 | extension URLSession {
   | `- error: non-nominal type 'URLSession' (aka 'AnyObject') cannot be extended
 8 |
 9 |     func data(from request: URLRequest) async throws -> (Data, URLResponse) {
/host/spi-builder-workspace/Sources/HTTPClient/Extensions/Foundation/URLSession+Async.swift:9:29: error: cannot find type 'URLRequest' in scope
 7 | extension URLSession {
 8 |
 9 |     func data(from request: URLRequest) async throws -> (Data, URLResponse) {
   |                             `- error: cannot find type 'URLRequest' in scope
10 |         try await withCheckedThrowingContinuation { continuation in
11 |             self.dataTask(with: request) { data, response, error in
[6/9] Compiling HTTPClient HTTPClient.swift
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:89:76: error: cannot find type 'URLRequest' in scope
 87 |     // MARK: Other Private Methods
 88 |
 89 |     private func createRequest<T: Request>(_ requestContents: T) throws -> URLRequest {
    |                                                                            `- error: cannot find type 'URLRequest' in scope
 90 |         guard let url = URL(string: baseURLString + requestContents.path),
 91 |               var components = URLComponents(url: url, resolvingAgainstBaseURL: url.baseURL != nil)
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:111:69: error: cannot find type 'URLRequest' in scope
109 |     }
110 |
111 |     private func request<T: Request>(_ requestContents: T, request: URLRequest) async throws -> T.ResponseBody {
    |                                                                     `- error: cannot find type 'URLRequest' in scope
112 |         let (data, response) = try await URLSession.shared.data(from: request)
113 |         if let requestError = validateResponse(response) {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:121:69: error: cannot find type 'URLRequest' in scope
119 |     }
120 |
121 |     private func request<T: Request>(_ requestContents: T, request: URLRequest, completion: @escaping (Result<T.ResponseBody, Error>) -> Void) {
    |                                                                     `- error: cannot find type 'URLRequest' in scope
122 |         URLSession.shared.dataTask(with: request) { data, response, error in
123 |             if let error = error {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:148:48: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |     }
147 |
148 |     private func validateResponse( _ response: URLResponse?) -> RequestError? {
    |                                                `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
149 |         guard let response = response as? HTTPURLResponse else {
150 |             return .invalidResponse
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/HTTPClient/HTTPClient.swift:30:38: error: incorrect argument label in call (have '_:request:', expected '_:requestBody:')
 28 |     public func request<T: Request>(_ requestContents: T) async throws -> T.ResponseBody {
 29 |         let request = try createRequest(requestContents)
 30 |         return try await self.request(requestContents, request: request)
    |                                      `- error: incorrect argument label in call (have '_:request:', expected '_:requestBody:')
 31 |     }
 32 |
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:40:22: error: cannot find type 'URLRequest' in scope
 38 |     /// - SeeAlso: ``request(_:)``
 39 |     public func request<T: Request, U: Encodable>(_ requestContents: T, requestBody: U) async throws -> T.ResponseBody {
 40 |         var request: URLRequest
    |                      `- error: cannot find type 'URLRequest' in scope
 41 |         request = try createRequest(requestContents)
 42 |         request.httpBody = try JSONEncoder().encode(requestBody)
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:43:38: error: incorrect argument label in call (have '_:request:', expected '_:requestBody:')
 41 |         request = try createRequest(requestContents)
 42 |         request.httpBody = try JSONEncoder().encode(requestBody)
 43 |         return try await self.request(requestContents, request: request)
    |                                      `- error: incorrect argument label in call (have '_:request:', expected '_:requestBody:')
 44 |     }
 45 |
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:58:25: error: incorrect argument label in call (have '_:request:completion:', expected '_:requestBody:completion:')
 56 |         do {
 57 |             let request = try createRequest(requestContents)
 58 |             self.request(requestContents, request: request, completion: completion)
    |                         `- error: incorrect argument label in call (have '_:request:completion:', expected '_:requestBody:completion:')
 59 |         } catch {
 60 |             completion(.failure(error))
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:77:26: error: cannot find type 'URLRequest' in scope
 75 |     public func request<T: Request, U: Encodable>(_ requestContents: T, requestBody: U, completion: @escaping (Result<T.ResponseBody, Error>) -> Void) {
 76 |         do {
 77 |             var request: URLRequest
    |                          `- error: cannot find type 'URLRequest' in scope
 78 |             request = try createRequest(requestContents)
 79 |             request.httpBody = try JSONEncoder().encode(requestBody)
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:80:25: error: incorrect argument label in call (have '_:request:completion:', expected '_:requestBody:completion:')
 78 |             request = try createRequest(requestContents)
 79 |             request.httpBody = try JSONEncoder().encode(requestBody)
 80 |             self.request(requestContents, request: request, completion: completion)
    |                         `- error: incorrect argument label in call (have '_:request:completion:', expected '_:requestBody:completion:')
 81 |         } catch {
 82 |             completion(.failure(error))
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:100:23: error: cannot find 'URLRequest' in scope
 98 |         }
 99 |
100 |         var request = URLRequest(url: components.url!)
    |                       `- error: cannot find 'URLRequest' in scope
101 |         request.httpMethod = requestContents.httpMethod.rawValue
102 |         if let httpHeaders = requestContents.httpHeaders {
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:112:53: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
110 |
111 |     private func request<T: Request>(_ requestContents: T, request: URLRequest) async throws -> T.ResponseBody {
112 |         let (data, response) = try await URLSession.shared.data(from: request)
    |                                                     `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
113 |         if let requestError = validateResponse(response) {
114 |             throw requestError
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:122:20: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
120 |
121 |     private func request<T: Request>(_ requestContents: T, request: URLRequest, completion: @escaping (Result<T.ResponseBody, Error>) -> Void) {
122 |         URLSession.shared.dataTask(with: request) { data, response, error in
    |                    `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
123 |             if let error = error {
124 |                 completion(.failure(error))
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:127:57: error: argument type '_' expected to be an instance of a class or class-constrained type
125 |                 return
126 |             }
127 |             if let requestError = self.validateResponse(response) {
    |                                                         `- error: argument type '_' expected to be an instance of a class or class-constrained type
128 |                 completion(.failure(requestError))
129 |                 return
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:149:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
147 |
148 |     private func validateResponse( _ response: URLResponse?) -> RequestError? {
149 |         guard let response = response as? HTTPURLResponse else {
    |                                       `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
150 |             return .invalidResponse
151 |         }
/host/spi-builder-workspace/Sources/HTTPClient/HTTPClient.swift:149:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
147 |
148 |     private func validateResponse( _ response: URLResponse?) -> RequestError? {
149 |         guard let response = response as? HTTPURLResponse else {
    |                                           `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
150 |             return .invalidResponse
151 |         }
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/HTTPClient/HTTPClient.swift:152:64: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
150 |             return .invalidResponse
151 |         }
152 |         if let requestError = self.validateStatusCode(response.statusCode) {
    |                                                                `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
153 |             return requestError
154 |         }
[7/9] Compiling HTTPClient Request.swift
[8/9] Compiling HTTPClient HTTPHeaderField.swift
[9/9] Compiling HTTPClient HTTPMethod.swift
BUILD FAILURE 6.1 wasm