Build Information
Successful build of swift-api-client, reference 1.74.1 (609467), with Swift 6.1 for macOS (SPM) on 17 Apr 2026 03:38:00 UTC.
Swift 6 data race errors: 12
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -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 InferSendableFromCapturesBuild Log
58 | }
59 | return try await next(request, configs)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/HTTPClientMiddleware.swift:57:33: warning: capture of 'middleware' with non-sendable type 'any HTTPClientMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public protocol HTTPClientMiddleware {
| `- note: protocol 'HTTPClientMiddleware' does not conform to the 'Sendable' protocol
4 |
5 | //#if swift(>=6.0)
:
55 | var next = next
56 | for middleware in middlewares {
57 | next = { [next] in try await middleware.execute(request: $0, configs: $1, next: next) }
| `- warning: capture of 'middleware' with non-sendable type 'any HTTPClientMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
58 | }
59 | return try await next(request, configs)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/HTTPClientMiddleware.swift:57:33: warning: capture of 'middleware' with non-sendable type 'any HTTPClientMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public protocol HTTPClientMiddleware {
| `- note: protocol 'HTTPClientMiddleware' does not conform to the 'Sendable' protocol
4 |
5 | //#if swift(>=6.0)
:
55 | var next = next
56 | for middleware in middlewares {
57 | next = { [next] in try await middleware.execute(request: $0, configs: $1, next: next) }
| `- warning: capture of 'middleware' with non-sendable type 'any HTTPClientMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
58 | }
59 | return try await next(request, configs)
[485/509] Emitting module SwiftAPIClient
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/APIClientConfigs.swift:12:15: warning: stored property 'values' of 'Sendable'-conforming struct 'Configs' has non-sendable type '[PartialKeyPath<APIClient.Configs> : Any]'; this is an error in the Swift 6 language mode
10 | struct Configs: Sendable {
11 |
12 | private var values: [PartialKeyPath<APIClient.Configs>: Any] = [:]
| `- warning: stored property 'values' of 'Sendable'-conforming struct 'Configs' has non-sendable type '[PartialKeyPath<APIClient.Configs> : Any]'; this is an error in the Swift 6 language mode
13 |
14 | /// Initializes a new configuration set for `APIClient`.
Swift.PartialKeyPath:1:14: note: generic class 'PartialKeyPath' does not conform to the 'Sendable' protocol
1 | public class PartialKeyPath<Root> : AnyKeyPath {
| `- note: generic class 'PartialKeyPath' does not conform to the 'Sendable' protocol
2 | @objc deinit
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/APIClientConfigs.swift:12:15: warning: stored property 'values' of 'Sendable'-conforming struct 'Configs' has non-sendable type '[PartialKeyPath<APIClient.Configs> : Any]'; this is an error in the Swift 6 language mode
10 | struct Configs: Sendable {
11 |
12 | private var values: [PartialKeyPath<APIClient.Configs>: Any] = [:]
| `- warning: stored property 'values' of 'Sendable'-conforming struct 'Configs' has non-sendable type '[PartialKeyPath<APIClient.Configs> : Any]'; this is an error in the Swift 6 language mode
13 |
14 | /// Initializes a new configuration set for `APIClient`.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/NoneLogger.swift:14:16: warning: deprecated default implementation is used to satisfy instance method 'log(event:)' required by protocol 'LogHandler': You should implement this method instead of using the default implementation
12 | }
13 |
14 | private struct NoneLogger: LogHandler {
| `- warning: deprecated default implementation is used to satisfy instance method 'log(event:)' required by protocol 'LogHandler': You should implement this method instead of using the default implementation
15 |
16 | var metadata: Logger.Metadata = [:]
/Users/admin/builder/spi-builder-workspace/.build/checkouts/swift-log/Sources/Logging/LogHandler.swift:256:17: note: 'log(event:)' declared here
143 | ///
144 | /// - Parameter event: The log event containing the level, message, metadata, and source location.
145 | func log(event: LogEvent)
| `- note: requirement 'log(event:)' declared here
146 |
147 | /// Please do _not_ implement this method when you create a `LogHandler` implementation.
:
254 | /// Implement ``log(event:)`` in your ``LogHandler`` instead.
255 | @available(*, deprecated, message: "You should implement this method instead of using the default implementation")
256 | public func log(event: LogEvent) {
| `- note: 'log(event:)' declared here
257 | self.log(
258 | level: event.level,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:484:28: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
482 | let backoffPolicy = configs.retryBackoffPolicy
483 | if let hash = backoffPolicy.scopeHash(request) {
484 | if let interval = await waitForSynchronizedAccess(id: hash, of: UInt64.self) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
485 | try await Task.sleep(nanoseconds: configs.retryJitterConfigs.delay(for: interval))
486 | }
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/RetryModifier.swift:509:21: warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
507 | Logger(label: "SwiftAPIClient")
508 | .trace("Backing off requests to '\(hash.base)' for \(Double(interval) / 1_000_000_000) seconds due to \(response.status) status code.")
509 | _ = try await withThrowingSynchronizedAccess(id: hash) {
| `- warning: conformance of 'AnyHashable' to 'Sendable' is unavailable; this is an error in the Swift 6 language mode
510 | try await Task.sleep(nanoseconds: interval)
511 | return interval
Swift.AnyHashable:2:11: note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
1 | @available(*, unavailable)
2 | extension AnyHashable : Sendable {
| `- note: conformance of 'AnyHashable' to 'Sendable' has been explicitly marked unavailable here
3 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
62 | let id: (HTTPRequestComponents) -> ID
63 |
64 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
65 | request: HTTPRequestComponents,
66 | configs: APIClient.Configs,
:
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| `- warning: non-sendable result type '(T, HTTPResponse)?' cannot be sent from actor-isolated context in call to instance method 'response(for:)'; this is an error in the Swift 6 language mode
75 | return response
76 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:164:13: warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
157 | let line: UInt
158 |
159 | func execute<T>(
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
160 | request: HTTPRequestComponents,
161 | configs: APIClient.Configs,
162 | next: @escaping Next<T>
163 | ) async throws -> (T, HTTPResponse) {
164 | try await withTimeout(
| `- warning: type 'T' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
165 | timeout,
166 | seconds: { _ in seconds },
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/URLSessionModifiers.swift:35:13: warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
33 | private extension URLSession {
34 |
35 | static var apiClient: URLSession = {
| |- warning: static property 'apiClient' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'apiClient' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'apiClient' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
36 | var configs = URLSessionConfiguration.default
37 | configs.headers = .default
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:74:52: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
72 | }
73 | let requestID = id(request)
74 | if let response: (T, HTTPResponse) = await cache.response(for: requestID) {
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'ID' to actor-isolated instance method 'response(for:)' risks causing data races between actor-isolated and local nonisolated uses
75 | return response
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| `- note: access can happen concurrently
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'value' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
82 | }
83 | return (value, httpResponse)
| `- note: access can happen concurrently
84 | }
85 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:78:15: warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
76 | }
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
| |- warning: sending value of non-Sendable type 'AnyHashable' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending value of non-Sendable type 'AnyHashable' to actor-isolated instance method 'setResponse(response:for:)' risks causing data races between actor-isolated and local nonisolated uses
79 | Task {
| `- note: access can happen concurrently
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:79:8: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
77 | let (value, httpResponse) = try await next(request, configs)
78 | await cache.setResponse(response: (value, httpResponse), for: requestID)
79 | Task {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| `- note: closure captures 'self' which is accessible to code in the current task
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/ThrottleModifier.swift:81:16: warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
79 | Task {
80 | try? await Task.sleep(nanoseconds: UInt64(interval * 1_000_000_000))
81 | await cache.removeResponse(for: requestID)
| |- warning: sending value of non-Sendable type 'ID' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'ID' to actor-isolated instance method 'removeResponse(for:)' risks causing races in between task-isolated and actor-isolated uses
82 | }
83 | return (value, httpResponse)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:174:61: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
172 | refreshToken: String?
173 | ) async throws -> (String, String?, Date?) {
174 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
175 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- note: closure captures 'self' which is accessible to code in the current task
176 | try await tokenCacheService.save(token, for: .accessToken)
177 | if let refreshToken {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:138:108: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | refreshToken = try await tokenCacheService.load(for: .refreshToken)
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
139 | try await requestToken(configs)
| `- note: closure captures 'requestToken' which is accessible to code in the current task
140 | }
141 | } else {
Build complete! (39.83s)
Fetching https://github.com/apple/swift-http-types.git from cache
Fetching https://github.com/apple/swift-log.git from cache
Fetching https://github.com/apple/swift-metrics.git from cache
Fetching https://github.com/swiftlang/swift-syntax from cache
Fetched https://github.com/apple/swift-http-types.git from cache (0.69s)
Fetched https://github.com/apple/swift-metrics.git from cache (1.95s)
Fetched https://github.com/apple/swift-log.git from cache (1.98s)
Fetched https://github.com/swiftlang/swift-syntax from cache (2.05s)
Computing version for https://github.com/apple/swift-http-types.git
Computed https://github.com/apple/swift-http-types.git at 1.5.1 (2.67s)
Computing version for https://github.com/apple/swift-metrics.git
Computed https://github.com/apple/swift-metrics.git at 2.10.0 (0.54s)
Computing version for https://github.com/swiftlang/swift-syntax
Computed https://github.com/swiftlang/swift-syntax at 603.0.0 (3.57s)
Computing version for https://github.com/apple/swift-log.git
Computed https://github.com/apple/swift-log.git at 1.12.0 (0.50s)
Creating working copy for https://github.com/apple/swift-log.git
Working copy of https://github.com/apple/swift-log.git resolved at 1.12.0
Creating working copy for https://github.com/apple/swift-metrics.git
Working copy of https://github.com/apple/swift-metrics.git resolved at 2.10.0
Creating working copy for https://github.com/apple/swift-http-types.git
Working copy of https://github.com/apple/swift-http-types.git resolved at 1.5.1
Creating working copy for https://github.com/swiftlang/swift-syntax
Working copy of https://github.com/swiftlang/swift-syntax resolved at 603.0.0
Build complete.
{
"dependencies" : [
{
"identity" : "swift-log",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-log.git"
},
{
"identity" : "swift-http-types",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-http-types.git"
},
{
"identity" : "swift-metrics",
"requirement" : {
"range" : [
{
"lower_bound" : "2.4.0",
"upper_bound" : "3.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-metrics.git"
},
{
"identity" : "swift-syntax",
"requirement" : {
"range" : [
{
"lower_bound" : "509.0.0",
"upper_bound" : "700.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/swiftlang/swift-syntax"
}
],
"manifest_display_name" : "swift-api-client",
"name" : "swift-api-client",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.15"
},
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "watchos",
"version" : "5.0"
},
{
"name" : "tvos",
"version" : "13.0"
}
],
"products" : [
{
"name" : "SwiftAPIClient",
"targets" : [
"SwiftAPIClient"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "SwiftAPIClientMacros",
"targets" : [
"SwiftAPIClientMacros"
],
"type" : {
"macro" : null
}
}
],
"targets" : [
{
"c99name" : "SwiftAPIClientTests",
"module_type" : "SwiftTarget",
"name" : "SwiftAPIClientTests",
"path" : "Tests/SwiftAPIClientTests",
"sources" : [
"CURLTests.swift",
"EncodersTests/MultipartFormDataTests.swift",
"HTTPHeadersEncoderTests.swift",
"Modifiers/AuthModifierTests.swift",
"Modifiers/ErrorDecodingTests.swift",
"Modifiers/HTTPResponseValidatorTests.swift",
"Modifiers/LogLevelModifierTests.swift",
"Modifiers/LoggingAndListenerTests.swift",
"Modifiers/MockResponsesTests.swift",
"Modifiers/QueryParameterMiddlewareTests.swift",
"Modifiers/RequestCompressionTests.swift",
"Modifiers/RequestModifiersTests.swift",
"Modifiers/RetryModifierTests.swift",
"NetworkClientTests.swift",
"TestUtils/Client+Ext.swift",
"TestUtils/QueryParameterMiddleware.swift",
"TestUtils/TestHTTPClient.swift",
"URLQueryEncoderTests.swift",
"UtilsTests/URLComponentBuilderTests.swift",
"UtilsTests/WithTimeoutTests.swift"
],
"target_dependencies" : [
"SwiftAPIClient"
],
"type" : "test"
},
{
"c99name" : "SwiftAPIClientMacrosTests",
"module_type" : "SwiftTarget",
"name" : "SwiftAPIClientMacrosTests",
"path" : "Tests/SwiftAPIClientMacrosTests",
"product_dependencies" : [
"SwiftSyntaxMacrosTestSupport"
],
"sources" : [
"APIMacroTests.swift",
"CallMacroTests.swift",
"PathMacroTests.swift"
],
"target_dependencies" : [
"SwiftAPIClientMacros"
],
"type" : "test"
},
{
"c99name" : "SwiftAPIClientMacros",
"module_type" : "SwiftTarget",
"name" : "SwiftAPIClientMacros",
"path" : "Sources/SwiftAPIClientMacros",
"product_dependencies" : [
"SwiftSyntaxMacros",
"SwiftCompilerPlugin"
],
"product_memberships" : [
"SwiftAPIClient",
"SwiftAPIClientMacros"
],
"sources" : [
"Collection++.swift",
"MacroError.swift",
"String++.swift",
"SwiftAPIClientMacros.swift"
],
"type" : "macro"
},
{
"c99name" : "SwiftAPIClient",
"module_type" : "SwiftTarget",
"name" : "SwiftAPIClient",
"path" : "Sources/SwiftAPIClient",
"product_dependencies" : [
"Logging",
"HTTPTypes",
"HTTPTypesFoundation",
"Metrics"
],
"product_memberships" : [
"SwiftAPIClient"
],
"sources" : [
"APIClient.swift",
"APIClientCaller.swift",
"APIClientConfigs.swift",
"APIClientType.swift",
"Clients/HTTPClient.swift",
"Clients/HTTPDownloadClient.swift",
"Clients/HTTPPublisher.swift",
"Clients/HTTPUploadClient.swift",
"Clients/URLSession+Client.swift",
"Extensions/Async++.swift",
"Extensions/String++.swift",
"Extensions/URLComponentBuilder.swift",
"Extensions/URLResponse++.swift",
"Imports.swift",
"Macros.swift",
"Modifiers/AuthModifier.swift",
"Modifiers/BackgroundModifiers.swift",
"Modifiers/CodeLocation.swift",
"Modifiers/CodersModifiers.swift",
"Modifiers/ErrorDecodeModifiers.swift",
"Modifiers/ErrorHandler.swift",
"Modifiers/HTTPClientMiddleware.swift",
"Modifiers/HTTPResponseValidator.swift",
"Modifiers/ListenerModifiers.swift",
"Modifiers/LoggingModifier.swift",
"Modifiers/MetricsModifier.swift",
"Modifiers/MockResponses.swift",
"Modifiers/RateLimitModifier.swift",
"Modifiers/RedirectModifier.swift",
"Modifiers/RequestCompression.swift",
"Modifiers/RequestModifiers.swift",
"Modifiers/RequestValidator.swift",
"Modifiers/ResponseWrapModifires.swift",
"Modifiers/RetryModifier.swift",
"Modifiers/ThrottleModifier.swift",
"Modifiers/TimeoutModifiers.swift",
"Modifiers/TokenRefresher/TokenCacheService.swift",
"Modifiers/TokenRefresher/TokenRefresher.swift",
"Modifiers/URLSessionModifiers.swift",
"Modifiers/WaitForConnectionModifier.swift",
"RequestBuilder.swift",
"Types/AsyncValue.swift",
"Types/ContentSerializer.swift",
"Types/ContentType.swift",
"Types/Errors.swift",
"Types/HTTPFields.swift",
"Types/HTTPRequestComponents.swift",
"Types/LoggingComponent.swift",
"Types/Mockable.swift",
"Types/RedirectBehaviour.swift",
"Types/Serializer.swift",
"Types/TimeoutError.swift",
"Utils/AnyAsyncSequence.swift",
"Utils/AnyEncodable.swift",
"Utils/Coders/ContentEncoder.swift",
"Utils/Coders/DataDecoder.swift",
"Utils/Coders/EncodingStrategies.swift",
"Utils/Coders/ErrorDecoder.swift",
"Utils/Coders/FormURLEncoder.swift",
"Utils/Coders/HeadersEncoder.swift",
"Utils/Coders/JSONContentEncoders.swift",
"Utils/Coders/MultipartFormData/MultipartFormData.swift",
"Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift",
"Utils/Coders/ParametersEncoder.swift",
"Utils/Coders/ParametersValue.swift",
"Utils/Coders/QueryEncoder.swift",
"Utils/Coders/URLQuery/HTTPHeadersEncoder.swift",
"Utils/Coders/URLQuery/PlainCodingKey.swift",
"Utils/Coders/URLQuery/Ref.swift",
"Utils/Coders/URLQuery/URLQueryEncoder.swift",
"Utils/ConsoleStyle.swift",
"Utils/Error+String.swift",
"Utils/NoneLogger.swift",
"Utils/Publisher+Create.swift",
"Utils/Publishers+Task.swift",
"Utils/Reachability.swift",
"Utils/Status+Ext.swift",
"Utils/URLSessionDelegateWrapper.swift",
"Utils/UpdateMetrics.swift",
"Utils/WithSynchronizedAccess.swift"
],
"target_dependencies" : [
"SwiftAPIClientMacros"
],
"type" : "library"
}
],
"tools_version" : "5.9"
}
Done.