Build Information
Failed to build WealthsimpleDownloader, reference main (9ebe39), with Swift 6.3 for Wasm on 23 Apr 2026 18:52:59 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.70.0
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 9ebe396 Bump release-drafter from 7.1.1 to 7.2.0 (#298)
Cloned https://github.com/Nef10/WealthsimpleDownloader.git
Revision (git rev-parse @):
9ebe3966d9315b341dfd5bb163aef1fe7fe5b217
SUCCESS checkout https://github.com/Nef10/WealthsimpleDownloader.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.3
Building package at path: $PWD
https://github.com/Nef10/WealthsimpleDownloader.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3-RELEASE_wasm 2>&1
wasm-6.3-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:d69f4e7582c319245442d62a08b2d7c7fd5a0c0c69f5d2ef11d1530cd8d3329b
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.3-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/11] Compiling Wealthsimple WealthsimpleDownloader.swift
[4/11] Compiling Wealthsimple WealthsimpleAsset.swift
[5/11] Compiling Wealthsimple WealthsimpleAccount.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:109:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | }
108 |
109 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: (Result<[Account], AccountError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | guard let data else {
111 | 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:98:23: error: cannot find 'URLRequest' in scope
96 |
97 | static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
98 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
99 | let session = URLSession.shared
100 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:99:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
97 | static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
98 | var request = URLRequest(url: url)
99 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
100 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
101 | token.authenticateRequest(request) { request in
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:66: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:118:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
116 | return
117 | }
118 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
119 | completion(.failure(AccountError.httpError(error: "No HTTPURLResponse")))
120 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:118:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
116 | return
117 | }
118 | 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.
119 | completion(.failure(AccountError.httpError(error: "No HTTPURLResponse")))
120 | 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:122:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
120 | return
121 | }
122 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
123 | completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
124 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:123:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
121 | }
122 | guard httpResponse.statusCode == 200 else {
123 | completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
124 | return
125 | }
[6/11] Compiling Wealthsimple URLConfiguration.swift
/host/spi-builder-workspace/Sources/Wealthsimple/URLConfiguration.swift:77:33: error: cannot find type 'URLRequest' in scope
75 | /// Create a URLRequest object for GraphQL URL
76 | /// - Returns: A URLRequest, or nil if the URL is invalid
77 | func graphQLURLRequest() -> URLRequest? {
| `- error: cannot find type 'URLRequest' in scope
78 | let url = URL(string: graphQL)
79 | guard let url else {
/host/spi-builder-workspace/Sources/Wealthsimple/URLConfiguration.swift:82:23: error: cannot find 'URLRequest' in scope
80 | return nil
81 | }
82 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
83 | request.httpMethod = "POST"
84 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
[7/11] Compiling Wealthsimple WealthsimplePosition.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:183:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | }
182 |
183 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | guard let data else {
185 | 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:205:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
203 | private static func handleCreditCardResponse(
204 | data: Data?,
205 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
206 | error: Error?,
207 | account: Account,
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:148:23: error: cannot find 'URLRequest' in scope
146 | url.queryItems?.append(URLQueryItem(name: "date", value: dateFormatter.string(from: date)))
147 | }
148 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
149 | let session = URLSession.shared
150 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:149:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
147 | }
148 | var request = URLRequest(url: url.url!)
149 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
150 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
151 | token.authenticateRequest(request) { request in
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:66: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/URLConfiguration.swift:77:33: error: cannot find type 'URLRequest' in scope
75 | /// Create a URLRequest object for GraphQL URL
76 | /// - Returns: A URLRequest, or nil if the URL is invalid
77 | func graphQLURLRequest() -> URLRequest? {
| `- error: cannot find type 'URLRequest' in scope
78 | let url = URL(string: graphQL)
79 | guard let url else {
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:174:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
172 | }
173 | request.httpBody = jsonData
174 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
175 | token.authenticateRequest(request) { request in
176 | let task = session.dataTask(with: request) { data, response, error in
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:192:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
190 | return
191 | }
192 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
193 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
194 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:192:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 | return
191 | }
192 | 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.
193 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
194 | 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:196:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
194 | return
195 | }
196 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
197 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
198 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:197:92: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
195 | }
196 | guard httpResponse.statusCode == 200 else {
197 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
198 | return
199 | }
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:218:43: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
216 | return
217 | }
218 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
219 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
220 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:218:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
216 | return
217 | }
218 | 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.
219 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
220 | 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:222:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
220 | return
221 | }
222 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
223 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
224 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimplePosition.swift:223:92: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
221 | }
222 | guard httpResponse.statusCode == 200 else {
223 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
224 | return
225 | }
[8/12] Compiling Wealthsimple Transaction.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/12] Compiling Wealthsimple String+CamelCase.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:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:66: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(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:166:23: error: cannot find 'URLRequest' in scope
164 |
165 | private func testIfValid(completion: @escaping (Bool) -> Void) {
166 | var request = URLRequest(url: Self.testUrl)
| `- error: cannot find 'URLRequest' in scope
167 | let session = URLSession.shared
168 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:167:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
165 | private func testIfValid(completion: @escaping (Bool) -> Void) {
166 | var request = URLRequest(url: Self.testUrl)
167 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
168 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
169 | authenticateRequest(request) { request in
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:179:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
177 | return
178 | }
179 | completion(httpResponse.statusCode == 200)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
180 | }
181 | task.resume()
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:204:23: error: cannot find 'URLRequest' in scope
202 |
203 | private func refresh(completion: @escaping (Result<Self, TokenError>) -> Void) {
204 | let request = URLRequest(url: Self.url)
| `- error: cannot find 'URLRequest' in scope
205 | let json = [
206 | "grant_type": "refresh_token",
[10/12] 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:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:66: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(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:166:23: error: cannot find 'URLRequest' in scope
164 |
165 | private func testIfValid(completion: @escaping (Bool) -> Void) {
166 | var request = URLRequest(url: Self.testUrl)
| `- error: cannot find 'URLRequest' in scope
167 | let session = URLSession.shared
168 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:167:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
165 | private func testIfValid(completion: @escaping (Bool) -> Void) {
166 | var request = URLRequest(url: Self.testUrl)
167 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
168 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
169 | authenticateRequest(request) { request in
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:179:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
177 | return
178 | }
179 | completion(httpResponse.statusCode == 200)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
180 | }
181 | task.resume()
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:204:23: error: cannot find 'URLRequest' in scope
202 |
203 | private func refresh(completion: @escaping (Result<Self, TokenError>) -> Void) {
204 | let request = URLRequest(url: Self.url)
| `- error: cannot find 'URLRequest' in scope
205 | let json = [
206 | "grant_type": "refresh_token",
[11/12] 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:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:66: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/URLConfiguration.swift:77:33: error: cannot find type 'URLRequest' in scope
75 | /// Create a URLRequest object for GraphQL URL
76 | /// - Returns: A URLRequest, or nil if the URL is invalid
77 | func graphQLURLRequest() -> URLRequest? {
| `- error: cannot find type 'URLRequest' in scope
78 | let url = URL(string: graphQL)
79 | guard let url else {
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleAccount.swift:109:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
107 | }
108 |
109 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: (Result<[Account], AccountError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | guard let data else {
111 | 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:183:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
181 | }
182 |
183 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
184 | guard let data else {
185 | 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:205:19: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
203 | private static func handleCreditCardResponse(
204 | data: Data?,
205 | response: URLResponse?,
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
206 | error: Error?,
207 | account: Account,
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:180:68: error: cannot find type 'URLRequest' in scope
178 | }
179 |
180 | private static func fxRequest(json: [[String: Any]]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
181 | var queryPart1 = "query CreditCardActivity(", queryPart2 = "", variables = ""
182 | var index = 0
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:310:133: error: cannot find type 'URLRequest' in scope
308 | }
309 |
310 | private static func getTransactionsGraphQLRequest(accountID: String, startDate: Date, endDate: Date, cursor: String?) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
311 | guard var request = URLConfiguration.shared.graphQLURLRequest() else {
312 | throw TransactionError.httpError(error: "Invalid URL")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:323:106: error: cannot find type 'URLRequest' in scope
321 | }
322 |
323 | private static func getTransactionsRESTRequest(accountID: String, startDate: Date, endDate: Date) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
324 | var url = baseUrl
325 | url.queryItems = [
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:337:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 | }
336 |
337 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<Data, TransactionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
338 | DispatchQueue.global(qos: .userInitiated).async {
339 | guard let data else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
[12/12] Compiling Wealthsimple WealthsimpleTransaction.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:180:68: error: cannot find type 'URLRequest' in scope
178 | }
179 |
180 | private static func fxRequest(json: [[String: Any]]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
181 | var queryPart1 = "query CreditCardActivity(", queryPart2 = "", variables = ""
182 | var index = 0
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:310:133: error: cannot find type 'URLRequest' in scope
308 | }
309 |
310 | private static func getTransactionsGraphQLRequest(accountID: String, startDate: Date, endDate: Date, cursor: String?) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
311 | guard var request = URLConfiguration.shared.graphQLURLRequest() else {
312 | throw TransactionError.httpError(error: "Invalid URL")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:323:106: error: cannot find type 'URLRequest' in scope
321 | }
322 |
323 | private static func getTransactionsRESTRequest(accountID: String, startDate: Date, endDate: Date) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
324 | var url = baseUrl
325 | url.queryItems = [
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:337:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
335 | }
336 |
337 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<Data, TransactionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
338 | DispatchQueue.global(qos: .userInitiated).async {
339 | guard let data else {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/Token.swift:185:66: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:158:39: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
156 | getTransactionsRESTRequest(accountID: account.id, startDate: startDate, endDate: endDate)
157 | token.authenticateRequest(request) { request in
158 | let task = URLSession.shared.dataTask(with: request) { data, response, error in
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
159 | handleResponse(data: data, response: response, error: error) {
160 | switch $0 {
/host/spi-builder-workspace/Sources/Wealthsimple/URLConfiguration.swift:77:33: error: cannot find type 'URLRequest' in scope
75 | /// Create a URLRequest object for GraphQL URL
76 | /// - Returns: A URLRequest, or nil if the URL is invalid
77 | func graphQLURLRequest() -> URLRequest? {
| `- error: cannot find type 'URLRequest' in scope
78 | let url = URL(string: graphQL)
79 | guard let url else {
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:216:21: error: cannot find 'DispatchGroup' in scope
214 | var resultError: Error?, resultData: Data?
215 |
216 | let group = DispatchGroup()
| `- error: cannot find 'DispatchGroup' in scope
217 | group.enter()
218 | token.authenticateRequest(request) { request in
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:219:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
217 | group.enter()
218 | token.authenticateRequest(request) { request in
219 | let task = URLSession.shared.dataTask(with: request) { data, response, error in
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
220 | handleResponse(data: data, response: response, error: error) { result in
221 | switch result {
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:265:21: error: cannot find 'DispatchGroup' in scope
263 | private static func loadNextPage(cursor: String, token: Token, account: Account, startDate: Date) throws -> [Transaction] {
264 | var nextResult: Result<[Transaction], TransactionError>!
265 | let group = DispatchGroup()
| `- error: cannot find 'DispatchGroup' in scope
266 | group.enter()
267 | DispatchQueue.global(qos: .userInitiated).async {
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:267:9: error: cannot find 'DispatchQueue' in scope
265 | let group = DispatchGroup()
266 | group.enter()
267 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot find 'DispatchQueue' in scope
268 | getTransactions(token: token, account: account, startDate: startDate, cursor: cursor) {
269 | nextResult = $0
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:267:36: error: cannot infer contextual base in reference to member 'userInitiated'
265 | let group = DispatchGroup()
266 | group.enter()
267 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot infer contextual base in reference to member 'userInitiated'
268 | getTransactions(token: token, account: account, startDate: startDate, cursor: cursor) {
269 | nextResult = $0
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:332:23: error: cannot find 'URLRequest' in scope
330 | URLQueryItem(name: "effective_date_end", value: dateFormatterREST.string(from: endDate))
331 | ]
332 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
333 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
334 | return request
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:338:9: error: cannot find 'DispatchQueue' in scope
336 |
337 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<Data, TransactionError>) -> Void) {
338 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot find 'DispatchQueue' in scope
339 | guard let data else {
340 | if let error {
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:338:36: error: cannot infer contextual base in reference to member 'userInitiated'
336 |
337 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<Data, TransactionError>) -> Void) {
338 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot infer contextual base in reference to member 'userInitiated'
339 | guard let data else {
340 | if let error {
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:347:47: warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
345 | return
346 | }
347 | guard let httpResponse = response as? HTTPURLResponse else {
| `- warning: conditional downcast from 'URLResponse?' (aka 'Optional<AnyObject>') to 'HTTPURLResponse' (aka 'AnyObject') does nothing
348 | completion(.failure(TransactionError.httpError(error: "No HTTPURLResponse")))
349 | return
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:351:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
349 | return
350 | }
351 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
352 | completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
353 | return
BUILD FAILURE 6.3 wasm