The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build SwiftBeanCountWealthsimpleMapper, reference main (5fa651), with Swift 6.1 for Wasm on 3 Jun 2025 08:50:06 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Nef10/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 5fa651a Bump WealthsimpleDownloader from 2.0.4 to 2.0.5 (#279)
Cloned https://github.com/Nef10/SwiftBeanCountWealthsimpleMapper.git
Revision (git rev-parse @):
5fa651a84f5573e271bc4d8fd1b2395c40b1c8de
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.1.6"
        ]
      },
      "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" : "2.0.5",
            "upper_bound" : "3.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-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Fetching https://github.com/Nef10/SwiftBeanCountModel.git
Fetching https://github.com/Nef10/WealthsimpleDownloader.git
Fetching https://github.com/Nef10/SwiftBeanCountParserUtils.git
[1/896] Fetching swiftbeancountparserutils
[772/2917] Fetching swiftbeancountparserutils, wealthsimpledownloader
[2130/6277] Fetching swiftbeancountparserutils, wealthsimpledownloader, swiftbeancountmodel
Fetched https://github.com/Nef10/SwiftBeanCountParserUtils.git from cache (0.38s)
Fetched https://github.com/Nef10/WealthsimpleDownloader.git from cache (0.39s)
Fetched https://github.com/Nef10/SwiftBeanCountModel.git from cache (0.39s)
Computing version for https://github.com/Nef10/WealthsimpleDownloader.git
Computed https://github.com/Nef10/WealthsimpleDownloader.git at 2.0.5 (0.87s)
Computing version for https://github.com/Nef10/SwiftBeanCountParserUtils.git
Computed https://github.com/Nef10/SwiftBeanCountParserUtils.git at 1.0.0 (0.59s)
Computing version for https://github.com/Nef10/SwiftBeanCountModel.git
Computed https://github.com/Nef10/SwiftBeanCountModel.git at 0.1.6 (0.74s)
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.1.6
Creating working copy for https://github.com/Nef10/WealthsimpleDownloader.git
Working copy of https://github.com/Nef10/WealthsimpleDownloader.git resolved at 2.0.5
Building for debugging...
[0/5] Write sources
[4/5] Write swift-version-24593BA9C3E375BF.txt
[6/33] Emitting module SwiftBeanCountModel
[7/35] Compiling SwiftBeanCountModel MultiCurrencyAmount.swift
[8/35] Compiling SwiftBeanCountModel Option.swift
[9/35] Compiling Wealthsimple WealthsimpleDownloader.swift
[10/36] Compiling SwiftBeanCountModel Transaction.swift
[11/36] Compiling SwiftBeanCountModel TransactionMetaData.swift
[12/36] Emitting module SwiftBeanCountParserUtils
[13/36] Compiling SwiftBeanCountParserUtils String.swift
[14/36] Compiling SwiftBeanCountModel Price.swift
[15/36] Compiling SwiftBeanCountModel Tag.swift
[16/37] Compiling SwiftBeanCountModel TransactionPosting.swift
[17/37] Compiling SwiftBeanCountModel ValidationResult.swift
[18/37] Compiling SwiftBeanCountModel Inventory.swift
[19/37] Compiling SwiftBeanCountModel Ledger.swift
[20/37] Compiling SwiftBeanCountModel Custom.swift
[21/37] Compiling SwiftBeanCountModel Event.swift
[22/37] Compiling SwiftBeanCountModel Flag.swift
[23/37] Compiling SwiftBeanCountModel Balance.swift
[24/37] Compiling SwiftBeanCountModel Commodity.swift
[25/37] Compiling SwiftBeanCountModel Cost.swift
[26/37] Compiling SwiftBeanCountModel Account.swift
[27/37] Compiling SwiftBeanCountModel AccountName.swift
[28/37] Compiling SwiftBeanCountModel Amount.swift
[29/37] Compiling Wealthsimple WealthsimplePosition.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:119:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 |     }
118 |
119 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 |         guard let data else {
121 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:103:23: error: cannot find 'URLRequest' in scope
101 |             url.queryItems?.append(URLQueryItem(name: "date", value: dateFormatter.string(from: date)))
102 |         }
103 |         var request = URLRequest(url: url.url!)
    |                       `- error: cannot find 'URLRequest' in scope
104 |         let session = URLSession.shared
105 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:104:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
102 |         }
103 |         var request = URLRequest(url: url.url!)
104 |         let session = URLSession.shared
    |                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
105 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
106 |         token.authenticateRequest(request) {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:128:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 |             return
127 |         }
128 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 |             completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
130 |             return
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:132:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
130 |             return
131 |         }
132 |         guard httpResponse.statusCode == 200 else {
    |                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
133 |             completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
134 |             return
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:133:92: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
131 |         }
132 |         guard httpResponse.statusCode == 200 else {
133 |             completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
    |                                                                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
134 |             return
135 |         }
[30/37] Compiling Wealthsimple WealthsimpleAsset.swift
[31/37] Compiling Wealthsimple Token.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:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.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:170:23: error: cannot find 'URLRequest' in scope
168 |
169 |     private func testIfValid(completion: @escaping (Bool) -> Void) {
170 |         var request = URLRequest(url: Self.testUrl)
    |                       `- error: cannot find 'URLRequest' in scope
