Build Information
Failed to build IPGeolocation, reference v1.0.1 (4f7bb5), with Swift 6.1 for Wasm on 5 Nov 2026 16:19:20 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344843-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1Build Log
========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/IPGeolocation/ip-geolocation-api-swift-sdk.git
Reference: v1.0.1
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/IPGeolocation/ip-geolocation-api-swift-sdk
* tag v1.0.1 -> FETCH_HEAD
HEAD is now at 4f7bb50 Merge pull request #4 from IPGeolocation/fix/error-handling-and-arabic
Cloned https://github.com/IPGeolocation/ip-geolocation-api-swift-sdk.git
Revision (git rev-parse @):
4f7bb501960c58981abf37f3113941a74d8cee4a
SUCCESS checkout https://github.com/IPGeolocation/ip-geolocation-api-swift-sdk.git at v1.0.1
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/IPGeolocation/ip-geolocation-api-swift-sdk.git
https://github.com/IPGeolocation/ip-geolocation-api-swift-sdk.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344843-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/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 saguaro1/spi-images
Digest: sha256:c39884094bf9874b7a6bb32559a257cc0b80a9b15eb9e58adaa15f5bda5e4fb5
Status: Image is up to date for registry.gitlab.com/saguaro1/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/17] Emitting module IPGeolocation
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:25:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | final class URLSessionHTTPTransport: HTTPTransport, @unchecked Sendable {
25 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 | private let maxResponseBodyBytes: Int
27 | private let redirectBlocker: RedirectBlocker
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/IPGeolocation/Internal/HTTPTransport.swift:55:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | init(session: URLSession, maxResponseBodyBytes: Int) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | self.session = session
57 | self.maxResponseBodyBytes = maxResponseBodyBytes
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/IPGeolocation/Internal/HTTPTransport.swift:117:53: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 | }
116 |
117 | private func readBody(bytesSequence: URLSession.AsyncBytes) async throws -> Data {
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | let cap = maxResponseBodyBytes
119 | var buffer = Data()
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:132:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | }
131 |
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
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/IPGeolocation/Internal/HTTPTransport.swift:184:40: error: cannot find type 'URLSessionTaskDelegate' in scope
182 | /// redirects is the safest default for an API client with query-string auth;
183 | /// consumers who need redirects can point `baseURL` at the final host.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
185 | func urlSession(
186 | _ session: URLSession,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:189:29: error: cannot find type 'URLRequest' in scope
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:190:39: error: cannot find type 'URLRequest' in scope
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
191 | ) {
192 | completionHandler(nil)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:186:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
185 | func urlSession(
186 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
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/IPGeolocation/Internal/HTTPTransport.swift:187:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | func urlSession(
186 | _ session: URLSession,
187 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:188:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
186 | _ session: URLSession,
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
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
[4/18] Compiling IPGeolocation Language.swift
[5/18] Compiling IPGeolocation LookupRequest.swift
[6/18] Compiling IPGeolocation Models.swift
[7/18] Compiling IPGeolocation ResponseFormat.swift
[8/18] Compiling IPGeolocation ResponseMapper.swift
[9/18] Compiling IPGeolocation JSONOutput.swift
[10/18] Compiling IPGeolocation QueryBuilder.swift
[11/18] Compiling IPGeolocation RequestNormalizer.swift
[12/18] Compiling IPGeolocation APIResponse.swift
[13/18] Compiling IPGeolocation Errors.swift
[14/18] Compiling IPGeolocation ConfigNormalizer.swift
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:25:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | final class URLSessionHTTPTransport: HTTPTransport, @unchecked Sendable {
25 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 | private let maxResponseBodyBytes: Int
27 | private let redirectBlocker: RedirectBlocker
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/IPGeolocation/Internal/HTTPTransport.swift:55:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | init(session: URLSession, maxResponseBodyBytes: Int) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | self.session = session
57 | self.maxResponseBodyBytes = maxResponseBodyBytes
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/IPGeolocation/Internal/HTTPTransport.swift:117:53: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 | }
116 |
117 | private func readBody(bytesSequence: URLSession.AsyncBytes) async throws -> Data {
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | let cap = maxResponseBodyBytes
119 | var buffer = Data()
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:132:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | }
131 |
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
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/IPGeolocation/Internal/HTTPTransport.swift:184:40: error: cannot find type 'URLSessionTaskDelegate' in scope
182 | /// redirects is the safest default for an API client with query-string auth;
183 | /// consumers who need redirects can point `baseURL` at the final host.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
185 | func urlSession(
186 | _ session: URLSession,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:189:29: error: cannot find type 'URLRequest' in scope
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:190:39: error: cannot find type 'URLRequest' in scope
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
191 | ) {
192 | completionHandler(nil)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:186:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
185 | func urlSession(
186 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
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/IPGeolocation/Internal/HTTPTransport.swift:187:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | func urlSession(
186 | _ session: URLSession,
187 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:188:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
186 | _ session: URLSession,
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
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/IPGeolocation/Internal/HTTPTransport.swift:34:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
32 | maxResponseBodyBytes: Int
33 | ) {
34 | let configuration = URLSessionConfiguration.ephemeral
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
35 | configuration.timeoutIntervalForRequest = requestTimeout
36 | configuration.timeoutIntervalForResource = resourceTimeout
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:38:45: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
36 | configuration.timeoutIntervalForResource = resourceTimeout
37 | configuration.urlCache = nil
38 | configuration.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
39 | configuration.httpCookieStorage = nil
40 | configuration.httpCookieAcceptPolicy = .never
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:40:49: error: cannot infer contextual base in reference to member 'never'
38 | configuration.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
39 | configuration.httpCookieStorage = nil
40 | configuration.httpCookieAcceptPolicy = .never
| `- error: cannot infer contextual base in reference to member 'never'
41 | configuration.urlCredentialStorage = nil
42 | configuration.httpShouldSetCookies = false
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:47:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
45 | let blocker = RedirectBlocker()
46 | self.redirectBlocker = blocker
47 | self.session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
48 | configuration: configuration,
49 | delegate: blocker,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:50:28: error: 'nil' requires a contextual type
48 | configuration: configuration,
49 | delegate: blocker,
50 | delegateQueue: nil
| `- error: 'nil' requires a contextual type
51 | )
52 | self.maxResponseBodyBytes = maxResponseBodyBytes
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:62:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
60 |
61 | func close() {
62 | session.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
63 | }
64 |
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:68:26: error: cannot find 'URLRequest' in scope
66 | let apiKey = URLComponents(url: request.url, resolvingAgainstBaseURL: false)?
67 | .queryItems?.first(where: { $0.name == "apiKey" })?.value
68 | var urlRequest = URLRequest(url: request.url)
| `- error: cannot find 'URLRequest' in scope
69 | urlRequest.httpMethod = request.method
70 | urlRequest.httpBody = request.body
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:75:39: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
73 | }
74 |
75 | let bytesSequence: URLSession.AsyncBytes
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
76 | let response: URLResponse
77 | do {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:76:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | let bytesSequence: URLSession.AsyncBytes
76 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | do {
78 | (bytesSequence, response) = try await session.bytes(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/IPGeolocation/Internal/HTTPTransport.swift:78:59: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
76 | let response: URLResponse
77 | do {
78 | (bytesSequence, response) = try await session.bytes(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
79 | } catch {
80 | throw Self.mapTransportError(error, apiKey: apiKey)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:83:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
81 | }
82 |
83 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
84 | throw TransportError("HTTP transport error: unexpected non-HTTP response")
85 | }
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:83:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | }
82 |
83 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | throw TransportError("HTTP transport error: unexpected non-HTTP response")
85 | }
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/IPGeolocation/Internal/HTTPTransport.swift:88:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
86 |
87 | let headers = normalizeHeaders(httpResponse)
88 | let isSuccess = (200...299).contains(httpResponse.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
89 | let bodyData: Data
90 | do {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:97:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
95 | }
96 | if !isSuccess {
97 | return HTTPResponseData(statusCode: httpResponse.statusCode, body: "", headers: headers)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
98 | }
99 | if error is TransportError || error is RequestTimeoutError { throw error }
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:105:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
103 | guard let bodyString = String(data: bodyData, encoding: .utf8) else {
104 | if !isSuccess {
105 | return HTTPResponseData(statusCode: httpResponse.statusCode, body: "", headers: headers)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
106 | }
107 | throw SerializationError("Response body was not valid UTF-8")
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:111:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
109 |
110 | return HTTPResponseData(
111 | statusCode: httpResponse.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
112 | body: bodyString,
113 | headers: headers
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:134:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
135 | guard let name = rawKey as? String else { continue }
136 | let canonical = RequestNormalizer.canonicalHeaderName(name)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:192:27: error: 'nil' requires a contextual type
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
192 | completionHandler(nil)
| `- error: 'nil' requires a contextual type
193 | }
194 | }
[15/18] Compiling IPGeolocation HTTPTransport.swift
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:25:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | final class URLSessionHTTPTransport: HTTPTransport, @unchecked Sendable {
25 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 | private let maxResponseBodyBytes: Int
27 | private let redirectBlocker: RedirectBlocker
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/IPGeolocation/Internal/HTTPTransport.swift:55:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | init(session: URLSession, maxResponseBodyBytes: Int) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | self.session = session
57 | self.maxResponseBodyBytes = maxResponseBodyBytes
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/IPGeolocation/Internal/HTTPTransport.swift:117:53: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 | }
116 |
117 | private func readBody(bytesSequence: URLSession.AsyncBytes) async throws -> Data {
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | let cap = maxResponseBodyBytes
119 | var buffer = Data()
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:132:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | }
131 |
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
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/IPGeolocation/Internal/HTTPTransport.swift:184:40: error: cannot find type 'URLSessionTaskDelegate' in scope
182 | /// redirects is the safest default for an API client with query-string auth;
183 | /// consumers who need redirects can point `baseURL` at the final host.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
185 | func urlSession(
186 | _ session: URLSession,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:189:29: error: cannot find type 'URLRequest' in scope
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:190:39: error: cannot find type 'URLRequest' in scope
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
191 | ) {
192 | completionHandler(nil)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:186:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
185 | func urlSession(
186 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
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/IPGeolocation/Internal/HTTPTransport.swift:187:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | func urlSession(
186 | _ session: URLSession,
187 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:188:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
186 | _ session: URLSession,
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
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/IPGeolocation/Internal/HTTPTransport.swift:34:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
32 | maxResponseBodyBytes: Int
33 | ) {
34 | let configuration = URLSessionConfiguration.ephemeral
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
35 | configuration.timeoutIntervalForRequest = requestTimeout
36 | configuration.timeoutIntervalForResource = resourceTimeout
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:38:45: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
36 | configuration.timeoutIntervalForResource = resourceTimeout
37 | configuration.urlCache = nil
38 | configuration.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
39 | configuration.httpCookieStorage = nil
40 | configuration.httpCookieAcceptPolicy = .never
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:40:49: error: cannot infer contextual base in reference to member 'never'
38 | configuration.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
39 | configuration.httpCookieStorage = nil
40 | configuration.httpCookieAcceptPolicy = .never
| `- error: cannot infer contextual base in reference to member 'never'
41 | configuration.urlCredentialStorage = nil
42 | configuration.httpShouldSetCookies = false
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:47:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
45 | let blocker = RedirectBlocker()
46 | self.redirectBlocker = blocker
47 | self.session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
48 | configuration: configuration,
49 | delegate: blocker,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:50:28: error: 'nil' requires a contextual type
48 | configuration: configuration,
49 | delegate: blocker,
50 | delegateQueue: nil
| `- error: 'nil' requires a contextual type
51 | )
52 | self.maxResponseBodyBytes = maxResponseBodyBytes
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:62:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
60 |
61 | func close() {
62 | session.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
63 | }
64 |
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:68:26: error: cannot find 'URLRequest' in scope
66 | let apiKey = URLComponents(url: request.url, resolvingAgainstBaseURL: false)?
67 | .queryItems?.first(where: { $0.name == "apiKey" })?.value
68 | var urlRequest = URLRequest(url: request.url)
| `- error: cannot find 'URLRequest' in scope
69 | urlRequest.httpMethod = request.method
70 | urlRequest.httpBody = request.body
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:75:39: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
73 | }
74 |
75 | let bytesSequence: URLSession.AsyncBytes
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
76 | let response: URLResponse
77 | do {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:76:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | let bytesSequence: URLSession.AsyncBytes
76 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | do {
78 | (bytesSequence, response) = try await session.bytes(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/IPGeolocation/Internal/HTTPTransport.swift:78:59: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
76 | let response: URLResponse
77 | do {
78 | (bytesSequence, response) = try await session.bytes(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
79 | } catch {
80 | throw Self.mapTransportError(error, apiKey: apiKey)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:83:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
81 | }
82 |
83 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
84 | throw TransportError("HTTP transport error: unexpected non-HTTP response")
85 | }
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:83:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | }
82 |
83 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | throw TransportError("HTTP transport error: unexpected non-HTTP response")
85 | }
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/IPGeolocation/Internal/HTTPTransport.swift:88:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
86 |
87 | let headers = normalizeHeaders(httpResponse)
88 | let isSuccess = (200...299).contains(httpResponse.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
89 | let bodyData: Data
90 | do {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:97:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
95 | }
96 | if !isSuccess {
97 | return HTTPResponseData(statusCode: httpResponse.statusCode, body: "", headers: headers)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
98 | }
99 | if error is TransportError || error is RequestTimeoutError { throw error }
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:105:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
103 | guard let bodyString = String(data: bodyData, encoding: .utf8) else {
104 | if !isSuccess {
105 | return HTTPResponseData(statusCode: httpResponse.statusCode, body: "", headers: headers)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
106 | }
107 | throw SerializationError("Response body was not valid UTF-8")
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:111:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
109 |
110 | return HTTPResponseData(
111 | statusCode: httpResponse.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
112 | body: bodyString,
113 | headers: headers
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:134:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
135 | guard let name = rawKey as? String else { continue }
136 | let canonical = RequestNormalizer.canonicalHeaderName(name)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:192:27: error: 'nil' requires a contextual type
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
192 | completionHandler(nil)
| `- error: 'nil' requires a contextual type
193 | }
194 | }
[16/18] Compiling IPGeolocation IPGeolocationClient.swift
[17/18] Compiling IPGeolocation IPGeolocationClientConfig.swift
[18/18] Compiling IPGeolocation Version.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344843-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:c39884094bf9874b7a6bb32559a257cc0b80a9b15eb9e58adaa15f5bda5e4fb5
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-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/16] Compiling IPGeolocation APIResponse.swift
[3/16] Compiling IPGeolocation Errors.swift
[4/16] Compiling IPGeolocation IPGeolocationClient.swift
[5/16] Compiling IPGeolocation IPGeolocationClientConfig.swift
[6/16] Emitting module IPGeolocation
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:25:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | final class URLSessionHTTPTransport: HTTPTransport, @unchecked Sendable {
25 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 | private let maxResponseBodyBytes: Int
27 | private let redirectBlocker: RedirectBlocker
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/IPGeolocation/Internal/HTTPTransport.swift:55:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | init(session: URLSession, maxResponseBodyBytes: Int) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | self.session = session
57 | self.maxResponseBodyBytes = maxResponseBodyBytes
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/IPGeolocation/Internal/HTTPTransport.swift:117:53: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 | }
116 |
117 | private func readBody(bytesSequence: URLSession.AsyncBytes) async throws -> Data {
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | let cap = maxResponseBodyBytes
119 | var buffer = Data()
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:132:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | }
131 |
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
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/IPGeolocation/Internal/HTTPTransport.swift:184:40: error: cannot find type 'URLSessionTaskDelegate' in scope
182 | /// redirects is the safest default for an API client with query-string auth;
183 | /// consumers who need redirects can point `baseURL` at the final host.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
185 | func urlSession(
186 | _ session: URLSession,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:189:29: error: cannot find type 'URLRequest' in scope
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:190:39: error: cannot find type 'URLRequest' in scope
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
191 | ) {
192 | completionHandler(nil)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:186:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
185 | func urlSession(
186 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
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/IPGeolocation/Internal/HTTPTransport.swift:187:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | func urlSession(
186 | _ session: URLSession,
187 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:188:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
186 | _ session: URLSession,
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
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
[7/17] Compiling IPGeolocation ResponseMapper.swift
[8/17] Compiling IPGeolocation JSONOutput.swift
[9/17] Compiling IPGeolocation Version.swift
[10/17] Compiling IPGeolocation Models.swift
[11/17] Compiling IPGeolocation ResponseFormat.swift
[12/17] Compiling IPGeolocation QueryBuilder.swift
[13/17] Compiling IPGeolocation RequestNormalizer.swift
[14/17] Compiling IPGeolocation Language.swift
[15/17] Compiling IPGeolocation LookupRequest.swift
[16/17] Compiling IPGeolocation ConfigNormalizer.swift
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:25:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | final class URLSessionHTTPTransport: HTTPTransport, @unchecked Sendable {
25 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 | private let maxResponseBodyBytes: Int
27 | private let redirectBlocker: RedirectBlocker
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/IPGeolocation/Internal/HTTPTransport.swift:55:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | init(session: URLSession, maxResponseBodyBytes: Int) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | self.session = session
57 | self.maxResponseBodyBytes = maxResponseBodyBytes
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/IPGeolocation/Internal/HTTPTransport.swift:117:53: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 | }
116 |
117 | private func readBody(bytesSequence: URLSession.AsyncBytes) async throws -> Data {
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | let cap = maxResponseBodyBytes
119 | var buffer = Data()
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:132:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | }
131 |
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
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/IPGeolocation/Internal/HTTPTransport.swift:184:40: error: cannot find type 'URLSessionTaskDelegate' in scope
182 | /// redirects is the safest default for an API client with query-string auth;
183 | /// consumers who need redirects can point `baseURL` at the final host.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
185 | func urlSession(
186 | _ session: URLSession,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:189:29: error: cannot find type 'URLRequest' in scope
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:190:39: error: cannot find type 'URLRequest' in scope
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
191 | ) {
192 | completionHandler(nil)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:186:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
185 | func urlSession(
186 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
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/IPGeolocation/Internal/HTTPTransport.swift:187:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | func urlSession(
186 | _ session: URLSession,
187 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:188:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
186 | _ session: URLSession,
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
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/IPGeolocation/Internal/HTTPTransport.swift:34:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
32 | maxResponseBodyBytes: Int
33 | ) {
34 | let configuration = URLSessionConfiguration.ephemeral
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
35 | configuration.timeoutIntervalForRequest = requestTimeout
36 | configuration.timeoutIntervalForResource = resourceTimeout
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:38:45: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
36 | configuration.timeoutIntervalForResource = resourceTimeout
37 | configuration.urlCache = nil
38 | configuration.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
39 | configuration.httpCookieStorage = nil
40 | configuration.httpCookieAcceptPolicy = .never
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:40:49: error: cannot infer contextual base in reference to member 'never'
38 | configuration.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
39 | configuration.httpCookieStorage = nil
40 | configuration.httpCookieAcceptPolicy = .never
| `- error: cannot infer contextual base in reference to member 'never'
41 | configuration.urlCredentialStorage = nil
42 | configuration.httpShouldSetCookies = false
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:47:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
45 | let blocker = RedirectBlocker()
46 | self.redirectBlocker = blocker
47 | self.session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
48 | configuration: configuration,
49 | delegate: blocker,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:50:28: error: 'nil' requires a contextual type
48 | configuration: configuration,
49 | delegate: blocker,
50 | delegateQueue: nil
| `- error: 'nil' requires a contextual type
51 | )
52 | self.maxResponseBodyBytes = maxResponseBodyBytes
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:62:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
60 |
61 | func close() {
62 | session.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
63 | }
64 |
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:68:26: error: cannot find 'URLRequest' in scope
66 | let apiKey = URLComponents(url: request.url, resolvingAgainstBaseURL: false)?
67 | .queryItems?.first(where: { $0.name == "apiKey" })?.value
68 | var urlRequest = URLRequest(url: request.url)
| `- error: cannot find 'URLRequest' in scope
69 | urlRequest.httpMethod = request.method
70 | urlRequest.httpBody = request.body
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:75:39: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
73 | }
74 |
75 | let bytesSequence: URLSession.AsyncBytes
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
76 | let response: URLResponse
77 | do {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:76:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | let bytesSequence: URLSession.AsyncBytes
76 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | do {
78 | (bytesSequence, response) = try await session.bytes(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/IPGeolocation/Internal/HTTPTransport.swift:78:59: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
76 | let response: URLResponse
77 | do {
78 | (bytesSequence, response) = try await session.bytes(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
79 | } catch {
80 | throw Self.mapTransportError(error, apiKey: apiKey)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:83:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
81 | }
82 |
83 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
84 | throw TransportError("HTTP transport error: unexpected non-HTTP response")
85 | }
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:83:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | }
82 |
83 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | throw TransportError("HTTP transport error: unexpected non-HTTP response")
85 | }
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/IPGeolocation/Internal/HTTPTransport.swift:88:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
86 |
87 | let headers = normalizeHeaders(httpResponse)
88 | let isSuccess = (200...299).contains(httpResponse.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
89 | let bodyData: Data
90 | do {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:97:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
95 | }
96 | if !isSuccess {
97 | return HTTPResponseData(statusCode: httpResponse.statusCode, body: "", headers: headers)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
98 | }
99 | if error is TransportError || error is RequestTimeoutError { throw error }
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:105:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
103 | guard let bodyString = String(data: bodyData, encoding: .utf8) else {
104 | if !isSuccess {
105 | return HTTPResponseData(statusCode: httpResponse.statusCode, body: "", headers: headers)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
106 | }
107 | throw SerializationError("Response body was not valid UTF-8")
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:111:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
109 |
110 | return HTTPResponseData(
111 | statusCode: httpResponse.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
112 | body: bodyString,
113 | headers: headers
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:134:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
135 | guard let name = rawKey as? String else { continue }
136 | let canonical = RequestNormalizer.canonicalHeaderName(name)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:192:27: error: 'nil' requires a contextual type
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
192 | completionHandler(nil)
| `- error: 'nil' requires a contextual type
193 | }
194 | }
[17/17] Compiling IPGeolocation HTTPTransport.swift
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:25:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
23 |
24 | final class URLSessionHTTPTransport: HTTPTransport, @unchecked Sendable {
25 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
26 | private let maxResponseBodyBytes: Int
27 | private let redirectBlocker: RedirectBlocker
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/IPGeolocation/Internal/HTTPTransport.swift:55:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
53 | }
54 |
55 | init(session: URLSession, maxResponseBodyBytes: Int) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
56 | self.session = session
57 | self.maxResponseBodyBytes = maxResponseBodyBytes
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/IPGeolocation/Internal/HTTPTransport.swift:117:53: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
115 | }
116 |
117 | private func readBody(bytesSequence: URLSession.AsyncBytes) async throws -> Data {
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
118 | let cap = maxResponseBodyBytes
119 | var buffer = Data()
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:132:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
130 | }
131 |
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
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/IPGeolocation/Internal/HTTPTransport.swift:184:40: error: cannot find type 'URLSessionTaskDelegate' in scope
182 | /// redirects is the safest default for an API client with query-string auth;
183 | /// consumers who need redirects can point `baseURL` at the final host.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
| `- error: cannot find type 'URLSessionTaskDelegate' in scope
185 | func urlSession(
186 | _ session: URLSession,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:189:29: error: cannot find type 'URLRequest' in scope
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:190:39: error: cannot find type 'URLRequest' in scope
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
| `- error: cannot find type 'URLRequest' in scope
191 | ) {
192 | completionHandler(nil)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:186:20: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | final class RedirectBlocker: NSObject, URLSessionTaskDelegate {
185 | func urlSession(
186 | _ session: URLSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
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/IPGeolocation/Internal/HTTPTransport.swift:187:15: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
185 | func urlSession(
186 | _ session: URLSession,
187 | task: URLSessionTask,
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
188 | willPerformHTTPRedirection response: HTTPURLResponse,
189 | newRequest request: URLRequest,
Foundation.URLSessionTask:2:18: note: 'URLSessionTask' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSessionTask = AnyObject
| `- note: 'URLSessionTask' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:188:46: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
186 | _ session: URLSession,
187 | task: URLSessionTask,
188 | willPerformHTTPRedirection response: HTTPURLResponse,
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
189 | newRequest request: URLRequest,
190 | completionHandler: @escaping (URLRequest?) -> Void
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/IPGeolocation/Internal/HTTPTransport.swift:34:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
32 | maxResponseBodyBytes: Int
33 | ) {
34 | let configuration = URLSessionConfiguration.ephemeral
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'ephemeral'
35 | configuration.timeoutIntervalForRequest = requestTimeout
36 | configuration.timeoutIntervalForResource = resourceTimeout
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:38:45: error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
36 | configuration.timeoutIntervalForResource = resourceTimeout
37 | configuration.urlCache = nil
38 | configuration.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
| `- error: cannot infer contextual base in reference to member 'reloadIgnoringLocalAndRemoteCacheData'
39 | configuration.httpCookieStorage = nil
40 | configuration.httpCookieAcceptPolicy = .never
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:40:49: error: cannot infer contextual base in reference to member 'never'
38 | configuration.requestCachePolicy = .reloadIgnoringLocalAndRemoteCacheData
39 | configuration.httpCookieStorage = nil
40 | configuration.httpCookieAcceptPolicy = .never
| `- error: cannot infer contextual base in reference to member 'never'
41 | configuration.urlCredentialStorage = nil
42 | configuration.httpShouldSetCookies = false
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:47:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
45 | let blocker = RedirectBlocker()
46 | self.redirectBlocker = blocker
47 | self.session = URLSession(
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
48 | configuration: configuration,
49 | delegate: blocker,
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:50:28: error: 'nil' requires a contextual type
48 | configuration: configuration,
49 | delegate: blocker,
50 | delegateQueue: nil
| `- error: 'nil' requires a contextual type
51 | )
52 | self.maxResponseBodyBytes = maxResponseBodyBytes
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:62:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
60 |
61 | func close() {
62 | session.finishTasksAndInvalidate()
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'finishTasksAndInvalidate'
63 | }
64 |
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:68:26: error: cannot find 'URLRequest' in scope
66 | let apiKey = URLComponents(url: request.url, resolvingAgainstBaseURL: false)?
67 | .queryItems?.first(where: { $0.name == "apiKey" })?.value
68 | var urlRequest = URLRequest(url: request.url)
| `- error: cannot find 'URLRequest' in scope
69 | urlRequest.httpMethod = request.method
70 | urlRequest.httpBody = request.body
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:75:39: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
73 | }
74 |
75 | let bytesSequence: URLSession.AsyncBytes
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
76 | let response: URLResponse
77 | do {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:76:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
74 |
75 | let bytesSequence: URLSession.AsyncBytes
76 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
77 | do {
78 | (bytesSequence, response) = try await session.bytes(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/IPGeolocation/Internal/HTTPTransport.swift:78:59: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
76 | let response: URLResponse
77 | do {
78 | (bytesSequence, response) = try await session.bytes(for: urlRequest)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
79 | } catch {
80 | throw Self.mapTransportError(error, apiKey: apiKey)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:83:43: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
81 | }
82 |
83 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
84 | throw TransportError("HTTP transport error: unexpected non-HTTP response")
85 | }
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:83:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
81 | }
82 |
83 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
84 | throw TransportError("HTTP transport error: unexpected non-HTTP response")
85 | }
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/IPGeolocation/Internal/HTTPTransport.swift:88:59: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
86 |
87 | let headers = normalizeHeaders(httpResponse)
88 | let isSuccess = (200...299).contains(httpResponse.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
89 | let bodyData: Data
90 | do {
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:97:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
95 | }
96 | if !isSuccess {
97 | return HTTPResponseData(statusCode: httpResponse.statusCode, body: "", headers: headers)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
98 | }
99 | if error is TransportError || error is RequestTimeoutError { throw error }
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:105:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
103 | guard let bodyString = String(data: bodyData, encoding: .utf8) else {
104 | if !isSuccess {
105 | return HTTPResponseData(statusCode: httpResponse.statusCode, body: "", headers: headers)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
106 | }
107 | throw SerializationError("Response body was not valid UTF-8")
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:111:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
109 |
110 | return HTTPResponseData(
111 | statusCode: httpResponse.statusCode,
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
112 | body: bodyString,
113 | headers: headers
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:134:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
132 | private func normalizeHeaders(_ response: HTTPURLResponse) -> [String: [String]] {
133 | var result: [String: [String]] = [:]
134 | for (rawKey, rawValue) in response.allHeaderFields {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'allHeaderFields'
135 | guard let name = rawKey as? String else { continue }
136 | let canonical = RequestNormalizer.canonicalHeaderName(name)
/host/spi-builder-workspace/Sources/IPGeolocation/Internal/HTTPTransport.swift:192:27: error: 'nil' requires a contextual type
190 | completionHandler: @escaping (URLRequest?) -> Void
191 | ) {
192 | completionHandler(nil)
| `- error: 'nil' requires a contextual type
193 | }
194 | }
BUILD FAILURE 6.1 wasm