Build Information
Failed to build SwiftBeanCountWealthsimpleMapper, reference main (5ac4a6), with Swift 6.1 for Wasm on 13 Dec 2025 18:29:38 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1Build Log
========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Nef10/SwiftBeanCountWealthsimpleMapper.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/SwiftBeanCountWealthsimpleMapper
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 5ac4a63 Bump actions/upload-artifact to v6
Cloned https://github.com/Nef10/SwiftBeanCountWealthsimpleMapper.git
Revision (git rev-parse @):
5ac4a638f21f28f41bdbf2f4c31046a63ef662c0
SUCCESS checkout https://github.com/Nef10/SwiftBeanCountWealthsimpleMapper.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/Nef10/SwiftBeanCountWealthsimpleMapper.git
https://github.com/Nef10/SwiftBeanCountWealthsimpleMapper.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
{
"identity" : "swiftbeancountmodel",
"requirement" : {
"exact" : [
"0.2.0"
]
},
"type" : "sourceControl",
"url" : "https://github.com/Nef10/SwiftBeanCountModel.git"
},
{
"identity" : "swiftbeancountparserutils",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Nef10/SwiftBeanCountParserUtils.git"
},
{
"identity" : "wealthsimpledownloader",
"requirement" : {
"range" : [
{
"lower_bound" : "3.0.0",
"upper_bound" : "4.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Nef10/WealthsimpleDownloader.git"
}
],
"manifest_display_name" : "SwiftBeanCountWealthsimpleMapper",
"name" : "SwiftBeanCountWealthsimpleMapper",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "SwiftBeanCountWealthsimpleMapper",
"targets" : [
"SwiftBeanCountWealthsimpleMapper"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SwiftBeanCountWealthsimpleMapperTests",
"module_type" : "SwiftTarget",
"name" : "SwiftBeanCountWealthsimpleMapperTests",
"path" : "Tests/SwiftBeanCountWealthsimpleMapperTests",
"sources" : [
"Extensions/AmountInitTests.swift",
"Extensions/StringKebabCaseTests.swift",
"Extensions/TransactionHelperTests.swift",
"Extensions/XCTestCase.swift",
"LedgerLookupTests.swift",
"TestTransaction.swift",
"WealthsimpleConversionErrorTests.swift",
"WealthsimpleLedgerMapperTests.swift"
],
"target_dependencies" : [
"SwiftBeanCountWealthsimpleMapper"
],
"type" : "test"
},
{
"c99name" : "SwiftBeanCountWealthsimpleMapper",
"module_type" : "SwiftTarget",
"name" : "SwiftBeanCountWealthsimpleMapper",
"path" : "Sources/SwiftBeanCountWealthsimpleMapper",
"product_dependencies" : [
"SwiftBeanCountModel",
"SwiftBeanCountParserUtils",
"Wealthsimple"
],
"product_memberships" : [
"SwiftBeanCountWealthsimpleMapper"
],
"sources" : [
"Extensions/Amount+init.swift",
"Extensions/String+KebabCase.swift",
"Extensions/Wealthsimple.Transaction+Helper.swift",
"LedgerLookup.swift",
"MetaDataKeys.swift",
"WealthsimpleConversionError.swift",
"WealthsimpleLedgerMapper.swift"
],
"type" : "library"
}
],
"tools_version" : "5.2"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:dbcbf45695e2d1afcaee9a5a93239e71a6cc4a5872f338d6e993e9ceefe7df1b
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Fetching https://github.com/Nef10/WealthsimpleDownloader.git
Fetching https://github.com/Nef10/SwiftBeanCountParserUtils.git
Fetching https://github.com/Nef10/SwiftBeanCountModel.git
[1/3765] Fetching swiftbeancountmodel
[2/4757] Fetching swiftbeancountmodel, swiftbeancountparserutils
[2227/7335] Fetching swiftbeancountmodel, swiftbeancountparserutils, wealthsimpledownloader
Fetched https://github.com/Nef10/SwiftBeanCountParserUtils.git from cache (0.33s)
[3006/6343] Fetching swiftbeancountmodel, wealthsimpledownloader
Fetched https://github.com/Nef10/WealthsimpleDownloader.git from cache (5.54s)
Fetched https://github.com/Nef10/SwiftBeanCountModel.git from cache (5.54s)
Computing version for https://github.com/Nef10/WealthsimpleDownloader.git
Computed https://github.com/Nef10/WealthsimpleDownloader.git at 3.0.0 (6.47s)
Computing version for https://github.com/Nef10/SwiftBeanCountParserUtils.git
Computed https://github.com/Nef10/SwiftBeanCountParserUtils.git at 1.0.0 (5.43s)
Computing version for https://github.com/Nef10/SwiftBeanCountModel.git
Computed https://github.com/Nef10/SwiftBeanCountModel.git at 0.2.0 (1.28s)
Creating working copy for https://github.com/Nef10/WealthsimpleDownloader.git
Working copy of https://github.com/Nef10/WealthsimpleDownloader.git resolved at 3.0.0
Creating working copy for https://github.com/Nef10/SwiftBeanCountParserUtils.git
Working copy of https://github.com/Nef10/SwiftBeanCountParserUtils.git resolved at 1.0.0
Creating working copy for https://github.com/Nef10/SwiftBeanCountModel.git
Working copy of https://github.com/Nef10/SwiftBeanCountModel.git resolved at 0.2.0
Building for debugging...
[0/5] Write sources
[4/5] Write swift-version-24593BA9C3E375BF.txt
[6/34] Emitting module SwiftBeanCountParserUtils
[7/34] Compiling SwiftBeanCountParserUtils String.swift
[8/35] Compiling SwiftBeanCountModel Transaction.swift
[9/35] Compiling SwiftBeanCountModel TransactionMetaData.swift
[10/37] Compiling SwiftBeanCountModel Balance.swift
[11/37] Compiling SwiftBeanCountModel Commodity.swift
[12/37] Compiling SwiftBeanCountModel Cost.swift
[13/37] Compiling SwiftBeanCountModel Inventory.swift
[14/37] Compiling SwiftBeanCountModel Ledger.swift
[15/37] Compiling Wealthsimple WealthsimpleDownloader.swift
[16/37] Compiling Wealthsimple WealthsimpleAsset.swift
[17/37] Compiling Wealthsimple WealthsimplePosition.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:112:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | }
111 |
112 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 | guard let data else {
114 | 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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:101:23: error: cannot find 'URLRequest' in scope
99 | url.queryItems?.append(URLQueryItem(name: "date", value: dateFormatter.string(from: date)))
100 | }
101 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
102 | let session = URLSession.shared
103 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:102:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
100 | }
101 | var request = URLRequest(url: url.url!)
102 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
103 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
104 | token.authenticateRequest(request) { request in
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:121:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
119 | return
120 | }
121 | 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.
122 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
123 | 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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:125:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
123 | return
124 | }
125 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
126 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
127 | return
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:126:92: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
124 | }
125 | guard httpResponse.statusCode == 200 else {
126 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
127 | return
128 | }
[19/38] Compiling SwiftBeanCountModel Custom.swift
[20/38] Compiling SwiftBeanCountModel Event.swift
[21/38] Compiling SwiftBeanCountModel Flag.swift
[22/38] Compiling Wealthsimple URLConfiguration.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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")
[23/38] Compiling Wealthsimple Transaction.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[24/38] Emitting module Wealthsimple
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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: @escaping (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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:112:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | }
111 |
112 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 | guard let data else {
114 | 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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:182:68: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private static func fxRequest(json: [[String: Any]]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
183 | var queryPart1 = "query CreditCardActivity(", queryPart2 = "", variables = ""
184 | var index = 0
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:312:133: error: cannot find type 'URLRequest' in scope
310 | }
311 |
312 | private static func getTransactionsGraphQLRequest(accountID: String, startDate: Date, endDate: Date, cursor: String?) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
313 | guard var request = URLConfiguration.shared.graphQLURLRequest() else {
314 | throw TransactionError.httpError(error: "Invalid URL")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:325:106: error: cannot find type 'URLRequest' in scope
323 | }
324 |
325 | private static func getTransactionsRESTRequest(accountID: String, startDate: Date, endDate: Date) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
326 | var url = baseUrl
327 | url.queryItems = [
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:339:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
337 | }
338 |
339 | 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.
340 | DispatchQueue.global(qos: .userInitiated).async {
341 | 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
[25/38] Compiling Wealthsimple WealthsimpleAccount.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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: @escaping (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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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 | }
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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",
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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",
[28/38] Emitting module SwiftBeanCountModel
[29/38] Compiling SwiftBeanCountModel Account.swift
[30/38] Compiling SwiftBeanCountModel AccountName.swift
[31/38] Compiling SwiftBeanCountModel Amount.swift
[32/38] Compiling SwiftBeanCountModel MultiCurrencyAmount.swift
[33/38] Compiling SwiftBeanCountModel Option.swift
[34/38] Compiling SwiftBeanCountModel Price.swift
[35/38] Compiling SwiftBeanCountModel Tag.swift
[36/38] Compiling Wealthsimple WealthsimpleTransaction.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:182:68: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private static func fxRequest(json: [[String: Any]]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
183 | var queryPart1 = "query CreditCardActivity(", queryPart2 = "", variables = ""
184 | var index = 0
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:312:133: error: cannot find type 'URLRequest' in scope
310 | }
311 |
312 | private static func getTransactionsGraphQLRequest(accountID: String, startDate: Date, endDate: Date, cursor: String?) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
313 | guard var request = URLConfiguration.shared.graphQLURLRequest() else {
314 | throw TransactionError.httpError(error: "Invalid URL")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:325:106: error: cannot find type 'URLRequest' in scope
323 | }
324 |
325 | private static func getTransactionsRESTRequest(accountID: String, startDate: Date, endDate: Date) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
326 | var url = baseUrl
327 | url.queryItems = [
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:339:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
337 | }
338 |
339 | 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.
340 | DispatchQueue.global(qos: .userInitiated).async {
341 | 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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:160:39: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
158 | getTransactionsRESTRequest(accountID: account.id, startDate: startDate, endDate: endDate)
159 | token.authenticateRequest(request) { request in
160 | let task = URLSession.shared.dataTask(with: request) { data, response, error in
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
161 | handleResponse(data: data, response: response, error: error) {
162 | switch $0 {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:218:21: error: cannot find 'DispatchGroup' in scope
216 | var resultError: Error?, resultData: Data?
217 |
218 | let group = DispatchGroup()
| `- error: cannot find 'DispatchGroup' in scope
219 | group.enter()
220 | token.authenticateRequest(request) { request in
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:221:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
219 | group.enter()
220 | token.authenticateRequest(request) { request in
221 | let task = URLSession.shared.dataTask(with: request) { data, response, error in
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
222 | handleResponse(data: data, response: response, error: error) { result in
223 | switch result {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:267:21: error: cannot find 'DispatchGroup' in scope
265 | private static func loadNextPage(cursor: String, token: Token, account: Account, startDate: Date) throws -> [Transaction] {
266 | var nextResult: Result<[Transaction], TransactionError>!
267 | let group = DispatchGroup()
| `- error: cannot find 'DispatchGroup' in scope
268 | group.enter()
269 | DispatchQueue.global(qos: .userInitiated).async {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:269:9: error: cannot find 'DispatchQueue' in scope
267 | let group = DispatchGroup()
268 | group.enter()
269 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot find 'DispatchQueue' in scope
270 | getTransactions(token: token, account: account, startDate: startDate, cursor: cursor) {
271 | nextResult = $0
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:269:36: error: cannot infer contextual base in reference to member 'userInitiated'
267 | let group = DispatchGroup()
268 | group.enter()
269 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot infer contextual base in reference to member 'userInitiated'
270 | getTransactions(token: token, account: account, startDate: startDate, cursor: cursor) {
271 | nextResult = $0
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:334:23: error: cannot find 'URLRequest' in scope
332 | URLQueryItem(name: "effective_date_end", value: dateFormatterREST.string(from: endDate))
333 | ]
334 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
335 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
336 | return request
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:340:9: error: cannot find 'DispatchQueue' in scope
338 |
339 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<Data, TransactionError>) -> Void) {
340 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot find 'DispatchQueue' in scope
341 | guard let data else {
342 | if let error {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:340:36: error: cannot infer contextual base in reference to member 'userInitiated'
338 |
339 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<Data, TransactionError>) -> Void) {
340 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot infer contextual base in reference to member 'userInitiated'
341 | guard let data else {
342 | if let error {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:353:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
351 | return
352 | }
353 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
354 | completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
355 | 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/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:dbcbf45695e2d1afcaee9a5a93239e71a6cc4a5872f338d6e993e9ceefe7df1b
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/30] Compiling Wealthsimple WealthsimpleDownloader.swift
[3/31] Compiling Wealthsimple URLConfiguration.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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")
[4/31] Compiling SwiftBeanCountParserUtils String.swift
[5/31] Emitting module SwiftBeanCountParserUtils
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/32] Compiling Wealthsimple Transaction.swift
[7/32] Emitting module Wealthsimple
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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: @escaping (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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:112:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | }
111 |
112 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 | guard let data else {
114 | 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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:182:68: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private static func fxRequest(json: [[String: Any]]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
183 | var queryPart1 = "query CreditCardActivity(", queryPart2 = "", variables = ""
184 | var index = 0
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:312:133: error: cannot find type 'URLRequest' in scope
310 | }
311 |
312 | private static func getTransactionsGraphQLRequest(accountID: String, startDate: Date, endDate: Date, cursor: String?) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
313 | guard var request = URLConfiguration.shared.graphQLURLRequest() else {
314 | throw TransactionError.httpError(error: "Invalid URL")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:325:106: error: cannot find type 'URLRequest' in scope
323 | }
324 |
325 | private static func getTransactionsRESTRequest(accountID: String, startDate: Date, endDate: Date) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
326 | var url = baseUrl
327 | url.queryItems = [
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:339:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
337 | }
338 |
339 | 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.
340 | DispatchQueue.global(qos: .userInitiated).async {
341 | 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/32] Compiling Wealthsimple WealthsimpleAccount.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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: @escaping (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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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 | }
[9/32] Compiling Wealthsimple WealthsimpleAsset.swift
[10/32] Compiling Wealthsimple WealthsimplePosition.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:112:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 | }
111 |
112 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 | guard let data else {
114 | 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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:101:23: error: cannot find 'URLRequest' in scope
99 | url.queryItems?.append(URLQueryItem(name: "date", value: dateFormatter.string(from: date)))
100 | }
101 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
102 | let session = URLSession.shared
103 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:102:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
100 | }
101 | var request = URLRequest(url: url.url!)
102 | let session = URLSession.shared
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
103 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
104 | token.authenticateRequest(request) { request in
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:121:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
119 | return
120 | }
121 | 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.
122 | completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
123 | 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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:125:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
123 | return
124 | }
125 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
126 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
127 | return
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:126:92: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
124 | }
125 | guard httpResponse.statusCode == 200 else {
126 | completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
127 | return
128 | }
[11/32] Compiling SwiftBeanCountModel Account.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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",
[12/32] Compiling SwiftBeanCountModel AccountName.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/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",
[14/32] Compiling Wealthsimple WealthsimpleTransaction.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:182:68: error: cannot find type 'URLRequest' in scope
180 | }
181 |
182 | private static func fxRequest(json: [[String: Any]]) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
183 | var queryPart1 = "query CreditCardActivity(", queryPart2 = "", variables = ""
184 | var index = 0
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:312:133: error: cannot find type 'URLRequest' in scope
310 | }
311 |
312 | private static func getTransactionsGraphQLRequest(accountID: String, startDate: Date, endDate: Date, cursor: String?) throws -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
313 | guard var request = URLConfiguration.shared.graphQLURLRequest() else {
314 | throw TransactionError.httpError(error: "Invalid URL")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:325:106: error: cannot find type 'URLRequest' in scope
323 | }
324 |
325 | private static func getTransactionsRESTRequest(accountID: String, startDate: Date, endDate: Date) -> URLRequest {
| `- error: cannot find type 'URLRequest' in scope
326 | var url = baseUrl
327 | url.queryItems = [
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:339:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
337 | }
338 |
339 | 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.
340 | DispatchQueue.global(qos: .userInitiated).async {
341 | 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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:41: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:185:76: error: cannot find type 'URLRequest' in scope
183 | }
184 |
185 | func authenticateRequest(_ request: URLRequest, completion: @escaping (URLRequest) -> Void) {
| `- error: cannot find type 'URLRequest' in scope
186 | var requestCopy = request
187 | requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:160:39: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
158 | getTransactionsRESTRequest(accountID: account.id, startDate: startDate, endDate: endDate)
159 | token.authenticateRequest(request) { request in
160 | let task = URLSession.shared.dataTask(with: request) { data, response, error in
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
161 | handleResponse(data: data, response: response, error: error) {
162 | switch $0 {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/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/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:218:21: error: cannot find 'DispatchGroup' in scope
216 | var resultError: Error?, resultData: Data?
217 |
218 | let group = DispatchGroup()
| `- error: cannot find 'DispatchGroup' in scope
219 | group.enter()
220 | token.authenticateRequest(request) { request in
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:221:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
219 | group.enter()
220 | token.authenticateRequest(request) { request in
221 | let task = URLSession.shared.dataTask(with: request) { data, response, error in
| `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
222 | handleResponse(data: data, response: response, error: error) { result in
223 | switch result {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:267:21: error: cannot find 'DispatchGroup' in scope
265 | private static func loadNextPage(cursor: String, token: Token, account: Account, startDate: Date) throws -> [Transaction] {
266 | var nextResult: Result<[Transaction], TransactionError>!
267 | let group = DispatchGroup()
| `- error: cannot find 'DispatchGroup' in scope
268 | group.enter()
269 | DispatchQueue.global(qos: .userInitiated).async {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:269:9: error: cannot find 'DispatchQueue' in scope
267 | let group = DispatchGroup()
268 | group.enter()
269 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot find 'DispatchQueue' in scope
270 | getTransactions(token: token, account: account, startDate: startDate, cursor: cursor) {
271 | nextResult = $0
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:269:36: error: cannot infer contextual base in reference to member 'userInitiated'
267 | let group = DispatchGroup()
268 | group.enter()
269 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot infer contextual base in reference to member 'userInitiated'
270 | getTransactions(token: token, account: account, startDate: startDate, cursor: cursor) {
271 | nextResult = $0
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:334:23: error: cannot find 'URLRequest' in scope
332 | URLQueryItem(name: "effective_date_end", value: dateFormatterREST.string(from: endDate))
333 | ]
334 | var request = URLRequest(url: url.url!)
| `- error: cannot find 'URLRequest' in scope
335 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
336 | return request
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:340:9: error: cannot find 'DispatchQueue' in scope
338 |
339 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<Data, TransactionError>) -> Void) {
340 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot find 'DispatchQueue' in scope
341 | guard let data else {
342 | if let error {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:340:36: error: cannot infer contextual base in reference to member 'userInitiated'
338 |
339 | private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<Data, TransactionError>) -> Void) {
340 | DispatchQueue.global(qos: .userInitiated).async {
| `- error: cannot infer contextual base in reference to member 'userInitiated'
341 | guard let data else {
342 | if let error {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:353:32: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
351 | return
352 | }
353 | guard httpResponse.statusCode == 200 else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
354 | completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
355 | return
[15/32] Emitting module SwiftBeanCountModel
BUILD FAILURE 6.1 wasm