Build Information
Failed to build WealthsimpleDownloader, reference main (27247f
), with Swift 6.1 for Wasm on 4 Jun 2025 10:25:18 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Nef10/WealthsimpleDownloader.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/Nef10/WealthsimpleDownloader
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 27247fb Add non cash distribution transaction type
Cloned https://github.com/Nef10/WealthsimpleDownloader.git
Revision (git rev-parse @):
27247fbbbc8bb62bb8cfad66bec9b3a38806bac4
SUCCESS checkout https://github.com/Nef10/WealthsimpleDownloader.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/Nef10/WealthsimpleDownloader.git
https://github.com/Nef10/WealthsimpleDownloader.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
],
"manifest_display_name" : "WealthsimpleDownloader",
"name" : "WealthsimpleDownloader",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "Wealthsimple",
"targets" : [
"Wealthsimple"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "WealthsimpleTests",
"module_type" : "SwiftTarget",
"name" : "WealthsimpleTests",
"path" : "Tests/WealthsimpleTests",
"sources" : [
"Extensions/StringCamelCaseTests.swift",
"WealthsimpleDownloaderTests.swift"
],
"target_dependencies" : [
"Wealthsimple"
],
"type" : "test"
},
{
"c99name" : "Wealthsimple",
"module_type" : "SwiftTarget",
"name" : "Wealthsimple",
"path" : "Sources/Wealthsimple",
"product_memberships" : [
"Wealthsimple"
],
"sources" : [
"Extensions/String+CamelCase.swift",
"Token.swift",
"TransactionError.swift",
"WealthsimpleAccount.swift",
"WealthsimpleAsset.swift",
"WealthsimpleDownloader.swift",
"WealthsimplePosition.swift",
"WealthsimpleTransaction.swift"
],
"type" : "library"
}
],
"tools_version" : "5.2"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/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/10] Compiling Wealthsimple WealthsimpleAccount.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:22:10: warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
20 | case invalidJson(error: String)
21 | /// When the received JSON does not have the right type
22 | case invalidJsonType(json: Any)
| `- warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:24:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
22 | case invalidJsonType(json: Any)
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
25 | /// When the received JSON does have an unexpected value
26 | case invalidResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:26:10: warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 | case missingResultParamenter(json: [String: Any])
25 | /// When the received JSON does have an unexpected value
26 | case invalidResultParamenter(json: [String: Any])
| `- warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
27 | /// An error with the token occured
28 | case tokenError(_ error: TokenError)
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:116:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Account], AccountError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | guard let data else {
118 | if let error {
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/Wealthsimple/WealthsimpleAccount.swift:100:23: error: cannot find 'URLRequest' in scope
98 |
99 | static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
100 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
101 | let session = URLSession.shared
102 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:101:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
99 | static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
100 | var request = URLRequest(url: url)
101 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
102 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
103 | token.authenticateRequest(request) {
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:125:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
123 | return
124 | }
125 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
126 | completion(.failure(AccountError.httpError(error: "No HTTPURLResponse")))
127 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:125:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
123 | return
124 | }
125 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 | completion(.failure(AccountError.httpError(error: "No HTTPURLResponse")))
127 | 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/Wealthsimple/WealthsimpleAccount.swift:129:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
127 | return
128 | }
129 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
130 | completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
131 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:130:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
128 | }
129 | guard httpResponse.statusCode == 200 else {
130 | completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
131 | return
132 | }
[4/10] Compiling Wealthsimple WealthsimplePosition.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:22:10: warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
20 | case invalidJson(error: String)
21 | /// When the received JSON does not have the right type
22 | case invalidJsonType(json: Any)
| `- warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:24:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
22 | case invalidJsonType(json: Any)
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
25 | /// When the received JSON does have an unexpected value
26 | case invalidResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:26:10: warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 | case missingResultParamenter(json: [String: Any])
25 | /// When the received JSON does have an unexpected value
26 | case invalidResultParamenter(json: [String: Any])
| `- warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
27 | /// An error with the assets occured
28 | case assetError(_ error: AssetError)
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:53:24: warning: static property 'dateFormatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
51 | private static let baseUrl = URLComponents(string: "https://api.production.wealthsimple.com/v1/positions")!
52 |
53 | private static var dateFormatter: DateFormatter = {
| |- warning: static property 'dateFormatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'dateFormatter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'dateFormatter' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
54 | var dateFormatter = DateFormatter()
55 | dateFormatter.dateFormat = "yyyy-MM-dd"
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:119:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | }
118 |
119 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | guard let data else {
121 | if let error {
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/Wealthsimple/WealthsimplePosition.swift:103:23: error: cannot find 'URLRequest' in scope
101 | url.queryItems?.append(URLQueryItem(name: "date", value: dateFormatter.string(from: date)))
102 | }
103 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
104 | let session = URLSession.shared
105 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:104:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
102 | }
103 | var request = URLRequest(url: url.url!)
104 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
105 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
106 | token.authenticateRequest(request) {
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:128:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
126 | return
127 | }
128 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
129 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
130 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:128:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 | return
127 | }
128 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
130 | 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/Wealthsimple/WealthsimplePosition.swift:132:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
130 | return
131 | }
132 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
133 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
134 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:133:92: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
131 | }
132 | guard httpResponse.statusCode == 200 else {
133 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
134 | return
135 | }
[5/11] Compiling Wealthsimple WealthsimpleAsset.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAsset.swift:13:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'AssetError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
11 | public enum AssetError: Error {
12 | /// When the received JSON does not have all expected values
13 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'AssetError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
14 | /// When the received JSON does have an unexpected value
15 | case invalidResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAsset.swift:15:10: warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'AssetError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
13 | case missingResultParamenter(json: [String: Any])
14 | /// When the received JSON does have an unexpected value
15 | case invalidResultParamenter(json: [String: Any])
| `- warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'AssetError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
16 | }
17 |
[6/11] Compiling Wealthsimple TransactionError.swift
/host/spi-builder-workspace/Sources/Wealthsimple/TransactionError.swift:19:10: warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
17 | case invalidJson(error: String)
18 | /// When the received JSON does not have the right type
19 | case invalidJsonType(json: Any)
| `- warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
20 | /// When the received JSON does not have all expected values
21 | case missingResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/TransactionError.swift:21:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
19 | case invalidJsonType(json: Any)
20 | /// When the received JSON does not have all expected values
21 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
22 | /// When the received JSON does have an unexpected value
23 | case invalidResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/TransactionError.swift:23:10: warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
21 | case missingResultParamenter(json: [String: Any])
22 | /// When the received JSON does have an unexpected value
23 | case invalidResultParamenter(json: [String: Any])
| `- warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 | /// An error with the token occured
25 | case tokenError(_ error: TokenError)
[7/11] Compiling Wealthsimple WealthsimpleDownloader.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[8/11] Emitting module Wealthsimple
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:20:10: warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'TokenError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
18 | case invalidJson(error: String)
19 | /// When the received JSON does not have the right type
20 | case invalidJsonType(json: Any)
| `- warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'TokenError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
21 | /// When the paramters could not be converted to JSON
22 | case invalidParameters(parameters: [String: String])
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:24:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'TokenError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
22 | case invalidParameters(parameters: [String: String])
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'TokenError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
25 | /// When an HTTP error occurs
26 | case httpError(error: String)
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:37:24: warning: static property 'url' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | private static let credentialStorageKeyExpiry = "expiry"
36 |
37 | private static var url = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token")!
| |- warning: static property 'url' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'url' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'url' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 | private static var testUrl = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token/info")!
39 | private static var clientId = "4da53ac2b03225bed1550eba8e4611e086c7b905a3855e6ed12ea08c246758fa" // From the website
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:38:24: warning: static property 'testUrl' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
36 |
37 | private static var url = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token")!
38 | private static var testUrl = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token/info")!
| |- warning: static property 'testUrl' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'testUrl' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'testUrl' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
39 | private static var clientId = "4da53ac2b03225bed1550eba8e4611e086c7b905a3855e6ed12ea08c246758fa" // From the website
40 | private static var scope = "invest.read mfda.read mercer.read trade.read" // the clientId supports some write scopes, but as this library only reads we limit it for safety
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:39:24: warning: static property 'clientId' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
37 | private static var url = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token")!
38 | private static var testUrl = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token/info")!
39 | private static var clientId = "4da53ac2b03225bed1550eba8e4611e086c7b905a3855e6ed12ea08c246758fa" // From the website
| |- warning: static property 'clientId' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'clientId' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'clientId' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
40 | private static var scope = "invest.read mfda.read mercer.read trade.read" // the clientId supports some write scopes, but as this library only reads we limit it for safety
41 |
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:40:24: warning: static property 'scope' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
38 | private static var testUrl = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token/info")!
39 | private static var clientId = "4da53ac2b03225bed1550eba8e4611e086c7b905a3855e6ed12ea08c246758fa" // From the website
40 | private static var scope = "invest.read mfda.read mercer.read trade.read" // the clientId supports some write scopes, but as this library only reads we limit it for safety
| |- warning: static property 'scope' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'scope' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'scope' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
41 |
42 | private let accessToken: String
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:108:29: error: cannot find type 'URLRequest' in scope
106 | private static func sendTokenRequest(
107 | parameters json: [String: String],
108 | request urlRequest: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
109 | credentialStorage: CredentialStorage,
110 | completion: @escaping (Result<Self, TokenError>) -> Void
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:128:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 | private static func handleTokenResponse(
127 | data: Data?,
128 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 | error: Error?,
130 | credentialStorage: CredentialStorage,
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/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/TransactionError.swift:19:10: warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
17 | case invalidJson(error: String)
18 | /// When the received JSON does not have the right type
19 | case invalidJsonType(json: Any)
| `- warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
20 | /// When the received JSON does not have all expected values
21 | case missingResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/TransactionError.swift:21:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
19 | case invalidJsonType(json: Any)
20 | /// When the received JSON does not have all expected values
21 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
22 | /// When the received JSON does have an unexpected value
23 | case invalidResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/TransactionError.swift:23:10: warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
21 | case missingResultParamenter(json: [String: Any])
22 | /// When the received JSON does have an unexpected value
23 | case invalidResultParamenter(json: [String: Any])
| `- warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 | /// An error with the token occured
25 | case tokenError(_ error: TokenError)
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:22:10: warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
20 | case invalidJson(error: String)
21 | /// When the received JSON does not have the right type
22 | case invalidJsonType(json: Any)
| `- warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:24:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
22 | case invalidJsonType(json: Any)
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
25 | /// When the received JSON does have an unexpected value
26 | case invalidResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:26:10: warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 | case missingResultParamenter(json: [String: Any])
25 | /// When the received JSON does have an unexpected value
26 | case invalidResultParamenter(json: [String: Any])
| `- warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'AccountError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
27 | /// An error with the token occured
28 | case tokenError(_ error: TokenError)
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:116:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Account], AccountError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | guard let data else {
118 | if let error {
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/Wealthsimple/WealthsimpleAsset.swift:13:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'AssetError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
11 | public enum AssetError: Error {
12 | /// When the received JSON does not have all expected values
13 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'AssetError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
14 | /// When the received JSON does have an unexpected value
15 | case invalidResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAsset.swift:15:10: warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'AssetError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
13 | case missingResultParamenter(json: [String: Any])
14 | /// When the received JSON does have an unexpected value
15 | case invalidResultParamenter(json: [String: Any])
| `- warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'AssetError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
16 | }
17 |
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:22:10: warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
20 | case invalidJson(error: String)
21 | /// When the received JSON does not have the right type
22 | case invalidJsonType(json: Any)
| `- warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:24:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
22 | case invalidJsonType(json: Any)
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
25 | /// When the received JSON does have an unexpected value
26 | case invalidResultParamenter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:26:10: warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
24 | case missingResultParamenter(json: [String: Any])
25 | /// When the received JSON does have an unexpected value
26 | case invalidResultParamenter(json: [String: Any])
| `- warning: associated value 'invalidResultParamenter(json:)' of 'Sendable'-conforming enum 'PositionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
27 | /// An error with the assets occured
28 | case assetError(_ error: AssetError)
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:53:24: warning: static property 'dateFormatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
51 | private static let baseUrl = URLComponents(string: "https://api.production.wealthsimple.com/v1/positions")!
52 |
53 | private static var dateFormatter: DateFormatter = {
| |- warning: static property 'dateFormatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'dateFormatter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'dateFormatter' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
54 | var dateFormatter = DateFormatter()
55 | dateFormatter.dateFormat = "yyyy-MM-dd"
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:119:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | }
118 |
119 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | guard let data else {
121 | if let error {
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/Wealthsimple/WealthsimpleTransaction.swift:129:24: warning: static property 'dateFormatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
127 | private static let baseUrl = URLComponents(string: "https://api.production.wealthsimple.com/v1/transactions")!
128 |
129 | private static var dateFormatter: DateFormatter = {
| |- warning: static property 'dateFormatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'dateFormatter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'dateFormatter' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
130 | var dateFormatter = DateFormatter()
131 | dateFormatter.dateFormat = "yyyy-MM-dd"
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:225:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
223 | }
224 |
225 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Transaction], TransactionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
226 | guard let data else {
227 | if let error {
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
[9/11] Compiling Wealthsimple Token.swift
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:20:10: warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'TokenError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
18 | case invalidJson(error: String)
19 | /// When the received JSON does not have the right type
20 | case invalidJsonType(json: Any)
| `- warning: associated value 'invalidJsonType(json:)' of 'Sendable'-conforming enum 'TokenError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
21 | /// When the paramters could not be converted to JSON
22 | case invalidParameters(parameters: [String: String])
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:24:10: warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'TokenError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
22 | case invalidParameters(parameters: [String: String])
23 | /// When the received JSON does not have all expected values
24 | case missingResultParamenter(json: [String: Any])
| `- warning: associated value 'missingResultParamenter(json:)' of 'Sendable'-conforming enum 'TokenError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
25 | /// When an HTTP error occurs
26 | case httpError(error: String)
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:37:24: warning: static property 'url' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
35 | private static let credentialStorageKeyExpiry = "expiry"
36 |
37 | private static var url = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token")!
| |- warning: static property 'url' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'url' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'url' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
38 | private static var testUrl = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token/info")!
39 | private static var clientId = "4da53ac2b03225bed1550eba8e4611e086c7b905a3855e6ed12ea08c246758fa" // From the website
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:38:24: warning: static property 'testUrl' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
36 |
37 | private static var url = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token")!
38 | private static var testUrl = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token/info")!
| |- warning: static property 'testUrl' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'testUrl' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'testUrl' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
39 | private static var clientId = "4da53ac2b03225bed1550eba8e4611e086c7b905a3855e6ed12ea08c246758fa" // From the website
40 | private static var scope = "invest.read mfda.read mercer.read trade.read" // the clientId supports some write scopes, but as this library only reads we limit it for safety
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:39:24: warning: static property 'clientId' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
37 | private static var url = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token")!
38 | private static var testUrl = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token/info")!
39 | private static var clientId = "4da53ac2b03225bed1550eba8e4611e086c7b905a3855e6ed12ea08c246758fa" // From the website
| |- warning: static property 'clientId' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'clientId' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'clientId' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
40 | private static var scope = "invest.read mfda.read mercer.read trade.read" // the clientId supports some write scopes, but as this library only reads we limit it for safety
41 |
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:40:24: warning: static property 'scope' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
38 | private static var testUrl = URL(string: "https://api.production.wealthsimple.com/v1/oauth/token/info")!
39 | private static var clientId = "4da53ac2b03225bed1550eba8e4611e086c7b905a3855e6ed12ea08c246758fa" // From the website
40 | private static var scope = "invest.read mfda.read mercer.read trade.read" // the clientId supports some write scopes, but as this library only reads we limit it for safety
| |- warning: static property 'scope' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'scope' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'scope' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
41 |
42 | private let accessToken: String
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:108:29: error: cannot find type 'URLRequest' in scope
106 | private static func sendTokenRequest(
107 | parameters json: [String: String],
108 | request urlRequest: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
109 | credentialStorage: CredentialStorage,
110 | completion: @escaping (Result<Self, TokenError>) -> Void
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:128:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 | private static func handleTokenResponse(
127 | data: Data?,
128 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 | error: Error?,
130 | credentialStorage: CredentialStorage,
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/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:69:23: error: cannot find 'URLRequest' in scope
67 |
68 | static func getToken(username: String, password: String, otp: String, credentialStorage: CredentialStorage, completion: @escaping (Result<Self, TokenError>) -> Void) {
69 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
70 | request.setValue(otp, forHTTPHeaderField: "x-wealthsimple-otp")
71 | let json = [
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:113:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
111 | ) {
112 | var request = urlRequest
113 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
114 | request.httpMethod = "POST"
115 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:141:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
139 | return
140 | }
141 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
142 | completion(.failure(TokenError.httpError(error: "No HTTPURLResponse")))
143 | return
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:141:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 | return
140 | }
141 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | completion(.failure(TokenError.httpError(error: "No HTTPURLResponse")))
143 | 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/Wealthsimple/Token.swift:145:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
143 | return
144 | }
145 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
146 | completion(.failure(TokenError.httpError(error: "Status code \(httpResponse.statusCode)")))
147 | return
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:146:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
144 | }
145 | guard httpResponse.statusCode == 200 else {
146 | completion(.failure(TokenError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
147 | return
148 | }
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:170:23: error: cannot find 'URLRequest' in scope
168 |
169 | private func testIfValid(completion: @escaping (Bool) -> Void) {
170 | var request = URLRequest(url: Self.testUrl)
| `- error: cannot find 'URLRequest' in scope
171 | let session = URLSession.shared
172 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:171:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
169 | private func testIfValid(completion: @escaping (Bool) -> Void) {
170 | var request = URLRequest(url: Self.testUrl)
171 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
172 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
173 | authenticateRequest(request) {
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:197:21: error: cannot infer contextual base in reference to member 'success'
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
197 | completion(.success(requestCopy))
| `- error: cannot infer contextual base in reference to member 'success'
198 | }
199 |
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:213:23: error: cannot find 'URLRequest' in scope
211 |
212 | private func refresh(completion: @escaping (Result<Self, TokenError>) -> Void) {
213 | let request = URLRequest(url: Self.url)
| `- error: cannot find 'URLRequest' in scope
214 | let json = [
215 | "grant_type": "refresh_token",
[10/11] Compiling Wealthsimple String+CamelCase.swift
[11/11] Compiling Wealthsimple WealthsimpleTransaction.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:129:24: warning: static property 'dateFormatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
127 | private static let baseUrl = URLComponents(string: "https://api.production.wealthsimple.com/v1/transactions")!
128 |
129 | private static var dateFormatter: DateFormatter = {
| |- warning: static property 'dateFormatter' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'dateFormatter' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'dateFormatter' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
130 | var dateFormatter = DateFormatter()
131 | dateFormatter.dateFormat = "yyyy-MM-dd"
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:225:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
223 | }
224 |
225 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Transaction], TransactionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
226 | guard let data else {
227 | if let error {
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/Wealthsimple/WealthsimpleTransaction.swift:209:23: error: cannot find 'URLRequest' in scope
207 | }
208 | url.queryItems?.append(URLQueryItem(name: "effective_date_end", value: dateFormatter.string(from: Calendar.current.date(byAdding: .day, value: 7, to: Date())!)))
209 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
210 | let session = URLSession.shared
211 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:210:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
208 | url.queryItems?.append(URLQueryItem(name: "effective_date_end", value: dateFormatter.string(from: Calendar.current.date(byAdding: .day, value: 7, to: Date())!)))
209 | var request = URLRequest(url: url.url!)
210 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
211 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
212 | token.authenticateRequest(request) {
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:234:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
232 | return
233 | }
234 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
235 | completion(.failure(TransactionError.httpError(error: "No HTTPURLResponse")))
236 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:234:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
232 | return
233 | }
234 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | completion(.failure(TransactionError.httpError(error: "No HTTPURLResponse")))
236 | 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/Wealthsimple/WealthsimpleTransaction.swift:238:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
236 | return
237 | }
238 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
239 | completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
240 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:239:95: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
237 | }
238 | guard httpResponse.statusCode == 200 else {
239 | completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
240 | return
241 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/9] Compiling Wealthsimple WealthsimplePosition.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:119:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | }
118 |
119 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | guard let data else {
121 | if let error {
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/Wealthsimple/WealthsimplePosition.swift:103:23: error: cannot find 'URLRequest' in scope
101 | url.queryItems?.append(URLQueryItem(name: "date", value: dateFormatter.string(from: date)))
102 | }
103 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
104 | let session = URLSession.shared
105 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:104:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
102 | }
103 | var request = URLRequest(url: url.url!)
104 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
105 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
106 | token.authenticateRequest(request) {
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:128:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
126 | return
127 | }
128 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
129 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
130 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:128:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 | return
127 | }
128 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
130 | 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/Wealthsimple/WealthsimplePosition.swift:132:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
130 | return
131 | }
132 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
133 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
134 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:133:92: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
131 | }
132 | guard httpResponse.statusCode == 200 else {
133 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
134 | return
135 | }
[3/10] Compiling Wealthsimple WealthsimpleAccount.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:116:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Account], AccountError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | guard let data else {
118 | if let error {
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/Wealthsimple/WealthsimpleAccount.swift:100:23: error: cannot find 'URLRequest' in scope
98 |
99 | static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
100 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
101 | let session = URLSession.shared
102 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:101:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
99 | static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
100 | var request = URLRequest(url: url)
101 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
102 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
103 | token.authenticateRequest(request) {
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:125:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
123 | return
124 | }
125 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
126 | completion(.failure(AccountError.httpError(error: "No HTTPURLResponse")))
127 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:125:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
123 | return
124 | }
125 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 | completion(.failure(AccountError.httpError(error: "No HTTPURLResponse")))
127 | 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/Wealthsimple/WealthsimpleAccount.swift:129:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
127 | return
128 | }
129 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
130 | completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
131 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:130:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
128 | }
129 | guard httpResponse.statusCode == 200 else {
130 | completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
131 | return
132 | }
[4/10] Compiling Wealthsimple String+CamelCase.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/10] Compiling Wealthsimple TransactionError.swift
[6/10] Compiling Wealthsimple Token.swift
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:108:29: error: cannot find type 'URLRequest' in scope
106 | private static func sendTokenRequest(
107 | parameters json: [String: String],
108 | request urlRequest: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
109 | credentialStorage: CredentialStorage,
110 | completion: @escaping (Result<Self, TokenError>) -> Void
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:128:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 | private static func handleTokenResponse(
127 | data: Data?,
128 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 | error: Error?,
130 | credentialStorage: CredentialStorage,
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/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:69:23: error: cannot find 'URLRequest' in scope
67 |
68 | static func getToken(username: String, password: String, otp: String, credentialStorage: CredentialStorage, completion: @escaping (Result<Self, TokenError>) -> Void) {
69 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
70 | request.setValue(otp, forHTTPHeaderField: "x-wealthsimple-otp")
71 | let json = [
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:113:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
111 | ) {
112 | var request = urlRequest
113 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
114 | request.httpMethod = "POST"
115 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:141:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
139 | return
140 | }
141 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
142 | completion(.failure(TokenError.httpError(error: "No HTTPURLResponse")))
143 | return
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:141:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
139 | return
140 | }
141 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
142 | completion(.failure(TokenError.httpError(error: "No HTTPURLResponse")))
143 | 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/Wealthsimple/Token.swift:145:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
143 | return
144 | }
145 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
146 | completion(.failure(TokenError.httpError(error: "Status code \(httpResponse.statusCode)")))
147 | return
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:146:89: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
144 | }
145 | guard httpResponse.statusCode == 200 else {
146 | completion(.failure(TokenError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
147 | return
148 | }
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:170:23: error: cannot find 'URLRequest' in scope
168 |
169 | private func testIfValid(completion: @escaping (Bool) -> Void) {
170 | var request = URLRequest(url: Self.testUrl)
| `- error: cannot find 'URLRequest' in scope
171 | let session = URLSession.shared
172 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:171:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
169 | private func testIfValid(completion: @escaping (Bool) -> Void) {
170 | var request = URLRequest(url: Self.testUrl)
171 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
172 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
173 | authenticateRequest(request) {
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:197:21: error: cannot infer contextual base in reference to member 'success'
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
197 | completion(.success(requestCopy))
| `- error: cannot infer contextual base in reference to member 'success'
198 | }
199 |
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:213:23: error: cannot find 'URLRequest' in scope
211 |
212 | private func refresh(completion: @escaping (Result<Self, TokenError>) -> Void) {
213 | let request = URLRequest(url: Self.url)
| `- error: cannot find 'URLRequest' in scope
214 | let json = [
215 | "grant_type": "refresh_token",
[7/10] Emitting module Wealthsimple
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:108:29: error: cannot find type 'URLRequest' in scope
106 | private static func sendTokenRequest(
107 | parameters json: [String: String],
108 | request urlRequest: URLRequest,
| `- error: cannot find type 'URLRequest' in scope
109 | credentialStorage: CredentialStorage,
110 | completion: @escaping (Result<Self, TokenError>) -> Void
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:128:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 | private static func handleTokenResponse(
127 | data: Data?,
128 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 | error: Error?,
130 | credentialStorage: CredentialStorage,
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/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:116:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 | }
115 |
116 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Account], AccountError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | guard let data else {
118 | if let error {
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/Wealthsimple/WealthsimplePosition.swift:119:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | }
118 |
119 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | guard let data else {
121 | if let error {
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/Wealthsimple/WealthsimpleTransaction.swift:225:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
223 | }
224 |
225 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Transaction], TransactionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
226 | guard let data else {
227 | if let error {
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
[8/10] Compiling Wealthsimple WealthsimpleAsset.swift
[9/10] Compiling Wealthsimple WealthsimpleDownloader.swift
[10/10] Compiling Wealthsimple WealthsimpleTransaction.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:225:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
223 | }
224 |
225 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Transaction], TransactionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
226 | guard let data else {
227 | if let error {
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/Wealthsimple/WealthsimpleTransaction.swift:209:23: error: cannot find 'URLRequest' in scope
207 | }
208 | url.queryItems?.append(URLQueryItem(name: "effective_date_end", value: dateFormatter.string(from: Calendar.current.date(byAdding: .day, value: 7, to: Date())!)))
209 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
210 | let session = URLSession.shared
211 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:210:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
208 | url.queryItems?.append(URLQueryItem(name: "effective_date_end", value: dateFormatter.string(from: Calendar.current.date(byAdding: .day, value: 7, to: Date())!)))
209 | var request = URLRequest(url: url.url!)
210 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
211 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
212 | token.authenticateRequest(request) {
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 | }
193 |
194 | func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
195 | var requestCopy = request
196 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:234:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
232 | return
233 | }
234 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
235 | completion(.failure(TransactionError.httpError(error: "No HTTPURLResponse")))
236 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:234:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
232 | return
233 | }
234 | guard let httpResponse = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 | completion(.failure(TransactionError.httpError(error: "No HTTPURLResponse")))
236 | 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/Wealthsimple/WealthsimpleTransaction.swift:238:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
236 | return
237 | }
238 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
239 | completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
240 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:239:95: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
237 | }
238 | guard httpResponse.statusCode == 200 else {
239 | completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
240 | return
241 | }
BUILD FAILURE 6.1 wasm