The Swift Package Index logo.Swift Package Index

Build Information

Failed to build WealthsimpleDownloader, reference main (9ebe39), with Swift 6.1 for Wasm on 23 Apr 2026 18:53:06 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build 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.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
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/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 swiftpackageindex/spi-images
Digest: sha256:276d66a16377d3ee059b2e3429cbc1154d9f01e42871e5d702fd5d8b9044d93d
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/11] Compiling Wealthsimple Transaction.swift
/host/spi-builder-workspace/Sources/Wealthsimple/Transaction.swift:19:10: warning: associated value 'missingResultParameter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
 17 |     case invalidJson(json: Data)
 18 |     /// When the received JSON does not have all expected values
 19 |     case missingResultParameter(json: [String: Any])
    |          `- warning: associated value 'missingResultParameter(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 have an unexpected value
 21 |     case invalidResultParameter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/Transaction.swift:21:10: warning: associated value 'invalidResultParameter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
 19 |     case missingResultParameter(json: [String: Any])
 20 |     /// When the received JSON does have an unexpected value
 21 |     case invalidResultParameter(json: [String: Any])
    |          `- warning: associated value 'invalidResultParameter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
 22 |     /// An error with the token occured
 23 |     case tokenError(_ error: TokenError)
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/12] Emitting module Wealthsimple
/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 { URLConfiguration.shared.urlObject(for: "oauth/token")! }
 38 |     private static var testUrl: URL { URLConfiguration.shared.urlObject(for: "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 { URLConfiguration.shared.urlObject(for: "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: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/Transaction.swift:19:10: warning: associated value 'missingResultParameter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
 17 |     case invalidJson(json: Data)
 18 |     /// When the received JSON does not have all expected values
 19 |     case missingResultParameter(json: [String: Any])
    |          `- warning: associated value 'missingResultParameter(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 have an unexpected value
 21 |     case invalidResultParameter(json: [String: Any])
/host/spi-builder-workspace/Sources/Wealthsimple/Transaction.swift:21:10: warning: associated value 'invalidResultParameter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
 19 |     case missingResultParameter(json: [String: Any])
 20 |     /// When the received JSON does have an unexpected value
 21 |     case invalidResultParameter(json: [String: Any])
    |          `- warning: associated value 'invalidResultParameter(json:)' of 'Sendable'-conforming enum 'TransactionError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
 22 |     /// An error with the token occured
 23 |     case tokenError(_ error: TokenError)
/host/spi-builder-workspace/Sources/Wealthsimple/URLConfiguration.swift:20:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
12 |
13 | /// Singleton class that manages the base URL configuration for all Wealthsimple API endpoints
14 | final class URLConfiguration {
   |             `- note: class 'URLConfiguration' does not conform to the 'Sendable' protocol
15 |
16 |     private static let defaultBaseURL = "https://api.production.wealthsimple.com/v1/"
   :
18 |
19 |     /// Shared singleton instance
20 |     static let shared = URLConfiguration()
   |                |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 |     /// Base URL for all Wealthsimple API endpoints
/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: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 var baseUrl: URLComponents { URLConfiguration.shared.urlComponents(for: "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: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:32:24: warning: static property 'dateFormatterREST' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 30 |     private static let graphQLOperationDetails = "CreditCardActivity"
 31 |
 32 |     private static var dateFormatterREST: DateFormatter = {
    |                        |- warning: static property 'dateFormatterREST' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'dateFormatterREST' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'dateFormatterREST' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 33 |         var dateFormatter = DateFormatter()
 34 |         dateFormatter.dateFormat = "yyyy-MM-dd"
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:38:24: warning: static property 'dateFormatterGraphQLRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 36 |     }()
 37 |
 38 |     private static var dateFormatterGraphQLRequest: ISO8601DateFormatter = {
    |                        |- warning: static property 'dateFormatterGraphQLRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'dateFormatterGraphQLRequest' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'dateFormatterGraphQLRequest' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 39 |         ISO8601DateFormatter()
 40 |     }()
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:42:24: warning: static property 'dateFormatterGraphQLResult' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 40 |     }()
 41 |
 42 |     private static var dateFormatterGraphQLResult: DateFormatter = {
    |                        |- warning: static property 'dateFormatterGraphQLResult' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'dateFormatterGraphQLResult' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'dateFormatterGraphQLResult' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 43 |         var dateFormatter = DateFormatter()
 44 |         dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSXXX"
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:48:24: warning: static property 'dateFormatterGraphQLResult2' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 46 |     }()
 47 |
 48 |     private static var dateFormatterGraphQLResult2: DateFormatter = {
    |                        |- warning: static property 'dateFormatterGraphQLResult2' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'dateFormatterGraphQLResult2' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'dateFormatterGraphQLResult2' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 49 |         var dateFormatter = DateFormatter()
 50 |         dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss z"
/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
[5/12] Compiling Wealthsimple String+CamelCase.swift
/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 { URLConfiguration.shared.urlObject(for: "oauth/token")! }
 38 |     private static var testUrl: URL { URLConfiguration.shared.urlObject(for: "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 { URLConfiguration.shared.urlObject(for: "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: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",
[6/12] Compiling Wealthsimple Token.swift
/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 { URLConfiguration.shared.urlObject(for: "oauth/token")! }
 38 |     private static var testUrl: URL { URLConfiguration.shared.urlObject(for: "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 { URLConfiguration.shared.urlObject(for: "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: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",
[7/12] Compiling Wealthsimple WealthsimpleDownloader.swift
[8/12] Compiling Wealthsimple WealthsimplePosition.swift
/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 var baseUrl: URLComponents { URLConfiguration.shared.urlComponents(for: "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: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 |         }
[9/12] Compiling Wealthsimple URLConfiguration.swift
/host/spi-builder-workspace/Sources/Wealthsimple/URLConfiguration.swift:20:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
12 |
13 | /// Singleton class that manages the base URL configuration for all Wealthsimple API endpoints
14 | final class URLConfiguration {
   |             `- note: class 'URLConfiguration' does not conform to the 'Sendable' protocol
15 |
16 |     private static let defaultBaseURL = "https://api.production.wealthsimple.com/v1/"
   :
18 |
19 |     /// Shared singleton instance
20 |     static let shared = URLConfiguration()
   |                |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'URLConfiguration' may have shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 |
22 |     /// Base URL for all Wealthsimple API endpoints
/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")
[10/12] Compiling Wealthsimple WealthsimpleAsset.swift
[11/12] 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 |         }
[12/12] Compiling Wealthsimple WealthsimpleTransaction.swift
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:32:24: warning: static property 'dateFormatterREST' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 30 |     private static let graphQLOperationDetails = "CreditCardActivity"
 31 |
 32 |     private static var dateFormatterREST: DateFormatter = {
    |                        |- warning: static property 'dateFormatterREST' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'dateFormatterREST' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'dateFormatterREST' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 33 |         var dateFormatter = DateFormatter()
 34 |         dateFormatter.dateFormat = "yyyy-MM-dd"
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:38:24: warning: static property 'dateFormatterGraphQLRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 36 |     }()
 37 |
 38 |     private static var dateFormatterGraphQLRequest: ISO8601DateFormatter = {
    |                        |- warning: static property 'dateFormatterGraphQLRequest' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'dateFormatterGraphQLRequest' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'dateFormatterGraphQLRequest' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 39 |         ISO8601DateFormatter()
 40 |     }()
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:42:24: warning: static property 'dateFormatterGraphQLResult' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 40 |     }()
 41 |
 42 |     private static var dateFormatterGraphQLResult: DateFormatter = {
    |                        |- warning: static property 'dateFormatterGraphQLResult' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'dateFormatterGraphQLResult' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'dateFormatterGraphQLResult' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 43 |         var dateFormatter = DateFormatter()
 44 |         dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSXXX"
/host/spi-builder-workspace/Sources/Wealthsimple/WealthsimpleTransaction.swift:48:24: warning: static property 'dateFormatterGraphQLResult2' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 46 |     }()
 47 |
 48 |     private static var dateFormatterGraphQLResult2: DateFormatter = {
    |                        |- warning: static property 'dateFormatterGraphQLResult2' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'dateFormatterGraphQLResult2' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'dateFormatterGraphQLResult2' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 49 |         var dateFormatter = DateFormatter()
 50 |         dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss z"
/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
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:276d66a16377d3ee059b2e3429cbc1154d9f01e42871e5d702fd5d8b9044d93d
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/10] Compiling Wealthsimple WealthsimpleDownloader.swift
[3/10] 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 |         }
[4/10] 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")
[5/10] 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 |         }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/11] Compiling Wealthsimple Transaction.swift
[7/11] 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
[8/11] 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",
[9/11] 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",
[10/11] Compiling Wealthsimple WealthsimpleAsset.swift
[11/11] 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.1 wasm