171 |         let session = URLSession.shared
172 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:171:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
169 |     private func testIfValid(completion: @escaping (Bool) -> Void) {
170 |         var request = URLRequest(url: Self.testUrl)
171 |         let session = URLSession.shared
    |                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
172 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
173 |         authenticateRequest(request) {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:197:21: error: cannot infer contextual base in reference to member 'success'
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
197 |         completion(.success(requestCopy))
    |                     `- error: cannot infer contextual base in reference to member 'success'
198 |     }
199 |
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:213:23: error: cannot find 'URLRequest' in scope
211 |
212 |     private func refresh(completion: @escaping (Result<Self, TokenError>) -> Void) {
213 |         let request = URLRequest(url: Self.url)
    |                       `- error: cannot find 'URLRequest' in scope
214 |         let json = [
215 |             "grant_type": "refresh_token",
[32/37] Compiling Wealthsimple String+CamelCase.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[33/37] 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:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:116:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     }
115 |
116 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Account], AccountError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 |         guard let data else {
118 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:119:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 |     }
118 |
119 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 |         guard let data else {
121 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:225:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
223 |     }
224 |
225 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Transaction], TransactionError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
226 |         guard let data else {
227 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[34/37] Compiling Wealthsimple TransactionError.swift
[35/37] Compiling Wealthsimple WealthsimpleAccount.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:116:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     }
115 |
116 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Account], AccountError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 |         guard let data else {
118 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:100:23: error: cannot find 'URLRequest' in scope
 98 |
 99 |     static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
100 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
101 |         let session = URLSession.shared
102 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:101:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 99 |     static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
100 |         var request = URLRequest(url: url)
101 |         let session = URLSession.shared
    |                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
102 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
103 |         token.authenticateRequest(request) {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:125:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
123 |             return
124 |         }
125 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 |             completion(.failure(AccountError.httpError(error: "No HTTPURLResponse")))
127 |             return
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:129:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
127 |             return
128 |         }
129 |         guard httpResponse.statusCode == 200 else {
    |                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
130 |             completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
131 |             return
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:130:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
128 |         }
129 |         guard httpResponse.statusCode == 200 else {
130 |             completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
    |                                                                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
131 |             return
132 |         }
[38/38] Compiling Wealthsimple WealthsimpleTransaction.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:225:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
223 |     }
224 |
225 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Transaction], TransactionError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
226 |         guard let data else {
227 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:209:23: error: cannot find 'URLRequest' in scope
207 |         }
208 |         url.queryItems?.append(URLQueryItem(name: "effective_date_end", value: dateFormatter.string(from: Calendar.current.date(byAdding: .day, value: 7, to: Date())!)))
209 |         var request = URLRequest(url: url.url!)
    |                       `- error: cannot find 'URLRequest' in scope
210 |         let session = URLSession.shared
211 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:210:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
208 |         url.queryItems?.append(URLQueryItem(name: "effective_date_end", value: dateFormatter.string(from: Calendar.current.date(byAdding: .day, value: 7, to: Date())!)))
209 |         var request = URLRequest(url: url.url!)
210 |         let session = URLSession.shared
    |                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
211 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
212 |         token.authenticateRequest(request) {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:234:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
232 |             return
233 |         }
234 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 |             completion(.failure(TransactionError.httpError(error: "No HTTPURLResponse")))
236 |             return
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:238:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
236 |             return
237 |         }
238 |         guard httpResponse.statusCode == 200 else {
    |                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
239 |             completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
240 |             return
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:239:95: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
237 |         }
238 |         guard httpResponse.statusCode == 200 else {
239 |             completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
    |                                                                                               `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
