Build Information
Failed to build IPData, reference 1.0.0 (057083), with Swift 6.1 for Wasm on 27 May 2025 15:41:45 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/heyzooi/IPData.git
Reference: 1.0.0
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/heyzooi/IPData
* tag 1.0.0 -> FETCH_HEAD
HEAD is now at 057083f Updating .cirrus.yml
Cloned https://github.com/heyzooi/IPData.git
Revision (git rev-parse @):
057083f83991c0bd7c39aac44612dd3416fc447c
SUCCESS checkout https://github.com/heyzooi/IPData.git at 1.0.0
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/heyzooi/IPData.git
https://github.com/heyzooi/IPData.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
],
"manifest_display_name" : "IPData",
"name" : "IPData",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "IPData",
"targets" : [
"IPData"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "IPDataTests",
"module_type" : "SwiftTarget",
"name" : "IPDataTests",
"path" : "Tests/IPDataTests",
"sources" : [
"IPDataTests.swift",
"XCTestManifests.swift"
],
"target_dependencies" : [
"IPData"
],
"type" : "test"
},
{
"c99name" : "IPData",
"module_type" : "SwiftTarget",
"name" : "IPData",
"path" : "Sources/IPData",
"product_memberships" : [
"IPData"
],
"sources" : [
"Carrier.swift",
"Currency.swift",
"IP.swift",
"IPData.swift",
"IPDataError.swift",
"Language.swift",
"Result.swift",
"StatusCode.swift",
"Threat.swift",
"Timezone.swift"
],
"type" : "library"
}
],
"tools_version" : "4.2"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/12] Compiling IPData Result.swift
[4/12] Compiling IPData Language.swift
[5/13] Compiling IPData StatusCode.swift
[6/13] Compiling IPData Threat.swift
[7/13] Compiling IPData IPDataError.swift
/host/spi-builder-workspace/Sources/IPData/IPDataError.swift:41:36: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
39 | return message
40 | case .invalidResponse(let statusCode):
41 | return HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
42 | case .unknown:
43 | return "Unknown Error"
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/13] Compiling IPData Carrier.swift
[9/13] Compiling IPData Currency.swift
[10/13] Emitting module IPData
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:23: warning: static property 'urlSession' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| |- warning: static property 'urlSession' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'urlSession' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'urlSession' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:7:23: warning: static property 'apiKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
5 | public static var urlSession = URLSession.shared
6 |
7 | public static var apiKey: String?
| |- warning: static property 'apiKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiKey' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiKey' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 |
9 | private init() {
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | @discardableResult
13 | public static func lookup(
14 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | apiKey: String? = apiKey,
16 | ip: String = "",
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/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | ip: String = "",
17 | completionHandler: @escaping (Result<IP>) -> Void
18 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)")!
20 | urlComponents.queryItems = [
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/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | @discardableResult
31 | public static func carrier(
32 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | apiKey: String? = apiKey,
34 | ip: String,
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/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | ip: String,
35 | completionHandler: @escaping (Result<Carrier>) -> Void
36 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)/carrier")!
38 | urlComponents.queryItems = [
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/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | @discardableResult
49 | public static func lookup(
50 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | apiKey: String? = apiKey,
52 | bulk ips: [String],
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/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 | bulk ips: [String],
53 | completionHandler: @escaping (Result<[IP]>) -> Void
54 | ) -> URLSessionTask? {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | var urlComponents = URLComponents(string: "https://api.ipdata.co/bulk")!
56 | urlComponents.queryItems = [
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/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | private static func responseHandler<SucessType>(
76 | data: Data?,
77 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | error: Error?,
79 | completionHandler: (Result<SucessType>) -> Void
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
[11/13] Compiling IPData IP.swift
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:23: warning: static property 'urlSession' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| |- warning: static property 'urlSession' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'urlSession' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'urlSession' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:7:23: warning: static property 'apiKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
5 | public static var urlSession = URLSession.shared
6 |
7 | public static var apiKey: String?
| |- warning: static property 'apiKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiKey' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiKey' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 |
9 | private init() {
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | @discardableResult
13 | public static func lookup(
14 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | apiKey: String? = apiKey,
16 | ip: String = "",
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/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | ip: String = "",
17 | completionHandler: @escaping (Result<IP>) -> Void
18 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)")!
20 | urlComponents.queryItems = [
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/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | @discardableResult
31 | public static func carrier(
32 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | apiKey: String? = apiKey,
34 | ip: String,
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/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | ip: String,
35 | completionHandler: @escaping (Result<Carrier>) -> Void
36 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)/carrier")!
38 | urlComponents.queryItems = [
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/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | @discardableResult
49 | public static func lookup(
50 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | apiKey: String? = apiKey,
52 | bulk ips: [String],
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/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 | bulk ips: [String],
53 | completionHandler: @escaping (Result<[IP]>) -> Void
54 | ) -> URLSessionTask? {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | var urlComponents = URLComponents(string: "https://api.ipdata.co/bulk")!
56 | urlComponents.queryItems = [
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/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | private static func responseHandler<SucessType>(
76 | data: Data?,
77 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | error: Error?,
79 | completionHandler: (Result<SucessType>) -> Void
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/IPData.swift:23:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
21 | URLQueryItem(name: "api-key", value: apiKey)
22 | ]
23 | let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
24 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
25 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:41:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
39 | URLQueryItem(name: "api-key", value: apiKey)
40 | ]
41 | let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
42 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
43 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:59:23: error: cannot find 'URLRequest' in scope
57 | URLQueryItem(name: "api-key", value: apiKey)
58 | ]
59 | var request = URLRequest(url: urlComponents.url!)
| `- error: cannot find 'URLRequest' in scope
60 | do {
61 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/IPData/IPData.swift:64:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
62 | request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
63 | request.httpBody = try JSONSerialization.data(withJSONObject: ips)
64 | let task = urlSession.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
65 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
66 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:69:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
67 | task.resume()
68 | return task
69 | } catch {
| `- warning: 'catch' block is unreachable because no errors are thrown in 'do' block
70 | completionHandler(.failure(error))
71 | return nil
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
83 | return
84 | }
85 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
86 | completionHandler(.failure(IPDataError.unknown))
87 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return
84 | }
85 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | completionHandler(.failure(IPDataError.unknown))
87 | return
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/IPData.swift:89:62: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
87 | return
88 | }
89 | guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
90 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
91 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:90:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
88 | }
89 | guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
90 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 | return
92 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:104:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
102 | let message = json["message"] as? String
103 | {
104 | let error = IPDataError(statusCode: response.statusCode, message: message)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
105 | completionHandler(.failure(error))
106 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:111:93: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
109 | }
110 | default:
111 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
112 | }
113 | } catch {
[12/13] Compiling IPData IPData.swift
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:23: warning: static property 'urlSession' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| |- warning: static property 'urlSession' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'urlSession' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'urlSession' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:7:23: warning: static property 'apiKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
5 | public static var urlSession = URLSession.shared
6 |
7 | public static var apiKey: String?
| |- warning: static property 'apiKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiKey' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiKey' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
8 |
9 | private init() {
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | @discardableResult
13 | public static func lookup(
14 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | apiKey: String? = apiKey,
16 | ip: String = "",
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/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | ip: String = "",
17 | completionHandler: @escaping (Result<IP>) -> Void
18 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)")!
20 | urlComponents.queryItems = [
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/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | @discardableResult
31 | public static func carrier(
32 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | apiKey: String? = apiKey,
34 | ip: String,
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/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | ip: String,
35 | completionHandler: @escaping (Result<Carrier>) -> Void
36 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)/carrier")!
38 | urlComponents.queryItems = [
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/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | @discardableResult
49 | public static func lookup(
50 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | apiKey: String? = apiKey,
52 | bulk ips: [String],
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/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 | bulk ips: [String],
53 | completionHandler: @escaping (Result<[IP]>) -> Void
54 | ) -> URLSessionTask? {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | var urlComponents = URLComponents(string: "https://api.ipdata.co/bulk")!
56 | urlComponents.queryItems = [
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/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | private static func responseHandler<SucessType>(
76 | data: Data?,
77 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | error: Error?,
79 | completionHandler: (Result<SucessType>) -> Void
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/IPData.swift:23:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
21 | URLQueryItem(name: "api-key", value: apiKey)
22 | ]
23 | let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
24 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
25 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:41:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
39 | URLQueryItem(name: "api-key", value: apiKey)
40 | ]
41 | let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
42 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
43 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:59:23: error: cannot find 'URLRequest' in scope
57 | URLQueryItem(name: "api-key", value: apiKey)
58 | ]
59 | var request = URLRequest(url: urlComponents.url!)
| `- error: cannot find 'URLRequest' in scope
60 | do {
61 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/IPData/IPData.swift:64:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
62 | request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
63 | request.httpBody = try JSONSerialization.data(withJSONObject: ips)
64 | let task = urlSession.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
65 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
66 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:69:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
67 | task.resume()
68 | return task
69 | } catch {
| `- warning: 'catch' block is unreachable because no errors are thrown in 'do' block
70 | completionHandler(.failure(error))
71 | return nil
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
83 | return
84 | }
85 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
86 | completionHandler(.failure(IPDataError.unknown))
87 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return
84 | }
85 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | completionHandler(.failure(IPDataError.unknown))
87 | return
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/IPData.swift:89:62: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
87 | return
88 | }
89 | guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
90 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
91 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:90:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
88 | }
89 | guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
90 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 | return
92 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:104:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
102 | let message = json["message"] as? String
103 | {
104 | let error = IPDataError(statusCode: response.statusCode, message: message)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
105 | completionHandler(.failure(error))
106 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:111:93: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
109 | }
110 | default:
111 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
112 | }
113 | } catch {
[13/13] Compiling IPData Timezone.swift
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/11] Compiling IPData IPDataError.swift
/host/spi-builder-workspace/Sources/IPData/IPDataError.swift:41:36: error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
39 | return message
40 | case .invalidResponse(let statusCode):
41 | return HTTPURLResponse.localizedString(forStatusCode: statusCode)
| `- error: type 'HTTPURLResponse' (aka 'AnyObject') has no member 'localizedString'
42 | case .unknown:
43 | return "Unknown Error"
[3/12] Compiling IPData Result.swift
[4/12] Compiling IPData StatusCode.swift
[5/12] Compiling IPData Language.swift
[6/12] Compiling IPData Threat.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/12] Compiling IPData Carrier.swift
[8/12] Compiling IPData Currency.swift
[9/12] Emitting module IPData
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | @discardableResult
13 | public static func lookup(
14 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | apiKey: String? = apiKey,
16 | ip: String = "",
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/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | ip: String = "",
17 | completionHandler: @escaping (Result<IP>) -> Void
18 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)")!
20 | urlComponents.queryItems = [
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/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | @discardableResult
31 | public static func carrier(
32 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | apiKey: String? = apiKey,
34 | ip: String,
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/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | ip: String,
35 | completionHandler: @escaping (Result<Carrier>) -> Void
36 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)/carrier")!
38 | urlComponents.queryItems = [
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/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | @discardableResult
49 | public static func lookup(
50 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | apiKey: String? = apiKey,
52 | bulk ips: [String],
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/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 | bulk ips: [String],
53 | completionHandler: @escaping (Result<[IP]>) -> Void
54 | ) -> URLSessionTask? {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | var urlComponents = URLComponents(string: "https://api.ipdata.co/bulk")!
56 | urlComponents.queryItems = [
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/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | private static func responseHandler<SucessType>(
76 | data: Data?,
77 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | error: Error?,
79 | completionHandler: (Result<SucessType>) -> Void
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
[10/12] Compiling IPData IP.swift
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | @discardableResult
13 | public static func lookup(
14 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | apiKey: String? = apiKey,
16 | ip: String = "",
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/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | ip: String = "",
17 | completionHandler: @escaping (Result<IP>) -> Void
18 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)")!
20 | urlComponents.queryItems = [
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/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | @discardableResult
31 | public static func carrier(
32 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | apiKey: String? = apiKey,
34 | ip: String,
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/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | ip: String,
35 | completionHandler: @escaping (Result<Carrier>) -> Void
36 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)/carrier")!
38 | urlComponents.queryItems = [
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/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | @discardableResult
49 | public static func lookup(
50 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | apiKey: String? = apiKey,
52 | bulk ips: [String],
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/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 | bulk ips: [String],
53 | completionHandler: @escaping (Result<[IP]>) -> Void
54 | ) -> URLSessionTask? {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | var urlComponents = URLComponents(string: "https://api.ipdata.co/bulk")!
56 | urlComponents.queryItems = [
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/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | private static func responseHandler<SucessType>(
76 | data: Data?,
77 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | error: Error?,
79 | completionHandler: (Result<SucessType>) -> Void
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/IPData.swift:23:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
21 | URLQueryItem(name: "api-key", value: apiKey)
22 | ]
23 | let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
24 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
25 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:41:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
39 | URLQueryItem(name: "api-key", value: apiKey)
40 | ]
41 | let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
42 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
43 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:59:23: error: cannot find 'URLRequest' in scope
57 | URLQueryItem(name: "api-key", value: apiKey)
58 | ]
59 | var request = URLRequest(url: urlComponents.url!)
| `- error: cannot find 'URLRequest' in scope
60 | do {
61 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/IPData/IPData.swift:64:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
62 | request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
63 | request.httpBody = try JSONSerialization.data(withJSONObject: ips)
64 | let task = urlSession.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
65 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
66 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:69:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
67 | task.resume()
68 | return task
69 | } catch {
| `- warning: 'catch' block is unreachable because no errors are thrown in 'do' block
70 | completionHandler(.failure(error))
71 | return nil
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
83 | return
84 | }
85 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
86 | completionHandler(.failure(IPDataError.unknown))
87 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return
84 | }
85 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | completionHandler(.failure(IPDataError.unknown))
87 | return
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/IPData.swift:89:62: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
87 | return
88 | }
89 | guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
90 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
91 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:90:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
88 | }
89 | guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
90 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 | return
92 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:104:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
102 | let message = json["message"] as? String
103 | {
104 | let error = IPDataError(statusCode: response.statusCode, message: message)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
105 | completionHandler(.failure(error))
106 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:111:93: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
109 | }
110 | default:
111 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
112 | }
113 | } catch {
[11/12] Compiling IPData IPData.swift
/host/spi-builder-workspace/Sources/IPData/IPData.swift:5:47: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
3 | public class IPData {
4 |
5 | public static var urlSession = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
6 |
7 | public static var apiKey: String?
/host/spi-builder-workspace/Sources/IPData/IPData.swift:14:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
12 | @discardableResult
13 | public static func lookup(
14 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
15 | apiKey: String? = apiKey,
16 | ip: String = "",
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/IPData.swift:18:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
16 | ip: String = "",
17 | completionHandler: @escaping (Result<IP>) -> Void
18 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
19 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)")!
20 | urlComponents.queryItems = [
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/IPData/IPData.swift:32:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
30 | @discardableResult
31 | public static func carrier(
32 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
33 | apiKey: String? = apiKey,
34 | ip: String,
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/IPData.swift:36:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 | ip: String,
35 | completionHandler: @escaping (Result<Carrier>) -> Void
36 | ) -> URLSessionTask {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
37 | var urlComponents = URLComponents(string: "https://api.ipdata.co/\(ip)/carrier")!
38 | urlComponents.queryItems = [
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/IPData/IPData.swift:50:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
48 | @discardableResult
49 | public static func lookup(
50 | urlSession: URLSession = urlSession,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
51 | apiKey: String? = apiKey,
52 | bulk ips: [String],
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/IPData.swift:54:14: error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
52 | bulk ips: [String],
53 | completionHandler: @escaping (Result<[IP]>) -> Void
54 | ) -> URLSessionTask? {
| `- error: 'URLSessionTask' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
55 | var urlComponents = URLComponents(string: "https://api.ipdata.co/bulk")!
56 | urlComponents.queryItems = [
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/IPData/IPData.swift:77:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
75 | private static func responseHandler<SucessType>(
76 | data: Data?,
77 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
78 | error: Error?,
79 | completionHandler: (Result<SucessType>) -> Void
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/IPData.swift:23:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
21 | URLQueryItem(name: "api-key", value: apiKey)
22 | ]
23 | let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
24 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
25 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:41:31: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
39 | URLQueryItem(name: "api-key", value: apiKey)
40 | ]
41 | let task = urlSession.dataTask(with: urlComponents.url!) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
42 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
43 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:59:23: error: cannot find 'URLRequest' in scope
57 | URLQueryItem(name: "api-key", value: apiKey)
58 | ]
59 | var request = URLRequest(url: urlComponents.url!)
| `- error: cannot find 'URLRequest' in scope
60 | do {
61 | request.httpMethod = "POST"
/host/spi-builder-workspace/Sources/IPData/IPData.swift:64:35: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
62 | request.setValue("application/json; charset=utf-8", forHTTPHeaderField: "Content-Type")
63 | request.httpBody = try JSONSerialization.data(withJSONObject: ips)
64 | let task = urlSession.dataTask(with: request) { data, response, error in
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
65 | responseHandler(data: data, response: response, error: error, completionHandler: completionHandler)
66 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:69:11: warning: 'catch' block is unreachable because no errors are thrown in 'do' block
67 | task.resume()
68 | return task
69 | } catch {
| `- warning: 'catch' block is unreachable because no errors are thrown in 'do' block
70 | completionHandler(.failure(error))
71 | return nil
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85:39: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
83 | return
84 | }
85 | guard let response = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
86 | completionHandler(.failure(IPDataError.unknown))
87 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:85:43: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
83 | return
84 | }
85 | guard let response = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
86 | completionHandler(.failure(IPDataError.unknown))
87 | return
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/IPData.swift:89:62: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
87 | return
88 | }
89 | guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
90 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
91 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:90:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
88 | }
89 | guard let statusCode = StatusCode(rawValue: response.statusCode), let data = data else {
90 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
91 | return
92 | }
/host/spi-builder-workspace/Sources/IPData/IPData.swift:104:66: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
102 | let message = json["message"] as? String
103 | {
104 | let error = IPDataError(statusCode: response.statusCode, message: message)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
105 | completionHandler(.failure(error))
106 | return
/host/spi-builder-workspace/Sources/IPData/IPData.swift:111:93: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
109 | }
110 | default:
111 | completionHandler(.failure(IPDataError.invalidResponse(statusCode: response.statusCode)))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
112 | }
113 | } catch {
[12/12] Compiling IPData Timezone.swift
BUILD FAILURE 6.1 wasm