Build Information
Failed to build IPData, reference v1.0.1 (d0bc0d), with Swift 6.1 for Wasm on 27 Feb 2026 08:14:34 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/ipdata/swift.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/ipdata/swift
* tag v1.0.1 -> FETCH_HEAD
HEAD is now at d0bc0d7 Merge pull request #2 from ipdata/claude/swift-ipdata-sdk-S4ezn
Cloned https://github.com/ipdata/swift.git
Revision (git rev-parse @):
d0bc0d79bb0c952fdbf622cb14716e76de41b081
SUCCESS checkout https://github.com/ipdata/swift.git at v1.0.1
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/ipdata/swift.git
https://github.com/ipdata/swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
],
"manifest_display_name" : "IPData",
"name" : "IPData",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "12.0"
},
{
"name" : "ios",
"version" : "15.0"
},
{
"name" : "tvos",
"version" : "15.0"
},
{
"name" : "watchos",
"version" : "8.0"
}
],
"products" : [
{
"name" : "IPData",
"targets" : [
"IPData"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "IPDataTests",
"module_type" : "SwiftTarget",
"name" : "IPDataTests",
"path" : "Tests/IPDataTests",
"sources" : [
"IPDataClientTests.swift",
"IPDataTests.swift"
],
"target_dependencies" : [
"IPData"
],
"type" : "test"
},
{
"c99name" : "IPData",
"module_type" : "SwiftTarget",
"name" : "IPData",
"path" : "Sources/IPData",
"product_memberships" : [
"IPData"
],
"sources" : [
"IPDataClient.swift",
"IPDataError.swift",
"Models.swift"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:58b971189c4d3c564696bb40c86e07506670ed096ab7351a005c7c449525017a
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/6] Compiling IPData IPDataError.swift
[4/6] Compiling IPData Models.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/6] Emitting module IPData
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:24:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | private let apiKey: String
23 | private let baseURL: URL
24 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 | private let decoder: JSONDecoder
26 |
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/IPData/IPDataClient.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | apiKey: String,
36 | baseURL: URL = IPDataClient.defaultBaseURL,
37 | session: URLSession = .shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | ) {
39 | self.apiKey = apiKey
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/IPData/IPDataClient.swift:37:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | apiKey: String,
36 | baseURL: URL = IPDataClient.defaultBaseURL,
37 | session: URLSession = .shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | ) {
39 | self.apiKey = apiKey
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:148:51: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | private func perform<T: Decodable>(_ request: URLRequest) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
149 | let (data, response) = try await dataTask(request)
150 | try checkResponse(response, data: data)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:158:38: error: cannot find type 'URLRequest' in scope
156 | }
157 |
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
159 | do {
160 | return try await session.data(for: request)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:158:73: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
156 | }
157 |
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
159 | do {
160 | return try await session.data(for: request)
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/IPData/IPDataClient.swift:166:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
164 | }
165 |
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
167 | guard let http = response as? HTTPURLResponse else { return }
168 | guard (200...299).contains(http.statusCode) else {
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
[6/6] Compiling IPData IPDataClient.swift
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:24:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | private let apiKey: String
23 | private let baseURL: URL
24 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 | private let decoder: JSONDecoder
26 |
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/IPData/IPDataClient.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | apiKey: String,
36 | baseURL: URL = IPDataClient.defaultBaseURL,
37 | session: URLSession = .shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | ) {
39 | self.apiKey = apiKey
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/IPData/IPDataClient.swift:37:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | apiKey: String,
36 | baseURL: URL = IPDataClient.defaultBaseURL,
37 | session: URLSession = .shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | ) {
39 | self.apiKey = apiKey
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:148:51: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | private func perform<T: Decodable>(_ request: URLRequest) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
149 | let (data, response) = try await dataTask(request)
150 | try checkResponse(response, data: data)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:158:38: error: cannot find type 'URLRequest' in scope
156 | }
157 |
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
159 | do {
160 | return try await session.data(for: request)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:158:73: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
156 | }
157 |
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
159 | do {
160 | return try await session.data(for: request)
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/IPData/IPDataClient.swift:166:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
164 | }
165 |
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
167 | guard let http = response as? HTTPURLResponse else { return }
168 | guard (200...299).contains(http.statusCode) else {
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/IPData/IPDataClient.swift:93:23: error: cannot find 'URLRequest' in scope
91 | }
92 |
93 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
94 | request.httpMethod = "POST"
95 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:135:23: error: cannot find 'URLRequest' in scope
133 |
134 | private func fetch<T: Decodable>(_ url: URL) async throws -> T {
135 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
136 | request.setValue(apiKey, forHTTPHeaderField: "api-key")
137 | return try await perform(request)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:141:23: error: cannot find 'URLRequest' in scope
139 |
140 | private func fetchRaw(_ url: URL) async throws -> Data {
141 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
142 | request.setValue(apiKey, forHTTPHeaderField: "api-key")
143 | let (data, response) = try await dataTask(request)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:160:38: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
159 | do {
160 | return try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
161 | } catch {
162 | throw IPDataError.networkError(error)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:167:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
165 |
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
167 | guard let http = response as? HTTPURLResponse else { return }
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
168 | guard (200...299).contains(http.statusCode) else {
169 | let message = (try? decoder.decode(APIErrorResponse.self, from: data))?.message
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:167:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
167 | guard let http = response as? HTTPURLResponse else { return }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
168 | guard (200...299).contains(http.statusCode) else {
169 | let message = (try? decoder.decode(APIErrorResponse.self, from: data))?.message
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/IPData/IPDataClient.swift:168:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
167 | guard let http = response as? HTTPURLResponse else { return }
168 | guard (200...299).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
169 | let message = (try? decoder.decode(APIErrorResponse.self, from: data))?.message
170 | ?? String(data: data, encoding: .utf8)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:172:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
170 | ?? String(data: data, encoding: .utf8)
171 | ?? "Unknown error"
172 | switch http.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
173 | case 400: throw IPDataError.badRequest(message)
174 | case 401: throw IPDataError.unauthorized(message)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:177:75: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
175 | case 403: throw IPDataError.forbidden(message)
176 | case 404: throw IPDataError.notFound(message)
177 | default: throw IPDataError.unexpectedStatus(statusCode: http.statusCode, message: message)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
178 | }
179 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:58b971189c4d3c564696bb40c86e07506670ed096ab7351a005c7c449525017a
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/5] Compiling IPData Models.swift
[3/5] Compiling IPData IPDataClient.swift
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:24:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | private let apiKey: String
23 | private let baseURL: URL
24 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 | private let decoder: JSONDecoder
26 |
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/IPData/IPDataClient.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | apiKey: String,
36 | baseURL: URL = IPDataClient.defaultBaseURL,
37 | session: URLSession = .shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | ) {
39 | self.apiKey = apiKey
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/IPData/IPDataClient.swift:37:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | apiKey: String,
36 | baseURL: URL = IPDataClient.defaultBaseURL,
37 | session: URLSession = .shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | ) {
39 | self.apiKey = apiKey
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:148:51: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | private func perform<T: Decodable>(_ request: URLRequest) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
149 | let (data, response) = try await dataTask(request)
150 | try checkResponse(response, data: data)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:158:38: error: cannot find type 'URLRequest' in scope
156 | }
157 |
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
159 | do {
160 | return try await session.data(for: request)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:158:73: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
156 | }
157 |
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
159 | do {
160 | return try await session.data(for: request)
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/IPData/IPDataClient.swift:166:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
164 | }
165 |
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
167 | guard let http = response as? HTTPURLResponse else { return }
168 | guard (200...299).contains(http.statusCode) else {
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/IPData/IPDataClient.swift:93:23: error: cannot find 'URLRequest' in scope
91 | }
92 |
93 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
94 | request.httpMethod = "POST"
95 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:135:23: error: cannot find 'URLRequest' in scope
133 |
134 | private func fetch<T: Decodable>(_ url: URL) async throws -> T {
135 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
136 | request.setValue(apiKey, forHTTPHeaderField: "api-key")
137 | return try await perform(request)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:141:23: error: cannot find 'URLRequest' in scope
139 |
140 | private func fetchRaw(_ url: URL) async throws -> Data {
141 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
142 | request.setValue(apiKey, forHTTPHeaderField: "api-key")
143 | let (data, response) = try await dataTask(request)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:160:38: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
159 | do {
160 | return try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
161 | } catch {
162 | throw IPDataError.networkError(error)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:167:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
165 |
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
167 | guard let http = response as? HTTPURLResponse else { return }
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
168 | guard (200...299).contains(http.statusCode) else {
169 | let message = (try? decoder.decode(APIErrorResponse.self, from: data))?.message
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:167:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
167 | guard let http = response as? HTTPURLResponse else { return }
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
168 | guard (200...299).contains(http.statusCode) else {
169 | let message = (try? decoder.decode(APIErrorResponse.self, from: data))?.message
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/IPData/IPDataClient.swift:168:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
167 | guard let http = response as? HTTPURLResponse else { return }
168 | guard (200...299).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
169 | let message = (try? decoder.decode(APIErrorResponse.self, from: data))?.message
170 | ?? String(data: data, encoding: .utf8)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:172:25: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
170 | ?? String(data: data, encoding: .utf8)
171 | ?? "Unknown error"
172 | switch http.statusCode {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
173 | case 400: throw IPDataError.badRequest(message)
174 | case 401: throw IPDataError.unauthorized(message)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:177:75: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
175 | case 403: throw IPDataError.forbidden(message)
176 | case 404: throw IPDataError.notFound(message)
177 | default: throw IPDataError.unexpectedStatus(statusCode: http.statusCode, message: message)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
178 | }
179 | }
[4/5] Compiling IPData IPDataError.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/5] Emitting module IPData
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:24:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
22 | private let apiKey: String
23 | private let baseURL: URL
24 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
25 | private let decoder: JSONDecoder
26 |
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/IPData/IPDataClient.swift:37:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 | apiKey: String,
36 | baseURL: URL = IPDataClient.defaultBaseURL,
37 | session: URLSession = .shared
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 | ) {
39 | self.apiKey = apiKey
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/IPData/IPDataClient.swift:37:32: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
35 | apiKey: String,
36 | baseURL: URL = IPDataClient.defaultBaseURL,
37 | session: URLSession = .shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
38 | ) {
39 | self.apiKey = apiKey
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:148:51: error: cannot find type 'URLRequest' in scope
146 | }
147 |
148 | private func perform<T: Decodable>(_ request: URLRequest) async throws -> T {
| `- error: cannot find type 'URLRequest' in scope
149 | let (data, response) = try await dataTask(request)
150 | try checkResponse(response, data: data)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:158:38: error: cannot find type 'URLRequest' in scope
156 | }
157 |
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: cannot find type 'URLRequest' in scope
159 | do {
160 | return try await session.data(for: request)
/host/spi-builder-workspace/Sources/IPData/IPDataClient.swift:158:73: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
156 | }
157 |
158 | private func dataTask(_ request: URLRequest) async throws -> (Data, URLResponse) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
159 | do {
160 | return try await session.data(for: request)
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/IPData/IPDataClient.swift:166:44: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
164 | }
165 |
166 | private func checkResponse(_ response: URLResponse, data: Data) throws {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
167 | guard let http = response as? HTTPURLResponse else { return }
168 | guard (200...299).contains(http.statusCode) else {
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
BUILD FAILURE 6.1 wasm