Build Information
Successful build of swift-api-client, reference main (b098f1
), with Swift 6.1 for macOS (SPM) on 30 Apr 2025 22:11:28 UTC.
Swift 6 data race errors: 74
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 InferSendableFromCaptures
Build Log
:
19 | public static let location = LoggingComponents(rawValue: 1 << 10)
20 | public static let onRequest = LoggingComponents(rawValue: 1 << 11)
21 | public static let cURL = LoggingComponents(rawValue: 1 << 12)
| |- warning: static property 'cURL' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'cURL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
22 |
23 | public static var url: LoggingComponents { [.path, .baseURL, .query] }
[450/466] Compiling SwiftAPIClient ParametersValue.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:124:21: warning: static property 'utf8' is not concurrency-safe because non-'Sendable' type 'ContentType.Charset' may have shared mutable state; this is an error in the Swift 6 language mode
109 |
110 | /// Predefined application content types.
111 | struct Charset: RawRepresentable, ExpressibleByStringLiteral, Hashable {
| `- note: consider making struct 'Charset' conform to the 'Sendable' protocol
112 |
113 | public var rawValue: String
:
122 |
123 | /// `utf8`
124 | public static let utf8: Charset = "utf-8"
| |- warning: static property 'utf8' is not concurrency-safe because non-'Sendable' type 'ContentType.Charset' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'utf8' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
125 | }
126 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:141:21: warning: static property 'json' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
126 |
127 | /// Predefined application content types.
128 | struct Application: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Application' conform to the 'Sendable' protocol
129 |
130 | public var rawValue: String
:
139 |
140 | /// `json`
141 | public static let json: Application = "json"
| |- warning: static property 'json' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'json' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
142 | /// `schema+json`
143 | public static let schemaJson: Application = "schema+json"
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:143:21: warning: static property 'schemaJson' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
126 |
127 | /// Predefined application content types.
128 | struct Application: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Application' conform to the 'Sendable' protocol
129 |
130 | public var rawValue: String
:
141 | public static let json: Application = "json"
142 | /// `schema+json`
143 | public static let schemaJson: Application = "schema+json"
| |- warning: static property 'schemaJson' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'schemaJson' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
144 | /// `schema-instance+json`
145 | public static let schemaInstanceJson: Application = "schema-instance+json"
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:145:21: warning: static property 'schemaInstanceJson' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
126 |
127 | /// Predefined application content types.
128 | struct Application: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Application' conform to the 'Sendable' protocol
129 |
130 | public var rawValue: String
:
143 | public static let schemaJson: Application = "schema+json"
144 | /// `schema-instance+json`
145 | public static let schemaInstanceJson: Application = "schema-instance+json"
| |- warning: static property 'schemaInstanceJson' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'schemaInstanceJson' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
146 | /// `xml`
147 | public static let xml: Application = "xml"
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:147:21: warning: static property 'xml' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
126 |
127 | /// Predefined application content types.
128 | struct Application: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Application' conform to the 'Sendable' protocol
129 |
130 | public var rawValue: String
:
145 | public static let schemaInstanceJson: Application = "schema-instance+json"
146 | /// `xml`
147 | public static let xml: Application = "xml"
| |- warning: static property 'xml' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'xml' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
148 | /// `octet-stream`
149 | public static let octetStream: Application = "octet-stream"
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:149:21: warning: static property 'octetStream' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
126 |
127 | /// Predefined application content types.
128 | struct Application: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Application' conform to the 'Sendable' protocol
129 |
130 | public var rawValue: String
:
147 | public static let xml: Application = "xml"
148 | /// `octet-stream`
149 | public static let octetStream: Application = "octet-stream"
| |- warning: static property 'octetStream' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'octetStream' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
150 | /// `x-www-form-urlencoded`
151 | public static let urlEncoded: Application = "x-www-form-urlencoded"
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:151:21: warning: static property 'urlEncoded' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
126 |
127 | /// Predefined application content types.
128 | struct Application: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Application' conform to the 'Sendable' protocol
129 |
130 | public var rawValue: String
:
149 | public static let octetStream: Application = "octet-stream"
150 | /// `x-www-form-urlencoded`
151 | public static let urlEncoded: Application = "x-www-form-urlencoded"
| |- warning: static property 'urlEncoded' is not concurrency-safe because non-'Sendable' type 'ContentType.Application' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'urlEncoded' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
152 | }
153 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:174:21: warning: static property 'plain' is not concurrency-safe because non-'Sendable' type 'ContentType.Text' may have shared mutable state; this is an error in the Swift 6 language mode
159 |
160 | /// Predefined text content types.
161 | struct Text: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Text' conform to the 'Sendable' protocol
162 |
163 | public var rawValue: String
:
172 |
173 | /// `plain`
174 | public static let plain: Text = "plain"
| |- warning: static property 'plain' is not concurrency-safe because non-'Sendable' type 'ContentType.Text' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'plain' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
175 | /// `html`
176 | public static let html: Text = "html"
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:176:21: warning: static property 'html' is not concurrency-safe because non-'Sendable' type 'ContentType.Text' may have shared mutable state; this is an error in the Swift 6 language mode
159 |
160 | /// Predefined text content types.
161 | struct Text: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Text' conform to the 'Sendable' protocol
162 |
163 | public var rawValue: String
:
174 | public static let plain: Text = "plain"
175 | /// `html`
176 | public static let html: Text = "html"
| |- warning: static property 'html' is not concurrency-safe because non-'Sendable' type 'ContentType.Text' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'html' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
177 | }
178 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:199:21: warning: static property 'formData' is not concurrency-safe because non-'Sendable' type 'ContentType.Multipart' may have shared mutable state; this is an error in the Swift 6 language mode
184 |
185 | /// Predefined multipart content types.
186 | struct Multipart: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Multipart' conform to the 'Sendable' protocol
187 |
188 | public var rawValue: String
:
197 |
198 | /// `form-data`
199 | public static let formData: Multipart = "form-data"
| |- warning: static property 'formData' is not concurrency-safe because non-'Sendable' type 'ContentType.Multipart' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'formData' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
200 | /// `byteranges`
201 | public static let byteranges: Multipart = "byteranges"
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:201:21: warning: static property 'byteranges' is not concurrency-safe because non-'Sendable' type 'ContentType.Multipart' may have shared mutable state; this is an error in the Swift 6 language mode
184 |
185 | /// Predefined multipart content types.
186 | struct Multipart: RawRepresentable, ExpressibleByStringLiteral {
| `- note: consider making struct 'Multipart' conform to the 'Sendable' protocol
187 |
188 | public var rawValue: String
:
199 | public static let formData: Multipart = "form-data"
200 | /// `byteranges`
201 | public static let byteranges: Multipart = "byteranges"
| |- warning: static property 'byteranges' is not concurrency-safe because non-'Sendable' type 'ContentType.Multipart' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'byteranges' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
202 | }
203 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/ContentType.swift:215:13: warning: static property 'any' is not concurrency-safe because non-'Sendable' type 'ContentType' may have shared mutable state; this is an error in the Swift 6 language mode
4 | ///
5 | /// Example: `.application(.json)` = `application/json`
6 | public struct ContentType: Codable, Hashable, RawRepresentable, ExpressibleByStringLiteral, LosslessStringConvertible {
| `- note: consider making struct 'ContentType' conform to the 'Sendable' protocol
7 |
8 | public typealias RawValue = String
:
213 |
214 | /// `*/*`
215 | static let any = ContentType("*", "*")
| |- warning: static property 'any' is not concurrency-safe because non-'Sendable' type 'ContentType' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'any' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
216 | }
217 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:9:20: warning: static property 'method' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
| |- warning: static property 'method' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'method' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
10 | public static let path = LoggingComponents(rawValue: 1 << 1)
11 | public static let headers = LoggingComponents(rawValue: 1 << 2)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:10:20: warning: static property 'path' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
10 | public static let path = LoggingComponents(rawValue: 1 << 1)
| |- warning: static property 'path' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'path' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 | public static let headers = LoggingComponents(rawValue: 1 << 2)
12 | public static let body = LoggingComponents(rawValue: 1 << 3)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:11:20: warning: static property 'headers' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
10 | public static let path = LoggingComponents(rawValue: 1 << 1)
11 | public static let headers = LoggingComponents(rawValue: 1 << 2)
| |- warning: static property 'headers' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'headers' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 | public static let body = LoggingComponents(rawValue: 1 << 3)
13 | public static let bodySize = LoggingComponents(rawValue: 1 << 4)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:12:20: warning: static property 'body' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
10 | public static let path = LoggingComponents(rawValue: 1 << 1)
11 | public static let headers = LoggingComponents(rawValue: 1 << 2)
12 | public static let body = LoggingComponents(rawValue: 1 << 3)
| |- warning: static property 'body' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'body' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
13 | public static let bodySize = LoggingComponents(rawValue: 1 << 4)
14 | public static let duration = LoggingComponents(rawValue: 1 << 5)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:13:20: warning: static property 'bodySize' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
11 | public static let headers = LoggingComponents(rawValue: 1 << 2)
12 | public static let body = LoggingComponents(rawValue: 1 << 3)
13 | public static let bodySize = LoggingComponents(rawValue: 1 << 4)
| |- warning: static property 'bodySize' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'bodySize' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | public static let duration = LoggingComponents(rawValue: 1 << 5)
15 | public static let statusCode = LoggingComponents(rawValue: 1 << 6)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:14:20: warning: static property 'duration' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
12 | public static let body = LoggingComponents(rawValue: 1 << 3)
13 | public static let bodySize = LoggingComponents(rawValue: 1 << 4)
14 | public static let duration = LoggingComponents(rawValue: 1 << 5)
| |- warning: static property 'duration' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'duration' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | public static let statusCode = LoggingComponents(rawValue: 1 << 6)
16 | public static let baseURL = LoggingComponents(rawValue: 1 << 7)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:15:20: warning: static property 'statusCode' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
13 | public static let bodySize = LoggingComponents(rawValue: 1 << 4)
14 | public static let duration = LoggingComponents(rawValue: 1 << 5)
15 | public static let statusCode = LoggingComponents(rawValue: 1 << 6)
| |- warning: static property 'statusCode' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'statusCode' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 | public static let baseURL = LoggingComponents(rawValue: 1 << 7)
17 | public static let query = LoggingComponents(rawValue: 1 << 8)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:16:20: warning: static property 'baseURL' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
14 | public static let duration = LoggingComponents(rawValue: 1 << 5)
15 | public static let statusCode = LoggingComponents(rawValue: 1 << 6)
16 | public static let baseURL = LoggingComponents(rawValue: 1 << 7)
| |- warning: static property 'baseURL' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'baseURL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | public static let query = LoggingComponents(rawValue: 1 << 8)
18 | public static let uuid = LoggingComponents(rawValue: 1 << 9)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:17:20: warning: static property 'query' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
15 | public static let statusCode = LoggingComponents(rawValue: 1 << 6)
16 | public static let baseURL = LoggingComponents(rawValue: 1 << 7)
17 | public static let query = LoggingComponents(rawValue: 1 << 8)
| |- warning: static property 'query' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'query' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let uuid = LoggingComponents(rawValue: 1 << 9)
19 | public static let location = LoggingComponents(rawValue: 1 << 10)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:18:20: warning: static property 'uuid' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
16 | public static let baseURL = LoggingComponents(rawValue: 1 << 7)
17 | public static let query = LoggingComponents(rawValue: 1 << 8)
18 | public static let uuid = LoggingComponents(rawValue: 1 << 9)
| |- warning: static property 'uuid' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'uuid' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | public static let location = LoggingComponents(rawValue: 1 << 10)
20 | public static let onRequest = LoggingComponents(rawValue: 1 << 11)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:19:20: warning: static property 'location' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
17 | public static let query = LoggingComponents(rawValue: 1 << 8)
18 | public static let uuid = LoggingComponents(rawValue: 1 << 9)
19 | public static let location = LoggingComponents(rawValue: 1 << 10)
| |- warning: static property 'location' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'location' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 | public static let onRequest = LoggingComponents(rawValue: 1 << 11)
21 | public static let cURL = LoggingComponents(rawValue: 1 << 12)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:20:21: warning: static property 'onRequest' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
18 | public static let uuid = LoggingComponents(rawValue: 1 << 9)
19 | public static let location = LoggingComponents(rawValue: 1 << 10)
20 | public static let onRequest = LoggingComponents(rawValue: 1 << 11)
| |- warning: static property 'onRequest' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'onRequest' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
21 | public static let cURL = LoggingComponents(rawValue: 1 << 12)
22 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Types/LoggingComponent.swift:21:21: warning: static property 'cURL' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | /// The components to be logged.
7 | public struct LoggingComponents: OptionSet {
| `- note: consider making struct 'LoggingComponents' conform to the 'Sendable' protocol
8 |
9 | public static let method = LoggingComponents(rawValue: 1 << 0)
:
19 | public static let location = LoggingComponents(rawValue: 1 << 10)
20 | public static let onRequest = LoggingComponents(rawValue: 1 << 11)
21 | public static let cURL = LoggingComponents(rawValue: 1 << 12)
| |- warning: static property 'cURL' is not concurrency-safe because non-'Sendable' type 'LoggingComponents' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'cURL' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
22 |
23 | public static var url: LoggingComponents { [.path, .baseURL, .query] }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:17:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
15 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:18:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
20 | ) -> Self {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:19:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
20 | ) -> Self {
21 | MultipartFormDataEncoder(
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:47:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
45 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:48:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
50 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:49:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
50 | ) {
51 | self.boundary = boundary ?? RandomBoundaryGenerator.defaultBoundary
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:17:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
15 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:18:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
20 | ) -> Self {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:19:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
20 | ) -> Self {
21 | MultipartFormDataEncoder(
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:47:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
45 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:48:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
50 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:49:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
50 | ) {
51 | self.boundary = boundary ?? RandomBoundaryGenerator.defaultBoundary
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:17:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
15 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:18:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
20 | ) -> Self {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:19:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
20 | ) -> Self {
21 | MultipartFormDataEncoder(
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:47:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
45 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:48:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
50 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:49:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
50 | ) {
51 | self.boundary = boundary ?? RandomBoundaryGenerator.defaultBoundary
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:17:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
15 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:18:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
20 | ) -> Self {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:19:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
20 | ) -> Self {
21 | MultipartFormDataEncoder(
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:47:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
45 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:48:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
50 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:49:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
50 | ) {
51 | self.boundary = boundary ?? RandomBoundaryGenerator.defaultBoundary
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:17:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
15 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:18:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
20 | ) -> Self {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:19:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
20 | ) -> Self {
21 | MultipartFormDataEncoder(
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:47:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
45 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:48:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
50 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:49:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
50 | ) {
51 | self.boundary = boundary ?? RandomBoundaryGenerator.defaultBoundary
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:17:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
15 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:18:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
20 | ) -> Self {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:19:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
20 | ) -> Self {
21 | MultipartFormDataEncoder(
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:47:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
45 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:48:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
50 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:49:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
50 | ) {
51 | self.boundary = boundary ?? RandomBoundaryGenerator.defaultBoundary
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:17:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
15 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:18:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
20 | ) -> Self {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:19:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
20 | ) -> Self {
21 | MultipartFormDataEncoder(
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:47:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
45 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:48:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
50 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:49:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
50 | ) {
51 | self.boundary = boundary ?? RandomBoundaryGenerator.defaultBoundary
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:17:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
15 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:18:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
16 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
20 | ) -> Self {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:19:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
17 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
18 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
19 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
20 | ) -> Self {
21 | MultipartFormDataEncoder(
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:47:42: warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
45 | dateEncodingStrategy: JSONEncoder.DateEncodingStrategy = .deferredToDate,
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
| |- warning: 'ArrayEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.ArrayEncodingStrategy'
| `- note: use 'SwiftAPIClient.ArrayEncodingStrategy' instead
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:48:43: warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
46 | keyEncodingStrategy: JSONEncoder.KeyEncodingStrategy = .useDefaultKeys,
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
| |- warning: 'NestedEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.NestedEncodingStrategy'
| `- note: use 'SwiftAPIClient.NestedEncodingStrategy' instead
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
50 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Coders/MultipartFormData/MultipartFormDataEncoder.swift:49:41: warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
47 | arrayEncodingStrategy: URLQueryEncoder.ArrayEncodingStrategy = .commaSeparator,
48 | nestedEncodingStrategy: URLQueryEncoder.NestedEncodingStrategy = .brackets,
49 | boolEncodingStrategy: URLQueryEncoder.BoolEncodingStrategy = .literal
| |- warning: 'BoolEncodingStrategy' is deprecated: renamed to 'SwiftAPIClient.BoolEncodingStrategy'
| `- note: use 'SwiftAPIClient.BoolEncodingStrategy' instead
50 | ) {
51 | self.boundary = boundary ?? RandomBoundaryGenerator.defaultBoundary
/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:143:31: warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | private extension APIClient {
129 |
130 | func timeout<D>(
| `- note: consider making generic parameter 'D' conform to the 'Sendable' protocol
131 | _ timeout: D,
132 | seconds: @escaping @Sendable (D) -> TimeInterval,
:
141 | timeout: timeout,
142 | seconds: inSeconds,
143 | sleep: { try await sleep(timeout) },
| `- warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
144 | fileID: fileID,
145 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:166:20: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
164 | try await withTimeout(
165 | timeout,
166 | seconds: { _ in seconds },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
167 | sleep: { _ in try await sleep() },
168 | fileID: fileID,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:167:28: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
165 | timeout,
166 | seconds: { _ in seconds },
167 | sleep: { _ in try await sleep() },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
168 | fileID: fileID,
169 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenCacheService.swift:148:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | /// The default Keychain token cache service.
148 | public static var `default` = KeychainCacheService()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | public init(service: String? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:139:15: warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
139 | try await requestToken(configs)
| |- warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:173:54: warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
98 | }
99 |
100 | public struct TokenRefresherMiddleware: HTTPClientMiddleware {
| `- note: consider making struct 'TokenRefresherMiddleware' conform to the 'Sendable' protocol
101 |
102 | private let tokenCacheService: SecureCacheService
:
171 | ) async throws -> (String, String?, Date?) {
172 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
173 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
174 | try await tokenCacheService.save(token, for: .accessToken)
175 | if let refreshToken {
/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/WaitForConnectionModifier.swift:23:49: warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
21 | line: line
22 | ) {
23 | if let cached = await Reachabilities.shared.reachabilities[hostname] {
| `- warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
24 | return cached
25 | } else if let hostname {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Reachability.swift:6:20: note: class 'Reachability' does not conform to the 'Sendable' protocol
4 |
5 | /// `Reachability` can be used to monitor the network status of a device.
6 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
7 |
8 | public enum Connection: CustomStringConvertible {
/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/WaitForConnectionModifier.swift:27:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
25 | } else if let hostname {
26 | let reachability = try Reachability(hostname: hostname)
27 | await Reachabilities.shared.set(reachability, for: hostname)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
28 | return reachability
| `- note: access can happen concurrently
29 | } else {
30 | let reachability = try Reachability()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/WaitForConnectionModifier.swift:31:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
29 | } else {
30 | let reachability = try Reachability()
31 | await Reachabilities.shared.set(reachability, for: nil)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
32 | return reachability
| `- note: access can happen concurrently
33 | }
34 | }
/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:143:31: warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | private extension APIClient {
129 |
130 | func timeout<D>(
| `- note: consider making generic parameter 'D' conform to the 'Sendable' protocol
131 | _ timeout: D,
132 | seconds: @escaping @Sendable (D) -> TimeInterval,
:
141 | timeout: timeout,
142 | seconds: inSeconds,
143 | sleep: { try await sleep(timeout) },
| `- warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
144 | fileID: fileID,
145 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:166:20: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
164 | try await withTimeout(
165 | timeout,
166 | seconds: { _ in seconds },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
167 | sleep: { _ in try await sleep() },
168 | fileID: fileID,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:167:28: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
165 | timeout,
166 | seconds: { _ in seconds },
167 | sleep: { _ in try await sleep() },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
168 | fileID: fileID,
169 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenCacheService.swift:148:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | /// The default Keychain token cache service.
148 | public static var `default` = KeychainCacheService()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | public init(service: String? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:139:15: warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
139 | try await requestToken(configs)
| |- warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:173:54: warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
98 | }
99 |
100 | public struct TokenRefresherMiddleware: HTTPClientMiddleware {
| `- note: consider making struct 'TokenRefresherMiddleware' conform to the 'Sendable' protocol
101 |
102 | private let tokenCacheService: SecureCacheService
:
171 | ) async throws -> (String, String?, Date?) {
172 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
173 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
174 | try await tokenCacheService.save(token, for: .accessToken)
175 | if let refreshToken {
/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/WaitForConnectionModifier.swift:23:49: warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
21 | line: line
22 | ) {
23 | if let cached = await Reachabilities.shared.reachabilities[hostname] {
| `- warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
24 | return cached
25 | } else if let hostname {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Reachability.swift:6:20: note: class 'Reachability' does not conform to the 'Sendable' protocol
4 |
5 | /// `Reachability` can be used to monitor the network status of a device.
6 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
7 |
8 | public enum Connection: CustomStringConvertible {
/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/WaitForConnectionModifier.swift:27:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
25 | } else if let hostname {
26 | let reachability = try Reachability(hostname: hostname)
27 | await Reachabilities.shared.set(reachability, for: hostname)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
28 | return reachability
| `- note: access can happen concurrently
29 | } else {
30 | let reachability = try Reachability()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/WaitForConnectionModifier.swift:31:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
29 | } else {
30 | let reachability = try Reachability()
31 | await Reachabilities.shared.set(reachability, for: nil)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
32 | return reachability
| `- note: access can happen concurrently
33 | }
34 | }
/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:143:31: warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | private extension APIClient {
129 |
130 | func timeout<D>(
| `- note: consider making generic parameter 'D' conform to the 'Sendable' protocol
131 | _ timeout: D,
132 | seconds: @escaping @Sendable (D) -> TimeInterval,
:
141 | timeout: timeout,
142 | seconds: inSeconds,
143 | sleep: { try await sleep(timeout) },
| `- warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
144 | fileID: fileID,
145 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:166:20: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
164 | try await withTimeout(
165 | timeout,
166 | seconds: { _ in seconds },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
167 | sleep: { _ in try await sleep() },
168 | fileID: fileID,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:167:28: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
165 | timeout,
166 | seconds: { _ in seconds },
167 | sleep: { _ in try await sleep() },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
168 | fileID: fileID,
169 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenCacheService.swift:148:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | /// The default Keychain token cache service.
148 | public static var `default` = KeychainCacheService()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | public init(service: String? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:139:15: warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
139 | try await requestToken(configs)
| |- warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:173:54: warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
98 | }
99 |
100 | public struct TokenRefresherMiddleware: HTTPClientMiddleware {
| `- note: consider making struct 'TokenRefresherMiddleware' conform to the 'Sendable' protocol
101 |
102 | private let tokenCacheService: SecureCacheService
:
171 | ) async throws -> (String, String?, Date?) {
172 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
173 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
174 | try await tokenCacheService.save(token, for: .accessToken)
175 | if let refreshToken {
/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/WaitForConnectionModifier.swift:23:49: warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
21 | line: line
22 | ) {
23 | if let cached = await Reachabilities.shared.reachabilities[hostname] {
| `- warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
24 | return cached
25 | } else if let hostname {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Reachability.swift:6:20: note: class 'Reachability' does not conform to the 'Sendable' protocol
4 |
5 | /// `Reachability` can be used to monitor the network status of a device.
6 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
7 |
8 | public enum Connection: CustomStringConvertible {
/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/WaitForConnectionModifier.swift:27:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
25 | } else if let hostname {
26 | let reachability = try Reachability(hostname: hostname)
27 | await Reachabilities.shared.set(reachability, for: hostname)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
28 | return reachability
| `- note: access can happen concurrently
29 | } else {
30 | let reachability = try Reachability()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/WaitForConnectionModifier.swift:31:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
29 | } else {
30 | let reachability = try Reachability()
31 | await Reachabilities.shared.set(reachability, for: nil)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
32 | return reachability
| `- note: access can happen concurrently
33 | }
34 | }
/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:143:31: warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | private extension APIClient {
129 |
130 | func timeout<D>(
| `- note: consider making generic parameter 'D' conform to the 'Sendable' protocol
131 | _ timeout: D,
132 | seconds: @escaping @Sendable (D) -> TimeInterval,
:
141 | timeout: timeout,
142 | seconds: inSeconds,
143 | sleep: { try await sleep(timeout) },
| `- warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
144 | fileID: fileID,
145 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:166:20: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
164 | try await withTimeout(
165 | timeout,
166 | seconds: { _ in seconds },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
167 | sleep: { _ in try await sleep() },
168 | fileID: fileID,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:167:28: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
165 | timeout,
166 | seconds: { _ in seconds },
167 | sleep: { _ in try await sleep() },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
168 | fileID: fileID,
169 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenCacheService.swift:148:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | /// The default Keychain token cache service.
148 | public static var `default` = KeychainCacheService()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | public init(service: String? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:139:15: warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
139 | try await requestToken(configs)
| |- warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:173:54: warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
98 | }
99 |
100 | public struct TokenRefresherMiddleware: HTTPClientMiddleware {
| `- note: consider making struct 'TokenRefresherMiddleware' conform to the 'Sendable' protocol
101 |
102 | private let tokenCacheService: SecureCacheService
:
171 | ) async throws -> (String, String?, Date?) {
172 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
173 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
174 | try await tokenCacheService.save(token, for: .accessToken)
175 | if let refreshToken {
/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/WaitForConnectionModifier.swift:23:49: warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
21 | line: line
22 | ) {
23 | if let cached = await Reachabilities.shared.reachabilities[hostname] {
| `- warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
24 | return cached
25 | } else if let hostname {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Reachability.swift:6:20: note: class 'Reachability' does not conform to the 'Sendable' protocol
4 |
5 | /// `Reachability` can be used to monitor the network status of a device.
6 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
7 |
8 | public enum Connection: CustomStringConvertible {
/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/WaitForConnectionModifier.swift:27:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
25 | } else if let hostname {
26 | let reachability = try Reachability(hostname: hostname)
27 | await Reachabilities.shared.set(reachability, for: hostname)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
28 | return reachability
| `- note: access can happen concurrently
29 | } else {
30 | let reachability = try Reachability()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/WaitForConnectionModifier.swift:31:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
29 | } else {
30 | let reachability = try Reachability()
31 | await Reachabilities.shared.set(reachability, for: nil)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
32 | return reachability
| `- note: access can happen concurrently
33 | }
34 | }
/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:143:31: warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | private extension APIClient {
129 |
130 | func timeout<D>(
| `- note: consider making generic parameter 'D' conform to the 'Sendable' protocol
131 | _ timeout: D,
132 | seconds: @escaping @Sendable (D) -> TimeInterval,
:
141 | timeout: timeout,
142 | seconds: inSeconds,
143 | sleep: { try await sleep(timeout) },
| `- warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
144 | fileID: fileID,
145 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:166:20: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
164 | try await withTimeout(
165 | timeout,
166 | seconds: { _ in seconds },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
167 | sleep: { _ in try await sleep() },
168 | fileID: fileID,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:167:28: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
165 | timeout,
166 | seconds: { _ in seconds },
167 | sleep: { _ in try await sleep() },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
168 | fileID: fileID,
169 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenCacheService.swift:148:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | /// The default Keychain token cache service.
148 | public static var `default` = KeychainCacheService()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | public init(service: String? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:139:15: warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
139 | try await requestToken(configs)
| |- warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:173:54: warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
98 | }
99 |
100 | public struct TokenRefresherMiddleware: HTTPClientMiddleware {
| `- note: consider making struct 'TokenRefresherMiddleware' conform to the 'Sendable' protocol
101 |
102 | private let tokenCacheService: SecureCacheService
:
171 | ) async throws -> (String, String?, Date?) {
172 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
173 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
174 | try await tokenCacheService.save(token, for: .accessToken)
175 | if let refreshToken {
/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/WaitForConnectionModifier.swift:23:49: warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
21 | line: line
22 | ) {
23 | if let cached = await Reachabilities.shared.reachabilities[hostname] {
| `- warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
24 | return cached
25 | } else if let hostname {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Reachability.swift:6:20: note: class 'Reachability' does not conform to the 'Sendable' protocol
4 |
5 | /// `Reachability` can be used to monitor the network status of a device.
6 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
7 |
8 | public enum Connection: CustomStringConvertible {
/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/WaitForConnectionModifier.swift:27:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
25 | } else if let hostname {
26 | let reachability = try Reachability(hostname: hostname)
27 | await Reachabilities.shared.set(reachability, for: hostname)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
28 | return reachability
| `- note: access can happen concurrently
29 | } else {
30 | let reachability = try Reachability()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/WaitForConnectionModifier.swift:31:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
29 | } else {
30 | let reachability = try Reachability()
31 | await Reachabilities.shared.set(reachability, for: nil)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
32 | return reachability
| `- note: access can happen concurrently
33 | }
34 | }
/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:143:31: warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | private extension APIClient {
129 |
130 | func timeout<D>(
| `- note: consider making generic parameter 'D' conform to the 'Sendable' protocol
131 | _ timeout: D,
132 | seconds: @escaping @Sendable (D) -> TimeInterval,
:
141 | timeout: timeout,
142 | seconds: inSeconds,
143 | sleep: { try await sleep(timeout) },
| `- warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
144 | fileID: fileID,
145 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:166:20: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
164 | try await withTimeout(
165 | timeout,
166 | seconds: { _ in seconds },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
167 | sleep: { _ in try await sleep() },
168 | fileID: fileID,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:167:28: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
165 | timeout,
166 | seconds: { _ in seconds },
167 | sleep: { _ in try await sleep() },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
168 | fileID: fileID,
169 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenCacheService.swift:148:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | /// The default Keychain token cache service.
148 | public static var `default` = KeychainCacheService()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | public init(service: String? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:139:15: warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
139 | try await requestToken(configs)
| |- warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:173:54: warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
98 | }
99 |
100 | public struct TokenRefresherMiddleware: HTTPClientMiddleware {
| `- note: consider making struct 'TokenRefresherMiddleware' conform to the 'Sendable' protocol
101 |
102 | private let tokenCacheService: SecureCacheService
:
171 | ) async throws -> (String, String?, Date?) {
172 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
173 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
174 | try await tokenCacheService.save(token, for: .accessToken)
175 | if let refreshToken {
/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/WaitForConnectionModifier.swift:23:49: warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
21 | line: line
22 | ) {
23 | if let cached = await Reachabilities.shared.reachabilities[hostname] {
| `- warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
24 | return cached
25 | } else if let hostname {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Reachability.swift:6:20: note: class 'Reachability' does not conform to the 'Sendable' protocol
4 |
5 | /// `Reachability` can be used to monitor the network status of a device.
6 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
7 |
8 | public enum Connection: CustomStringConvertible {
/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/WaitForConnectionModifier.swift:27:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
25 | } else if let hostname {
26 | let reachability = try Reachability(hostname: hostname)
27 | await Reachabilities.shared.set(reachability, for: hostname)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
28 | return reachability
| `- note: access can happen concurrently
29 | } else {
30 | let reachability = try Reachability()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/WaitForConnectionModifier.swift:31:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
29 | } else {
30 | let reachability = try Reachability()
31 | await Reachabilities.shared.set(reachability, for: nil)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
32 | return reachability
| `- note: access can happen concurrently
33 | }
34 | }
/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:143:31: warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | private extension APIClient {
129 |
130 | func timeout<D>(
| `- note: consider making generic parameter 'D' conform to the 'Sendable' protocol
131 | _ timeout: D,
132 | seconds: @escaping @Sendable (D) -> TimeInterval,
:
141 | timeout: timeout,
142 | seconds: inSeconds,
143 | sleep: { try await sleep(timeout) },
| `- warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
144 | fileID: fileID,
145 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:166:20: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
164 | try await withTimeout(
165 | timeout,
166 | seconds: { _ in seconds },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
167 | sleep: { _ in try await sleep() },
168 | fileID: fileID,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:167:28: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
165 | timeout,
166 | seconds: { _ in seconds },
167 | sleep: { _ in try await sleep() },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
168 | fileID: fileID,
169 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenCacheService.swift:148:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | /// The default Keychain token cache service.
148 | public static var `default` = KeychainCacheService()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | public init(service: String? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:139:15: warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
139 | try await requestToken(configs)
| |- warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:173:54: warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
98 | }
99 |
100 | public struct TokenRefresherMiddleware: HTTPClientMiddleware {
| `- note: consider making struct 'TokenRefresherMiddleware' conform to the 'Sendable' protocol
101 |
102 | private let tokenCacheService: SecureCacheService
:
171 | ) async throws -> (String, String?, Date?) {
172 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
173 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
174 | try await tokenCacheService.save(token, for: .accessToken)
175 | if let refreshToken {
/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/WaitForConnectionModifier.swift:23:49: warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
21 | line: line
22 | ) {
23 | if let cached = await Reachabilities.shared.reachabilities[hostname] {
| `- warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
24 | return cached
25 | } else if let hostname {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Reachability.swift:6:20: note: class 'Reachability' does not conform to the 'Sendable' protocol
4 |
5 | /// `Reachability` can be used to monitor the network status of a device.
6 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
7 |
8 | public enum Connection: CustomStringConvertible {
/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/WaitForConnectionModifier.swift:27:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
25 | } else if let hostname {
26 | let reachability = try Reachability(hostname: hostname)
27 | await Reachabilities.shared.set(reachability, for: hostname)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
28 | return reachability
| `- note: access can happen concurrently
29 | } else {
30 | let reachability = try Reachability()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/WaitForConnectionModifier.swift:31:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
29 | } else {
30 | let reachability = try Reachability()
31 | await Reachabilities.shared.set(reachability, for: nil)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
32 | return reachability
| `- note: access can happen concurrently
33 | }
34 | }
/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:143:31: warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
128 | private extension APIClient {
129 |
130 | func timeout<D>(
| `- note: consider making generic parameter 'D' conform to the 'Sendable' protocol
131 | _ timeout: D,
132 | seconds: @escaping @Sendable (D) -> TimeInterval,
:
141 | timeout: timeout,
142 | seconds: inSeconds,
143 | sleep: { try await sleep(timeout) },
| `- warning: capture of 'timeout' with non-sendable type 'D' in a '@Sendable' closure; this is an error in the Swift 6 language mode
144 | fileID: fileID,
145 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:166:20: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
164 | try await withTimeout(
165 | timeout,
166 | seconds: { _ in seconds },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
167 | sleep: { _ in try await sleep() },
168 | fileID: fileID,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TimeoutModifiers.swift:167:28: warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
149 | }
150 |
151 | private struct TimeoutMiddleware<D>: HTTPClientMiddleware {
| `- note: consider making generic struct 'TimeoutMiddleware' conform to the 'Sendable' protocol
152 |
153 | let timeout: D
:
165 | timeout,
166 | seconds: { _ in seconds },
167 | sleep: { _ in try await sleep() },
| `- warning: capture of 'self' with non-sendable type 'TimeoutMiddleware<D>' in a '@Sendable' closure; this is an error in the Swift 6 language mode
168 | fileID: fileID,
169 | line: line
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenCacheService.swift:148:23: warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
146 |
147 | /// The default Keychain token cache service.
148 | public static var `default` = KeychainCacheService()
| |- warning: static property 'default' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'default' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
149 |
150 | public init(service: String? = nil) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:139:15: warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
137 | } else if let requestToken, let url = request.url {
138 | (accessToken, refreshToken, currentExpiryDate) = try await withThrowingSynchronizedAccess(id: url.host) {
139 | try await requestToken(configs)
| |- warning: capture of 'requestToken' with non-sendable type '(APIClient.Configs) async throws -> (String, String?, Date?)' in a '@Sendable' closure; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
140 | }
141 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/TokenRefresher/TokenRefresher.swift:173:54: warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
98 | }
99 |
100 | public struct TokenRefresherMiddleware: HTTPClientMiddleware {
| `- note: consider making struct 'TokenRefresherMiddleware' conform to the 'Sendable' protocol
101 |
102 | private let tokenCacheService: SecureCacheService
:
171 | ) async throws -> (String, String?, Date?) {
172 | try await withThrowingSynchronizedAccess(id: accessToken) { [self] in
173 | let (token, refreshToken, expiryDate) = try await refresh(refreshToken, configs)
| `- warning: capture of 'self' with non-sendable type 'TokenRefresherMiddleware' in a '@Sendable' closure; this is an error in the Swift 6 language mode
174 | try await tokenCacheService.save(token, for: .accessToken)
175 | if let refreshToken {
/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/WaitForConnectionModifier.swift:23:49: warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
21 | line: line
22 | ) {
23 | if let cached = await Reachabilities.shared.reachabilities[hostname] {
| `- warning: non-sendable type '[String? : Reachability]' of property 'reachabilities' cannot exit actor-isolated context; this is an error in the Swift 6 language mode
24 | return cached
25 | } else if let hostname {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Utils/Reachability.swift:6:20: note: class 'Reachability' does not conform to the 'Sendable' protocol
4 |
5 | /// `Reachability` can be used to monitor the network status of a device.
6 | public final class Reachability {
| `- note: class 'Reachability' does not conform to the 'Sendable' protocol
7 |
8 | public enum Connection: CustomStringConvertible {
/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/WaitForConnectionModifier.swift:27:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
25 | } else if let hostname {
26 | let reachability = try Reachability(hostname: hostname)
27 | await Reachabilities.shared.set(reachability, for: hostname)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
28 | return reachability
| `- note: access can happen concurrently
29 | } else {
30 | let reachability = try Reachability()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftAPIClient/Modifiers/WaitForConnectionModifier.swift:31:34: warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
29 | } else {
30 | let reachability = try Reachability()
31 | await Reachabilities.shared.set(reachability, for: nil)
| |- warning: sending 'reachability' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending 'reachability' to actor-isolated instance method 'set(_:for:)' risks causing data races between actor-isolated and local nonisolated uses
32 | return reachability
| `- note: access can happen concurrently
33 | }
34 | }
Build complete! (32.36s)
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.0.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" : "601.0.0-prerelease"
}
]
},
"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/MockResponsesTests.swift",
"Modifiers/RequestCompressionTests.swift",
"Modifiers/RequestModifiersTests.swift",
"NetworkClientTests.swift",
"TestUtils/Client+Ext.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",
"Metrics",
"HTTPTypes",
"HTTPTypesFoundation"
],
"product_memberships" : [
"SwiftAPIClient"
],
"sources" : [
"APIClient.swift",
"APIClientCaller.swift",
"APIClientConfigs.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/CodersModifiers.swift",
"Modifiers/ErrorDecodeModifiers.swift",
"Modifiers/ErrorHandler.swift",
"Modifiers/FileIDLine.swift",
"Modifiers/HTTPClientMiddleware.swift",
"Modifiers/HTTPResponseValidator.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.