240 |             return
241 |         }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-2":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/29] Compiling Wealthsimple String+CamelCase.swift
[3/30] Compiling SwiftBeanCountParserUtils String.swift
[4/30] Emitting module SwiftBeanCountParserUtils
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/31] 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:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:116:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     }
115 |
116 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Account], AccountError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 |         guard let data else {
118 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:119:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 |     }
118 |
119 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 |         guard let data else {
121 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:225:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
223 |     }
224 |
225 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Transaction], TransactionError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
226 |         guard let data else {
227 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
[6/31] Compiling Wealthsimple Token.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:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.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:170:23: error: cannot find 'URLRequest' in scope
168 |
169 |     private func testIfValid(completion: @escaping (Bool) -> Void) {
170 |         var request = URLRequest(url: Self.testUrl)
    |                       `- error: cannot find 'URLRequest' in scope
171 |         let session = URLSession.shared
172 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:171:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
169 |     private func testIfValid(completion: @escaping (Bool) -> Void) {
170 |         var request = URLRequest(url: Self.testUrl)
171 |         let session = URLSession.shared
    |                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
172 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
173 |         authenticateRequest(request) {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:197:21: error: cannot infer contextual base in reference to member 'success'
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
197 |         completion(.success(requestCopy))
    |                     `- error: cannot infer contextual base in reference to member 'success'
198 |     }
199 |
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:213:23: error: cannot find 'URLRequest' in scope
211 |
212 |     private func refresh(completion: @escaping (Result<Self, TokenError>) -> Void) {
213 |         let request = URLRequest(url: Self.url)
    |                       `- error: cannot find 'URLRequest' in scope
214 |         let json = [
215 |             "grant_type": "refresh_token",
[7/31] Compiling Wealthsimple TransactionError.swift
[8/31] Emitting module SwiftBeanCountModel
[9/33] Compiling Wealthsimple WealthsimpleAccount.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:116:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
114 |     }
115 |
116 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Account], AccountError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 |         guard let data else {
118 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:100:23: error: cannot find 'URLRequest' in scope
 98 |
 99 |     static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
100 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
101 |         let session = URLSession.shared
102 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:101:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 99 |     static func getAccounts(token: Token, completion: @escaping (Result<[Account], AccountError>) -> Void) {
100 |         var request = URLRequest(url: url)
101 |         let session = URLSession.shared
    |                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
102 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
103 |         token.authenticateRequest(request) {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:125:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
123 |             return
124 |         }
125 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 |             completion(.failure(AccountError.httpError(error: "No HTTPURLResponse")))
127 |             return
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:129:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
127 |             return
128 |         }
129 |         guard httpResponse.statusCode == 200 else {
    |                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
130 |             completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
131 |             return
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleAccount.swift:130:91: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
128 |         }
129 |         guard httpResponse.statusCode == 200 else {
130 |             completion(.failure(AccountError.httpError(error: "Status code \(httpResponse.statusCode)")))
    |                                                                                           `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
131 |             return
132 |         }
[11/33] Compiling Wealthsimple WealthsimplePosition.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:119:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 |     }
118 |
119 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Position], PositionError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 |         guard let data else {
121 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:103:23: error: cannot find 'URLRequest' in scope
101 |             url.queryItems?.append(URLQueryItem(name: "date", value: dateFormatter.string(from: date)))
102 |         }
103 |         var request = URLRequest(url: url.url!)
    |                       `- error: cannot find 'URLRequest' in scope
104 |         let session = URLSession.shared
105 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:104:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
102 |         }
103 |         var request = URLRequest(url: url.url!)
104 |         let session = URLSession.shared
    |                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
105 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
106 |         token.authenticateRequest(request) {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:128:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
126 |             return
127 |         }
128 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
129 |             completion(.failure(PositionError.httpError(error: "No HTTPURLResponse")))
130 |             return
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:132:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
130 |             return
131 |         }
132 |         guard httpResponse.statusCode == 200 else {
    |                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
133 |             completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
134 |             return
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimplePosition.swift:133:92: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
131 |         }
132 |         guard httpResponse.statusCode == 200 else {
133 |             completion(.failure(PositionError.httpError(error: "Status code \(httpResponse.statusCode)")))
    |                                                                                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
134 |             return
135 |         }
[12/33] Compiling Wealthsimple WealthsimpleTransaction.swift
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:225:63: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
223 |     }
224 |
225 |     private static func handleResponse(data: Data?, response: URLResponse?, error: Error?, completion: @escaping (Result<[Transaction], TransactionError>) -> Void) {
    |                                                               `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
