Build Information
Failed to build ShopSavvySDK, reference main (cdab34), with Swift 6.1 for Android on 20 Nov 2026 03:32:19 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-54344844-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1Build Log
========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/shopsavvy/sdk-swift.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/shopsavvy/sdk-swift
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at cdab349 Docs and 1.6.0: errors/rate limits/credits README section, copy-paste quick start, no free-account claim, CHANGELOG, version bump in podspec/VERSION/README
Cloned https://github.com/shopsavvy/sdk-swift.git
Revision (git rev-parse @):
cdab3498fdfc5075eec77c1b95b9d71a36c9adb9
SUCCESS checkout https://github.com/shopsavvy/sdk-swift.git at main
========================================
Build
========================================
Selected platform: android
Swift version: 6.1
Building package at path: $PWD
https://github.com/shopsavvy/sdk-swift.git
https://github.com/shopsavvy/sdk-swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344844-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 -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
android-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:4a2fa435ac333753e63ed6c656fe70fcece760f0601ff6567c222f81f55cb110
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:android-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/6] Compiling ShopSavvySDK Models.swift
[4/6] Compiling ShopSavvySDK ShopSavvyClient.swift
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:26:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | private let apiKey: String
25 | private let baseURL: String
26 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | private let decoder: JSONDecoder
28 | private let encoder: JSONEncoder
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:43:96: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | /// - configuration: Base `URLSessionConfiguration` (proxies, `protocolClasses`, caching).
42 | /// The timeout intervals above are applied on top of it.
43 | public init(apiKey: String, baseURL: String, timeoutInterval: TimeInterval, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | guard !apiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
45 | fatalError("API key is required. Get one at https://shopsavvy.com/data")
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:43:123: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
41 | /// - configuration: Base `URLSessionConfiguration` (proxies, `protocolClasses`, caching).
42 | /// The timeout intervals above are applied on top of it.
43 | public init(apiKey: String, baseURL: String, timeoutInterval: TimeInterval, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
44 | guard !apiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
45 | fatalError("API key is required. Get one at https://shopsavvy.com/data")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:415:47: error: cannot find type 'URLRequest' in scope
413 |
414 | /// Runs a request whose response is returned as a loose JSON dictionary (batch, webhooks).
415 | private func performRawRequest(_ request: URLRequest) async throws -> [String: Any] {
| `- error: cannot find type 'URLRequest' in scope
416 | let (data, response) = try await session.data(for: request)
417 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:428:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | /// Builds the typed error for a non-2xx response from `error`, `error_detail`, `meta.request_id`
427 | /// and the `Retry-After` header. Routing is by `error_detail.code` first (two codes share 429).
428 | static func apiError(response: HTTPURLResponse, data: Data) -> ShopSavvyError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 | let statusCode = response.statusCode
430 | let root = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any]
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:55:23: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForRequest'
53 | self.baseURL = baseURL
54 |
55 | configuration.timeoutIntervalForRequest = timeoutInterval
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForRequest'
56 | configuration.timeoutIntervalForResource = timeoutInterval
57 | self.session = URLSession(configuration: configuration)
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:56:23: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForResource'
54 |
55 | configuration.timeoutIntervalForRequest = timeoutInterval
56 | configuration.timeoutIntervalForResource = timeoutInterval
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForResource'
57 | self.session = URLSession(configuration: configuration)
58 |
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:57:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
55 | configuration.timeoutIntervalForRequest = timeoutInterval
56 | configuration.timeoutIntervalForResource = timeoutInterval
57 | self.session = URLSession(configuration: configuration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
58 |
59 | self.decoder = JSONDecoder()
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:302:23: error: cannot find 'URLRequest' in scope
300 | let jsonData = try JSONSerialization.data(withJSONObject: body)
301 |
302 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
303 | request.httpMethod = "POST"
304 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:315:23: error: cannot find 'URLRequest' in scope
313 | public func getBatchStatus(batchId: String) async throws -> [String: Any] {
314 | let url = URL(string: "\(baseURL)/batch/\(batchId)")!
315 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
316 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
317 | request.setValue("ShopSavvy-Swift-SDK/\(VERSION)", forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:323:23: error: cannot find 'URLRequest' in scope
321 | public func createWebhook(url: String, events: [String]) async throws -> [String: Any] {
322 | let webhookUrl = URL(string: "\(baseURL)/webhooks")!
323 | var request = URLRequest(url: webhookUrl)
| `- error: cannot find 'URLRequest' in scope
324 | request.httpMethod = "POST"
325 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:333:23: error: cannot find 'URLRequest' in scope
331 |
332 | public func listWebhooks() async throws -> [String: Any] {
333 | var request = URLRequest(url: URL(string: "\(baseURL)/webhooks")!)
| `- error: cannot find 'URLRequest' in scope
334 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
335 | request.setValue("ShopSavvy-Swift-SDK/\(VERSION)", forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:341:23: error: cannot find 'URLRequest' in scope
339 | public func testWebhook(webhookId: String) async throws -> [String: Any] {
340 | let testUrl = URL(string: "\(baseURL)/webhooks/\(webhookId)/test")!
341 | var request = URLRequest(url: testUrl)
| `- error: cannot find 'URLRequest' in scope
342 | request.httpMethod = "POST"
343 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:355:23: error: cannot find 'URLRequest' in scope
353 | }
354 | let updateUrl = URL(string: "\(baseURL)/webhooks/\(webhookId)")!
355 | var request = URLRequest(url: updateUrl)
| `- error: cannot find 'URLRequest' in scope
356 | request.httpMethod = "PUT"
357 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:370:23: error: cannot find 'URLRequest' in scope
368 | public func deleteWebhook(webhookId: String) async throws -> [String: Any] {
369 | let delUrl = URL(string: "\(baseURL)/webhooks/\(webhookId)")!
370 | var request = URLRequest(url: delUrl)
| `- error: cannot find 'URLRequest' in scope
371 | request.httpMethod = "DELETE"
372 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:387:23: error: cannot find 'URLRequest' in scope
385 |
386 | private func performRequest<T: Codable>(url: URL, method: String = "GET", body: Codable? = nil) async throws -> T {
387 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
388 | request.httpMethod = method
389 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:397:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
395 | }
396 |
397 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
398 |
399 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:416:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
414 | /// Runs a request whose response is returned as a loose JSON dictionary (batch, webhooks).
415 | private func performRawRequest(_ request: URLRequest) async throws -> [String: Any] {
416 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
417 | guard let httpResponse = response as? HTTPURLResponse else {
418 | throw ShopSavvyError.networkError("Invalid response type")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:429:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
427 | /// and the `Retry-After` header. Routing is by `error_detail.code` first (two codes share 429).
428 | static func apiError(response: HTTPURLResponse, data: Data) -> ShopSavvyError {
429 | let statusCode = response.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
430 | let root = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any]
431 | let errorDetail = root?["error_detail"] as? [String: Any]
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:437:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
435 | ?? String(data: data, encoding: .utf8).flatMap { $0.isEmpty ? nil : $0 }
436 | ?? "Unknown error"
437 | let retryAfter = response.value(forHTTPHeaderField: "Retry-After")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
438 | .flatMap { Int($0.trimmingCharacters(in: .whitespaces)) }
439 | let detail = ShopSavvyErrorDetail(
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:438:55: error: cannot infer contextual base in reference to member 'whitespaces'
436 | ?? "Unknown error"
437 | let retryAfter = response.value(forHTTPHeaderField: "Retry-After")
438 | .flatMap { Int($0.trimmingCharacters(in: .whitespaces)) }
| `- error: cannot infer contextual base in reference to member 'whitespaces'
439 | let detail = ShopSavvyErrorDetail(
440 | statusCode: statusCode,
error: emit-module command failed with exit code 1 (use -v to see invocation)
[5/6] Compiling ShopSavvySDK Errors.swift
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:37:10: warning: associated value 'authenticationError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
35 | public enum ShopSavvyError: Error, LocalizedError {
36 | case networkError(String)
37 | case authenticationError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'authenticationError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
38 | case notFoundError(String, detail: ShopSavvyErrorDetail? = nil)
39 | case validationError(String, detail: ShopSavvyErrorDetail? = nil)
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:38:10: warning: associated value 'notFoundError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
36 | case networkError(String)
37 | case authenticationError(String, detail: ShopSavvyErrorDetail? = nil)
38 | case notFoundError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'notFoundError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
39 | case validationError(String, detail: ShopSavvyErrorDetail? = nil)
40 | case rateLimitError(String, detail: ShopSavvyErrorDetail? = nil)
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:39:10: warning: associated value 'validationError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
37 | case authenticationError(String, detail: ShopSavvyErrorDetail? = nil)
38 | case notFoundError(String, detail: ShopSavvyErrorDetail? = nil)
39 | case validationError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'validationError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
40 | case rateLimitError(String, detail: ShopSavvyErrorDetail? = nil)
41 | /// `ERR_CREDITS_EXHAUSTED` (HTTP 429). Do not retry: credits come back when the billing period
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:40:10: warning: associated value 'rateLimitError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
38 | case notFoundError(String, detail: ShopSavvyErrorDetail? = nil)
39 | case validationError(String, detail: ShopSavvyErrorDetail? = nil)
40 | case rateLimitError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'rateLimitError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
41 | /// `ERR_CREDITS_EXHAUSTED` (HTTP 429). Do not retry: credits come back when the billing period
42 | /// resets or the plan is upgraded. Deliberately separate from `rateLimitError`.
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:43:10: warning: associated value 'creditsExhaustedError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
41 | /// `ERR_CREDITS_EXHAUSTED` (HTTP 429). Do not retry: credits come back when the billing period
42 | /// resets or the plan is upgraded. Deliberately separate from `rateLimitError`.
43 | case creditsExhaustedError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'creditsExhaustedError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
44 | case apiError(String, detail: ShopSavvyErrorDetail? = nil)
45 | case decodingError(String)
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:44:10: warning: associated value 'apiError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
42 | /// resets or the plan is upgraded. Deliberately separate from `rateLimitError`.
43 | case creditsExhaustedError(String, detail: ShopSavvyErrorDetail? = nil)
44 | case apiError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'apiError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
45 | case decodingError(String)
46 |
[6/6] Emitting module ShopSavvySDK
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:37:10: warning: associated value 'authenticationError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
35 | public enum ShopSavvyError: Error, LocalizedError {
36 | case networkError(String)
37 | case authenticationError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'authenticationError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
38 | case notFoundError(String, detail: ShopSavvyErrorDetail? = nil)
39 | case validationError(String, detail: ShopSavvyErrorDetail? = nil)
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:38:10: warning: associated value 'notFoundError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
36 | case networkError(String)
37 | case authenticationError(String, detail: ShopSavvyErrorDetail? = nil)
38 | case notFoundError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'notFoundError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
39 | case validationError(String, detail: ShopSavvyErrorDetail? = nil)
40 | case rateLimitError(String, detail: ShopSavvyErrorDetail? = nil)
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:39:10: warning: associated value 'validationError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
37 | case authenticationError(String, detail: ShopSavvyErrorDetail? = nil)
38 | case notFoundError(String, detail: ShopSavvyErrorDetail? = nil)
39 | case validationError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'validationError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
40 | case rateLimitError(String, detail: ShopSavvyErrorDetail? = nil)
41 | /// `ERR_CREDITS_EXHAUSTED` (HTTP 429). Do not retry: credits come back when the billing period
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:40:10: warning: associated value 'rateLimitError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
38 | case notFoundError(String, detail: ShopSavvyErrorDetail? = nil)
39 | case validationError(String, detail: ShopSavvyErrorDetail? = nil)
40 | case rateLimitError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'rateLimitError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
41 | /// `ERR_CREDITS_EXHAUSTED` (HTTP 429). Do not retry: credits come back when the billing period
42 | /// resets or the plan is upgraded. Deliberately separate from `rateLimitError`.
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:43:10: warning: associated value 'creditsExhaustedError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
41 | /// `ERR_CREDITS_EXHAUSTED` (HTTP 429). Do not retry: credits come back when the billing period
42 | /// resets or the plan is upgraded. Deliberately separate from `rateLimitError`.
43 | case creditsExhaustedError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'creditsExhaustedError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
44 | case apiError(String, detail: ShopSavvyErrorDetail? = nil)
45 | case decodingError(String)
/host/spi-builder-workspace/Sources/ShopSavvySDK/Errors.swift:44:10: warning: associated value 'apiError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
3 | /// Structured detail the API attaches to an error response. Every field is nil when the
4 | /// server did not send it (older responses have no `error_detail`).
5 | public struct ShopSavvyErrorDetail: Equatable {
| `- note: consider making struct 'ShopSavvyErrorDetail' conform to the 'Sendable' protocol
6 | /// HTTP status of the failed response.
7 | public let statusCode: Int?
:
42 | /// resets or the plan is upgraded. Deliberately separate from `rateLimitError`.
43 | case creditsExhaustedError(String, detail: ShopSavvyErrorDetail? = nil)
44 | case apiError(String, detail: ShopSavvyErrorDetail? = nil)
| `- warning: associated value 'apiError(_:detail:)' of 'Sendable'-conforming enum 'ShopSavvyError' has non-sendable type 'ShopSavvyErrorDetail'; this is an error in the Swift 6 language mode
45 | case decodingError(String)
46 |
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:26:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | private let apiKey: String
25 | private let baseURL: String
26 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | private let decoder: JSONDecoder
28 | private let encoder: JSONEncoder
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:43:96: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | /// - configuration: Base `URLSessionConfiguration` (proxies, `protocolClasses`, caching).
42 | /// The timeout intervals above are applied on top of it.
43 | public init(apiKey: String, baseURL: String, timeoutInterval: TimeInterval, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | guard !apiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
45 | fatalError("API key is required. Get one at https://shopsavvy.com/data")
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:43:123: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
41 | /// - configuration: Base `URLSessionConfiguration` (proxies, `protocolClasses`, caching).
42 | /// The timeout intervals above are applied on top of it.
43 | public init(apiKey: String, baseURL: String, timeoutInterval: TimeInterval, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
44 | guard !apiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
45 | fatalError("API key is required. Get one at https://shopsavvy.com/data")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:415:47: error: cannot find type 'URLRequest' in scope
413 |
414 | /// Runs a request whose response is returned as a loose JSON dictionary (batch, webhooks).
415 | private func performRawRequest(_ request: URLRequest) async throws -> [String: Any] {
| `- error: cannot find type 'URLRequest' in scope
416 | let (data, response) = try await session.data(for: request)
417 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:428:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | /// Builds the typed error for a non-2xx response from `error`, `error_detail`, `meta.request_id`
427 | /// and the `Retry-After` header. Routing is by `error_detail.code` first (two codes share 429).
428 | static func apiError(response: HTTPURLResponse, data: Data) -> ShopSavvyError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 | let statusCode = response.statusCode
430 | let root = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any]
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
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-54344844-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from saguaro1/spi-images
Digest: sha256:4a2fa435ac333753e63ed6c656fe70fcece760f0601ff6567c222f81f55cb110
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:android-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/5] Compiling ShopSavvySDK Errors.swift
[3/5] Compiling ShopSavvySDK Models.swift
[4/5] Emitting module ShopSavvySDK
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:26:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | private let apiKey: String
25 | private let baseURL: String
26 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | private let decoder: JSONDecoder
28 | private let encoder: JSONEncoder
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:43:96: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | /// - configuration: Base `URLSessionConfiguration` (proxies, `protocolClasses`, caching).
42 | /// The timeout intervals above are applied on top of it.
43 | public init(apiKey: String, baseURL: String, timeoutInterval: TimeInterval, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | guard !apiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
45 | fatalError("API key is required. Get one at https://shopsavvy.com/data")
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:43:123: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
41 | /// - configuration: Base `URLSessionConfiguration` (proxies, `protocolClasses`, caching).
42 | /// The timeout intervals above are applied on top of it.
43 | public init(apiKey: String, baseURL: String, timeoutInterval: TimeInterval, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
44 | guard !apiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
45 | fatalError("API key is required. Get one at https://shopsavvy.com/data")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:415:47: error: cannot find type 'URLRequest' in scope
413 |
414 | /// Runs a request whose response is returned as a loose JSON dictionary (batch, webhooks).
415 | private func performRawRequest(_ request: URLRequest) async throws -> [String: Any] {
| `- error: cannot find type 'URLRequest' in scope
416 | let (data, response) = try await session.data(for: request)
417 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:428:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | /// Builds the typed error for a non-2xx response from `error`, `error_detail`, `meta.request_id`
427 | /// and the `Retry-After` header. Routing is by `error_detail.code` first (two codes share 429).
428 | static func apiError(response: HTTPURLResponse, data: Data) -> ShopSavvyError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 | let statusCode = response.statusCode
430 | let root = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any]
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
[5/5] Compiling ShopSavvySDK ShopSavvyClient.swift
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:26:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
24 | private let apiKey: String
25 | private let baseURL: String
26 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
27 | private let decoder: JSONDecoder
28 | private let encoder: JSONEncoder
Foundation.URLSession:2:18: note: 'URLSession' 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 URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:43:96: error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
41 | /// - configuration: Base `URLSessionConfiguration` (proxies, `protocolClasses`, caching).
42 | /// The timeout intervals above are applied on top of it.
43 | public init(apiKey: String, baseURL: String, timeoutInterval: TimeInterval, configuration: URLSessionConfiguration = .default) {
| `- error: 'URLSessionConfiguration' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
44 | guard !apiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
45 | fatalError("API key is required. Get one at https://shopsavvy.com/data")
Foundation.URLSessionConfiguration:2:18: note: 'URLSessionConfiguration' 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 URLSessionConfiguration = AnyObject
| `- note: 'URLSessionConfiguration' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:43:123: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
41 | /// - configuration: Base `URLSessionConfiguration` (proxies, `protocolClasses`, caching).
42 | /// The timeout intervals above are applied on top of it.
43 | public init(apiKey: String, baseURL: String, timeoutInterval: TimeInterval, configuration: URLSessionConfiguration = .default) {
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
44 | guard !apiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty else {
45 | fatalError("API key is required. Get one at https://shopsavvy.com/data")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:415:47: error: cannot find type 'URLRequest' in scope
413 |
414 | /// Runs a request whose response is returned as a loose JSON dictionary (batch, webhooks).
415 | private func performRawRequest(_ request: URLRequest) async throws -> [String: Any] {
| `- error: cannot find type 'URLRequest' in scope
416 | let (data, response) = try await session.data(for: request)
417 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:428:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
426 | /// Builds the typed error for a non-2xx response from `error`, `error_detail`, `meta.request_id`
427 | /// and the `Retry-After` header. Routing is by `error_detail.code` first (two codes share 429).
428 | static func apiError(response: HTTPURLResponse, data: Data) -> ShopSavvyError {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 | let statusCode = response.statusCode
430 | let root = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any]
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:55:23: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForRequest'
53 | self.baseURL = baseURL
54 |
55 | configuration.timeoutIntervalForRequest = timeoutInterval
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForRequest'
56 | configuration.timeoutIntervalForResource = timeoutInterval
57 | self.session = URLSession(configuration: configuration)
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:56:23: error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForResource'
54 |
55 | configuration.timeoutIntervalForRequest = timeoutInterval
56 | configuration.timeoutIntervalForResource = timeoutInterval
| `- error: value of type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'timeoutIntervalForResource'
57 | self.session = URLSession(configuration: configuration)
58 |
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:57:24: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
55 | configuration.timeoutIntervalForRequest = timeoutInterval
56 | configuration.timeoutIntervalForResource = timeoutInterval
57 | self.session = URLSession(configuration: configuration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
58 |
59 | self.decoder = JSONDecoder()
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:302:23: error: cannot find 'URLRequest' in scope
300 | let jsonData = try JSONSerialization.data(withJSONObject: body)
301 |
302 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
303 | request.httpMethod = "POST"
304 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:315:23: error: cannot find 'URLRequest' in scope
313 | public func getBatchStatus(batchId: String) async throws -> [String: Any] {
314 | let url = URL(string: "\(baseURL)/batch/\(batchId)")!
315 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
316 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
317 | request.setValue("ShopSavvy-Swift-SDK/\(VERSION)", forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:323:23: error: cannot find 'URLRequest' in scope
321 | public func createWebhook(url: String, events: [String]) async throws -> [String: Any] {
322 | let webhookUrl = URL(string: "\(baseURL)/webhooks")!
323 | var request = URLRequest(url: webhookUrl)
| `- error: cannot find 'URLRequest' in scope
324 | request.httpMethod = "POST"
325 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:333:23: error: cannot find 'URLRequest' in scope
331 |
332 | public func listWebhooks() async throws -> [String: Any] {
333 | var request = URLRequest(url: URL(string: "\(baseURL)/webhooks")!)
| `- error: cannot find 'URLRequest' in scope
334 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
335 | request.setValue("ShopSavvy-Swift-SDK/\(VERSION)", forHTTPHeaderField: "User-Agent")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:341:23: error: cannot find 'URLRequest' in scope
339 | public func testWebhook(webhookId: String) async throws -> [String: Any] {
340 | let testUrl = URL(string: "\(baseURL)/webhooks/\(webhookId)/test")!
341 | var request = URLRequest(url: testUrl)
| `- error: cannot find 'URLRequest' in scope
342 | request.httpMethod = "POST"
343 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:355:23: error: cannot find 'URLRequest' in scope
353 | }
354 | let updateUrl = URL(string: "\(baseURL)/webhooks/\(webhookId)")!
355 | var request = URLRequest(url: updateUrl)
| `- error: cannot find 'URLRequest' in scope
356 | request.httpMethod = "PUT"
357 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:370:23: error: cannot find 'URLRequest' in scope
368 | public func deleteWebhook(webhookId: String) async throws -> [String: Any] {
369 | let delUrl = URL(string: "\(baseURL)/webhooks/\(webhookId)")!
370 | var request = URLRequest(url: delUrl)
| `- error: cannot find 'URLRequest' in scope
371 | request.httpMethod = "DELETE"
372 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:387:23: error: cannot find 'URLRequest' in scope
385 |
386 | private func performRequest<T: Codable>(url: URL, method: String = "GET", body: Codable? = nil) async throws -> T {
387 | var request = URLRequest(url: url)
| `- error: cannot find 'URLRequest' in scope
388 | request.httpMethod = method
389 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:397:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
395 | }
396 |
397 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
398 |
399 | guard let httpResponse = response as? HTTPURLResponse else {
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:416:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
414 | /// Runs a request whose response is returned as a loose JSON dictionary (batch, webhooks).
415 | private func performRawRequest(_ request: URLRequest) async throws -> [String: Any] {
416 | let (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
417 | guard let httpResponse = response as? HTTPURLResponse else {
418 | throw ShopSavvyError.networkError("Invalid response type")
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:429:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
427 | /// and the `Retry-After` header. Routing is by `error_detail.code` first (two codes share 429).
428 | static func apiError(response: HTTPURLResponse, data: Data) -> ShopSavvyError {
429 | let statusCode = response.statusCode
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
430 | let root = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any]
431 | let errorDetail = root?["error_detail"] as? [String: Any]
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:437:35: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
435 | ?? String(data: data, encoding: .utf8).flatMap { $0.isEmpty ? nil : $0 }
436 | ?? "Unknown error"
437 | let retryAfter = response.value(forHTTPHeaderField: "Retry-After")
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
438 | .flatMap { Int($0.trimmingCharacters(in: .whitespaces)) }
439 | let detail = ShopSavvyErrorDetail(
/host/spi-builder-workspace/Sources/ShopSavvySDK/ShopSavvyClient.swift:438:55: error: cannot infer contextual base in reference to member 'whitespaces'
436 | ?? "Unknown error"
437 | let retryAfter = response.value(forHTTPHeaderField: "Retry-After")
438 | .flatMap { Int($0.trimmingCharacters(in: .whitespaces)) }
| `- error: cannot infer contextual base in reference to member 'whitespaces'
439 | let detail = ShopSavvyErrorDetail(
440 | statusCode: statusCode,
BUILD FAILURE 6.1 android