226 |         guard let data else {
227 |             if let error {
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:209:23: error: cannot find 'URLRequest' in scope
207 |         }
208 |         url.queryItems?.append(URLQueryItem(name: "effective_date_end", value: dateFormatter.string(from: Calendar.current.date(byAdding: .day, value: 7, to: Date())!)))
209 |         var request = URLRequest(url: url.url!)
    |                       `- error: cannot find 'URLRequest' in scope
210 |         let session = URLSession.shared
211 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:210:34: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
208 |         url.queryItems?.append(URLQueryItem(name: "effective_date_end", value: dateFormatter.string(from: Calendar.current.date(byAdding: .day, value: 7, to: Date())!)))
209 |         var request = URLRequest(url: url.url!)
210 |         let session = URLSession.shared
    |                                  `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
211 |         request.setValue("application/json", forHTTPHeaderField: "Content-Type")
212 |         token.authenticateRequest(request) {
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:41: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                         `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/Token.swift:194:83: error: cannot find type 'URLRequest' in scope
192 |     }
193 |
194 |     func authenticateRequest(_ request: URLRequest, completion: @escaping (Result<URLRequest, TokenError>) -> Void) {
    |                                                                                   `- error: cannot find type 'URLRequest' in scope
195 |         var requestCopy = request
196 |         requestCopy.setValue("Bearer \(self.accessToken)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:234:47: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
232 |             return
233 |         }
234 |         guard let httpResponse = response as? HTTPURLResponse else {
    |                                               `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
235 |             completion(.failure(TransactionError.httpError(error: "No HTTPURLResponse")))
236 |             return
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:238:28: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
236 |             return
237 |         }
238 |         guard httpResponse.statusCode == 200 else {
    |                            `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
239 |             completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
240 |             return
/host/spi-builder-workspace/.build/checkouts/WealthsimpleDownloader/Sources/Wealthsimple/WealthsimpleTransaction.swift:239:95: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
237 |         }
238 |         guard httpResponse.statusCode == 200 else {
239 |             completion(.failure(TransactionError.httpError(error: "Status code \(httpResponse.statusCode)")))
    |                                                                                               `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
240 |             return
241 |         }
[13/33] Compiling Wealthsimple WealthsimpleAsset.swift
[14/33] Compiling Wealthsimple WealthsimpleDownloader.swift
BUILD FAILURE 6.1 wasm