Build Information
Successful build of AsyncNetworkService, reference main (12e225), with Swift 6.1 for macOS (SPM) on 30 Jun 2026 17:32:52 UTC.
Swift 6 data race errors: 12
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCapturesBuild Log
========================================
RunAll
========================================
Builder version: undefined version: run 'make version' to update
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/XcodesOrg/AsyncHTTPNetworkService.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/XcodesOrg/AsyncHTTPNetworkService
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 12e225a try preconcurrency macro
Cloned https://github.com/XcodesOrg/AsyncHTTPNetworkService.git
Revision (git rev-parse @):
12e225af8b5dc25afcfabfcf582a165b0581ab19
SUCCESS checkout https://github.com/XcodesOrg/AsyncHTTPNetworkService.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/XcodesOrg/AsyncHTTPNetworkService.git
https://github.com/XcodesOrg/AsyncHTTPNetworkService.git
{
"dependencies" : [
{
"identity" : "ohhttpstubs",
"requirement" : {
"range" : [
{
"lower_bound" : "9.0.0",
"upper_bound" : "10.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/AliSoftware/OHHTTPStubs.git"
}
],
"manifest_display_name" : "AsyncNetworkService",
"name" : "AsyncNetworkService",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "macos",
"version" : "10.15"
}
],
"products" : [
{
"name" : "AsyncNetworkService",
"targets" : [
"AsyncNetworkService"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "AsyncNetworkServiceTests",
"module_type" : "SwiftTarget",
"name" : "AsyncNetworkServiceTests",
"path" : "AsyncNetworkServiceTests",
"product_dependencies" : [
"OHHTTPStubs"
],
"sources" : [
"AsyncNetworkServiceTests.swift",
"TestHelpers/Mocks.swift",
"TestHelpers/OHHTTPHelper.swift",
"TestHelpers/Stubs.swift"
],
"type" : "test"
},
{
"c99name" : "AsyncNetworkService",
"module_type" : "SwiftTarget",
"name" : "AsyncNetworkService",
"path" : "AsyncNetworkService",
"product_memberships" : [
"AsyncNetworkService"
],
"sources" : [
"AsyncHTTPNetworkService.swift",
"AsyncNetworkHandler.swift",
"Common/Models/UploadableFile.swift",
"Common/NetworkLogger.swift",
"Common/NetworkRequestModifier.swift",
"Common/NetworkResponseInterceptor.swift",
"Common/NotificationObserver.swift",
"Common/RequestModifiers/APIKeyRequestModifier.swift",
"Common/RequestModifiers/BearerTokenRequestModifier.swift",
"Common/RequestModifiers/FileUploadRequestModifier.swift",
"Common/RequestModifiers/HeaderRequestModifier.swift",
"Common/URLRequestBuilder.swift",
"Extensions/Codable+.swift",
"Extensions/Data+.swift",
"Extensions/DateFormatter+.swift",
"Extensions/JSONDecoder+.swift",
"Extensions/URL+.swift",
"Extensions/URLRequest+.swift",
"NetworkError.swift",
"ResponseValidator.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
Running build ...
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
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/21] Compiling AsyncNetworkService URL+.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:10:5: warning: var 'networkRequestObserverStartDateKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | var networkRequestObserverStartDateKey: UInt8 = 0
| |- warning: var 'networkRequestObserverStartDateKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'networkRequestObserverStartDateKey' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make var 'networkRequestObserverStartDateKey' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 |
12 | // MARK: - URL Session task did start
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:14:5: warning: let 'networkTaskDidStartNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<URLSessionDataTask>' may have shared mutable state; this is an error in the Swift 6 language mode
12 | // MARK: - URL Session task did start
13 |
14 | let networkTaskDidStartNotification: AsyncNotification<URLSessionDataTask> = AsyncNotification()
| |- warning: let 'networkTaskDidStartNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<URLSessionDataTask>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'networkTaskDidStartNotification' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | let networkTaskDidCompleteNotification: AsyncNotification<TaskComplete> = AsyncNotification()
16 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NotificationObserver.swift:12:15: note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
10 | /// A helper generic struct used in Notifications.
11 | /// A `Notification.name` is a UUID String
12 | public struct AsyncNotification<T> {
| `- note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
13 | let name: String = UUID().uuidString
14 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:15:5: warning: let 'networkTaskDidCompleteNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<TaskComplete>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | let networkTaskDidStartNotification: AsyncNotification<URLSessionDataTask> = AsyncNotification()
15 | let networkTaskDidCompleteNotification: AsyncNotification<TaskComplete> = AsyncNotification()
| |- warning: let 'networkTaskDidCompleteNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<TaskComplete>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'networkTaskDidCompleteNotification' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 |
17 | extension URLRequest: ConvertsToURLRequest {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NotificationObserver.swift:12:15: note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
10 | /// A helper generic struct used in Notifications.
11 | /// A `Notification.name` is a UUID String
12 | public struct AsyncNotification<T> {
| `- note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
13 | let name: String = UUID().uuidString
14 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:48:42: warning: reference to captured var 'dataTask' in concurrently-executing code
46 | dataTask = self.dataTask(with: request) { data, response, error in
47 |
48 | guard let task = dataTask else { return }
| `- warning: reference to captured var 'dataTask' in concurrently-executing code
49 | guard let date = objc_getAssociatedObject(task, &networkRequestObserverStartDateKey) as? Date else { return }
50 | guard let response = response as? HTTPURLResponse else { return continuation.resume(throwing: NetworkError.noDataInResponse) }
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:73:17: warning: capture of 'onCancel' with non-sendable type '() -> Void?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
71 | },
72 | onCancel: {
73 | onCancel()
| |- warning: capture of 'onCancel' with non-sendable type '() -> Void?' 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'
74 | }
75 | )
[4/21] Compiling AsyncNetworkService URLRequest+.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:10:5: warning: var 'networkRequestObserverStartDateKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | var networkRequestObserverStartDateKey: UInt8 = 0
| |- warning: var 'networkRequestObserverStartDateKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'networkRequestObserverStartDateKey' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make var 'networkRequestObserverStartDateKey' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 |
12 | // MARK: - URL Session task did start
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:14:5: warning: let 'networkTaskDidStartNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<URLSessionDataTask>' may have shared mutable state; this is an error in the Swift 6 language mode
12 | // MARK: - URL Session task did start
13 |
14 | let networkTaskDidStartNotification: AsyncNotification<URLSessionDataTask> = AsyncNotification()
| |- warning: let 'networkTaskDidStartNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<URLSessionDataTask>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'networkTaskDidStartNotification' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | let networkTaskDidCompleteNotification: AsyncNotification<TaskComplete> = AsyncNotification()
16 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NotificationObserver.swift:12:15: note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
10 | /// A helper generic struct used in Notifications.
11 | /// A `Notification.name` is a UUID String
12 | public struct AsyncNotification<T> {
| `- note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
13 | let name: String = UUID().uuidString
14 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:15:5: warning: let 'networkTaskDidCompleteNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<TaskComplete>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | let networkTaskDidStartNotification: AsyncNotification<URLSessionDataTask> = AsyncNotification()
15 | let networkTaskDidCompleteNotification: AsyncNotification<TaskComplete> = AsyncNotification()
| |- warning: let 'networkTaskDidCompleteNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<TaskComplete>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'networkTaskDidCompleteNotification' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 |
17 | extension URLRequest: ConvertsToURLRequest {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NotificationObserver.swift:12:15: note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
10 | /// A helper generic struct used in Notifications.
11 | /// A `Notification.name` is a UUID String
12 | public struct AsyncNotification<T> {
| `- note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
13 | let name: String = UUID().uuidString
14 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:48:42: warning: reference to captured var 'dataTask' in concurrently-executing code
46 | dataTask = self.dataTask(with: request) { data, response, error in
47 |
48 | guard let task = dataTask else { return }
| `- warning: reference to captured var 'dataTask' in concurrently-executing code
49 | guard let date = objc_getAssociatedObject(task, &networkRequestObserverStartDateKey) as? Date else { return }
50 | guard let response = response as? HTTPURLResponse else { return continuation.resume(throwing: NetworkError.noDataInResponse) }
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:73:17: warning: capture of 'onCancel' with non-sendable type '() -> Void?' in a '@Sendable' closure; this is an error in the Swift 6 language mode
71 | },
72 | onCancel: {
73 | onCancel()
| |- warning: capture of 'onCancel' with non-sendable type '() -> Void?' 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'
74 | }
75 | )
[5/21] Compiling AsyncNetworkService Codable+.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/Codable+.swift:195:17: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
167 | }
168 |
169 | enum InvalidElementStrategy<T>: CustomStringConvertible {
| `- note: 'T' previously declared here
170 | case remove
171 | case fail
:
193 | }
194 |
195 | func toType<T>() -> InvalidElementStrategy<T> {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
196 | switch self {
197 | case .remove:
[6/21] Compiling AsyncNetworkService Data+.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/Codable+.swift:195:17: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
167 | }
168 |
169 | enum InvalidElementStrategy<T>: CustomStringConvertible {
| `- note: 'T' previously declared here
170 | case remove
171 | case fail
:
193 | }
194 |
195 | func toType<T>() -> InvalidElementStrategy<T> {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
196 | switch self {
197 | case .remove:
[7/21] Compiling AsyncNetworkService NotificationObserver.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NotificationObserver.swift:27:17: warning: capture of 'aBlock' with non-sendable type '(T) -> Void' in a '@Sendable' closure
25 | observer = NotificationCenter.default.addObserver(forName: notification.notificationName, object: nil, queue: nil) { note in
26 | if let value = (note.userInfo?["value"] as? UserInfoContainer<T>)?.rawValue {
27 | aBlock(value)
| |- warning: capture of 'aBlock' with non-sendable type '(T) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
28 | } else {
29 | assertionFailure("Couldn't understand user info")
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/APIKeyRequestModifier.swift:10:14: warning: non-final class 'APIKeyRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public class APIKeyRequestModifier: NetworkRequestModifier {
| `- warning: non-final class 'APIKeyRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
11 | private var apiKey: String
12 | public init(apiKey: String) {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/APIKeyRequestModifier.swift:11:17: warning: stored property 'apiKey' of 'Sendable'-conforming class 'APIKeyRequestModifier' is mutable; this is an error in the Swift 6 language mode
9 |
10 | public class APIKeyRequestModifier: NetworkRequestModifier {
11 | private var apiKey: String
| `- warning: stored property 'apiKey' of 'Sendable'-conforming class 'APIKeyRequestModifier' is mutable; this is an error in the Swift 6 language mode
12 | public init(apiKey: String) {
13 | self.apiKey = apiKey
[8/21] Compiling AsyncNetworkService APIKeyRequestModifier.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NotificationObserver.swift:27:17: warning: capture of 'aBlock' with non-sendable type '(T) -> Void' in a '@Sendable' closure
25 | observer = NotificationCenter.default.addObserver(forName: notification.notificationName, object: nil, queue: nil) { note in
26 | if let value = (note.userInfo?["value"] as? UserInfoContainer<T>)?.rawValue {
27 | aBlock(value)
| |- warning: capture of 'aBlock' with non-sendable type '(T) -> Void' in a '@Sendable' closure
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
28 | } else {
29 | assertionFailure("Couldn't understand user info")
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/APIKeyRequestModifier.swift:10:14: warning: non-final class 'APIKeyRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public class APIKeyRequestModifier: NetworkRequestModifier {
| `- warning: non-final class 'APIKeyRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
11 | private var apiKey: String
12 | public init(apiKey: String) {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/APIKeyRequestModifier.swift:11:17: warning: stored property 'apiKey' of 'Sendable'-conforming class 'APIKeyRequestModifier' is mutable; this is an error in the Swift 6 language mode
9 |
10 | public class APIKeyRequestModifier: NetworkRequestModifier {
11 | private var apiKey: String
| `- warning: stored property 'apiKey' of 'Sendable'-conforming class 'APIKeyRequestModifier' is mutable; this is an error in the Swift 6 language mode
12 | public init(apiKey: String) {
13 | self.apiKey = apiKey
[9/21] Compiling AsyncNetworkService BearerTokenRequestModifier.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/BearerTokenRequestModifier.swift:11:14: warning: non-final class 'BearerTokenRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 |
10 | /// A class to modify a `URLRequest` and insert a header with `Bearer xxx` with a `Authorization` key
11 | public class BearerTokenRequestModifier: HeaderRequestModifier {
| `- warning: non-final class 'BearerTokenRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 |
13 | public init(authenticationToken: String) {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/FileUploadRequestModifier.swift:11:9: warning: stored property 'files' of 'Sendable'-conforming struct 'FileUploadRequestModifier' has non-sendable type '[UploadableFile]'; this is an error in the Swift 6 language mode
9 |
10 | struct FileUploadRequestModifier: NetworkRequestModifier {
11 | let files: [UploadableFile]
| `- warning: stored property 'files' of 'Sendable'-conforming struct 'FileUploadRequestModifier' has non-sendable type '[UploadableFile]'; this is an error in the Swift 6 language mode
12 | let boundary: String
13 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/Models/UploadableFile.swift:13:15: note: consider making struct 'UploadableFile' conform to the 'Sendable' protocol
11 | public typealias ContentValue = String
12 |
13 | public struct UploadableFile {
| `- note: consider making struct 'UploadableFile' conform to the 'Sendable' protocol
14 | public let data: Data
15 | public let fieldName: String
[10/21] Compiling AsyncNetworkService FileUploadRequestModifier.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/BearerTokenRequestModifier.swift:11:14: warning: non-final class 'BearerTokenRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 |
10 | /// A class to modify a `URLRequest` and insert a header with `Bearer xxx` with a `Authorization` key
11 | public class BearerTokenRequestModifier: HeaderRequestModifier {
| `- warning: non-final class 'BearerTokenRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 |
13 | public init(authenticationToken: String) {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/FileUploadRequestModifier.swift:11:9: warning: stored property 'files' of 'Sendable'-conforming struct 'FileUploadRequestModifier' has non-sendable type '[UploadableFile]'; this is an error in the Swift 6 language mode
9 |
10 | struct FileUploadRequestModifier: NetworkRequestModifier {
11 | let files: [UploadableFile]
| `- warning: stored property 'files' of 'Sendable'-conforming struct 'FileUploadRequestModifier' has non-sendable type '[UploadableFile]'; this is an error in the Swift 6 language mode
12 | let boundary: String
13 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/Models/UploadableFile.swift:13:15: note: consider making struct 'UploadableFile' conform to the 'Sendable' protocol
11 | public typealias ContentValue = String
12 |
13 | public struct UploadableFile {
| `- note: consider making struct 'UploadableFile' conform to the 'Sendable' protocol
14 | public let data: Data
15 | public let fieldName: String
[11/21] Compiling AsyncNetworkService NetworkRequestModifier.swift
[12/21] Compiling AsyncNetworkService NetworkResponseInterceptor.swift
[13/21] Compiling AsyncNetworkService DateFormatter+.swift
[14/21] Compiling AsyncNetworkService JSONDecoder+.swift
[15/21] Compiling AsyncNetworkService HeaderRequestModifier.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/HeaderRequestModifier.swift:3:14: warning: non-final class 'HeaderRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public class HeaderRequestModifier: NetworkRequestModifier {
| `- warning: non-final class 'HeaderRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
4 |
5 | private let key: String
[16/21] Compiling AsyncNetworkService URLRequestBuilder.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/HeaderRequestModifier.swift:3:14: warning: non-final class 'HeaderRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public class HeaderRequestModifier: NetworkRequestModifier {
| `- warning: non-final class 'HeaderRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
4 |
5 | private let key: String
[17/23] Compiling AsyncNetworkService AsyncHTTPNetworkService.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:29:16: warning: stored property 'requestModifiers' of 'Sendable'-conforming class 'AsyncHTTPNetworkService' is mutable; this is an error in the Swift 6 language mode
27 | @preconcurrency
28 | public final class AsyncHTTPNetworkService: AsyncNetworkService, Sendable {
29 | public var requestModifiers: [NetworkRequestModifier]
| `- warning: stored property 'requestModifiers' of 'Sendable'-conforming class 'AsyncHTTPNetworkService' is mutable; this is an error in the Swift 6 language mode
30 | public var responseInterceptors: [NetworkResponseInterceptor]
31 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:114:32: 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
112 | /// Requests a single object. That object must conform to `Decodable`. Will interpret the data received as JSON and attempt to decode the object in question from it.
113 | func requestObject<ObjectType: Decodable>(_ request: ConvertsToURLRequest, validators: [ResponseValidator] = [statusCodeIsIn200s], jsonDecoder: JSONDecoder = JSONDecoder.networkJSONDecoder) async throws -> ObjectType {
114 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
115 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
116 | }
117 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:135:32: 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
133 | /// Requests a list of objects. The object in question must conform to `Decodable`. Will interpret the data received as JSON and attempt to decode an array of the object in question from it.
134 | func requestObjects<ObjectType: Decodable>(_ request: ConvertsToURLRequest, validators: [ResponseValidator] = [statusCodeIsIn200s], jsonDecoder: JSONDecoder = JSONDecoder.networkJSONDecoder) async throws -> [ObjectType] {
135 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
137 | }
138 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:156:32: 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
154 | /// Requests a string from a network endpoint.
155 | func requestString(_ request: ConvertsToURLRequest, encoding: String.Encoding = .utf8, validators: [ResponseValidator] = [statusCodeIsIn200s]) async throws -> String {
156 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
157 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
158 | }
159 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:175:32: 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
173 | /// Requests a network endpoint without any return
174 | func requestVoid(_ request: ConvertsToURLRequest, validators: [ResponseValidator] = [statusCodeIsIn200s]) async throws {
175 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | let result = await requestTask.result
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:191:32: 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
189 | /// Requests a single object. That object must be decodable as a `String`. Will interpret the data received as JSON and attempt to decode the object in question from it.
190 | func requestStringWithResponse(_ request: ConvertsToURLRequest, encoding: String.Encoding = .utf8, validators: [ResponseValidator] = [statusCodeIsIn200s]) async throws -> (String, URLResponse) {
191 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
192 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
193 | }
194 | let result = await requestTask.result
[18/23] Compiling AsyncNetworkService AsyncNetworkHandler.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:29:16: warning: stored property 'requestModifiers' of 'Sendable'-conforming class 'AsyncHTTPNetworkService' is mutable; this is an error in the Swift 6 language mode
27 | @preconcurrency
28 | public final class AsyncHTTPNetworkService: AsyncNetworkService, Sendable {
29 | public var requestModifiers: [NetworkRequestModifier]
| `- warning: stored property 'requestModifiers' of 'Sendable'-conforming class 'AsyncHTTPNetworkService' is mutable; this is an error in the Swift 6 language mode
30 | public var responseInterceptors: [NetworkResponseInterceptor]
31 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:114:32: 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
112 | /// Requests a single object. That object must conform to `Decodable`. Will interpret the data received as JSON and attempt to decode the object in question from it.
113 | func requestObject<ObjectType: Decodable>(_ request: ConvertsToURLRequest, validators: [ResponseValidator] = [statusCodeIsIn200s], jsonDecoder: JSONDecoder = JSONDecoder.networkJSONDecoder) async throws -> ObjectType {
114 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
115 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
116 | }
117 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:135:32: 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
133 | /// Requests a list of objects. The object in question must conform to `Decodable`. Will interpret the data received as JSON and attempt to decode an array of the object in question from it.
134 | func requestObjects<ObjectType: Decodable>(_ request: ConvertsToURLRequest, validators: [ResponseValidator] = [statusCodeIsIn200s], jsonDecoder: JSONDecoder = JSONDecoder.networkJSONDecoder) async throws -> [ObjectType] {
135 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
136 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
137 | }
138 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:156:32: 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
154 | /// Requests a string from a network endpoint.
155 | func requestString(_ request: ConvertsToURLRequest, encoding: String.Encoding = .utf8, validators: [ResponseValidator] = [statusCodeIsIn200s]) async throws -> String {
156 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
157 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
158 | }
159 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:175:32: 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
173 | /// Requests a network endpoint without any return
174 | func requestVoid(_ request: ConvertsToURLRequest, validators: [ResponseValidator] = [statusCodeIsIn200s]) async throws {
175 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | let result = await requestTask.result
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:191:32: 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
189 | /// Requests a single object. That object must be decodable as a `String`. Will interpret the data received as JSON and attempt to decode the object in question from it.
190 | func requestStringWithResponse(_ request: ConvertsToURLRequest, encoding: String.Encoding = .utf8, validators: [ResponseValidator] = [statusCodeIsIn200s]) async throws -> (String, URLResponse) {
191 | let requestTask = Task { () -> (Data, URLResponse) in
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
192 | try await requestData(request, validators: validators)
| `- note: closure captures 'self' which is accessible to code in the current task
193 | }
194 | let result = await requestTask.result
[19/23] Emitting module AsyncNetworkService
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/AsyncHTTPNetworkService.swift:29:16: warning: stored property 'requestModifiers' of 'Sendable'-conforming class 'AsyncHTTPNetworkService' is mutable; this is an error in the Swift 6 language mode
27 | @preconcurrency
28 | public final class AsyncHTTPNetworkService: AsyncNetworkService, Sendable {
29 | public var requestModifiers: [NetworkRequestModifier]
| `- warning: stored property 'requestModifiers' of 'Sendable'-conforming class 'AsyncHTTPNetworkService' is mutable; this is an error in the Swift 6 language mode
30 | public var responseInterceptors: [NetworkResponseInterceptor]
31 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NetworkLogger.swift:24:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | class ConsoleLogger: NetworkLogger {
24 | static var shared: ConsoleLogger = .init()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 |
26 | func log(_ message: String, type: OSLogType, log: OSLog = .default, sender: String) {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/APIKeyRequestModifier.swift:10:14: warning: non-final class 'APIKeyRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | public class APIKeyRequestModifier: NetworkRequestModifier {
| `- warning: non-final class 'APIKeyRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
11 | private var apiKey: String
12 | public init(apiKey: String) {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/APIKeyRequestModifier.swift:11:17: warning: stored property 'apiKey' of 'Sendable'-conforming class 'APIKeyRequestModifier' is mutable; this is an error in the Swift 6 language mode
9 |
10 | public class APIKeyRequestModifier: NetworkRequestModifier {
11 | private var apiKey: String
| `- warning: stored property 'apiKey' of 'Sendable'-conforming class 'APIKeyRequestModifier' is mutable; this is an error in the Swift 6 language mode
12 | public init(apiKey: String) {
13 | self.apiKey = apiKey
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/BearerTokenRequestModifier.swift:11:14: warning: non-final class 'BearerTokenRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
9 |
10 | /// A class to modify a `URLRequest` and insert a header with `Bearer xxx` with a `Authorization` key
11 | public class BearerTokenRequestModifier: HeaderRequestModifier {
| `- warning: non-final class 'BearerTokenRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
12 |
13 | public init(authenticationToken: String) {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/FileUploadRequestModifier.swift:11:9: warning: stored property 'files' of 'Sendable'-conforming struct 'FileUploadRequestModifier' has non-sendable type '[UploadableFile]'; this is an error in the Swift 6 language mode
9 |
10 | struct FileUploadRequestModifier: NetworkRequestModifier {
11 | let files: [UploadableFile]
| `- warning: stored property 'files' of 'Sendable'-conforming struct 'FileUploadRequestModifier' has non-sendable type '[UploadableFile]'; this is an error in the Swift 6 language mode
12 | let boundary: String
13 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/Models/UploadableFile.swift:13:15: note: consider making struct 'UploadableFile' conform to the 'Sendable' protocol
11 | public typealias ContentValue = String
12 |
13 | public struct UploadableFile {
| `- note: consider making struct 'UploadableFile' conform to the 'Sendable' protocol
14 | public let data: Data
15 | public let fieldName: String
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/RequestModifiers/HeaderRequestModifier.swift:3:14: warning: non-final class 'HeaderRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
1 | import Foundation
2 |
3 | public class HeaderRequestModifier: NetworkRequestModifier {
| `- warning: non-final class 'HeaderRequestModifier' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
4 |
5 | private let key: String
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/Codable+.swift:195:17: warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
167 | }
168 |
169 | enum InvalidElementStrategy<T>: CustomStringConvertible {
| `- note: 'T' previously declared here
170 | case remove
171 | case fail
:
193 | }
194 |
195 | func toType<T>() -> InvalidElementStrategy<T> {
| `- warning: generic parameter 'T' shadows generic parameter from outer scope with the same name; this is an error in the Swift 6 language mode
196 | switch self {
197 | case .remove:
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:10:5: warning: var 'networkRequestObserverStartDateKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
8 | import Foundation
9 |
10 | var networkRequestObserverStartDateKey: UInt8 = 0
| |- warning: var 'networkRequestObserverStartDateKey' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'networkRequestObserverStartDateKey' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make var 'networkRequestObserverStartDateKey' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
11 |
12 | // MARK: - URL Session task did start
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:14:5: warning: let 'networkTaskDidStartNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<URLSessionDataTask>' may have shared mutable state; this is an error in the Swift 6 language mode
12 | // MARK: - URL Session task did start
13 |
14 | let networkTaskDidStartNotification: AsyncNotification<URLSessionDataTask> = AsyncNotification()
| |- warning: let 'networkTaskDidStartNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<URLSessionDataTask>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'networkTaskDidStartNotification' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
15 | let networkTaskDidCompleteNotification: AsyncNotification<TaskComplete> = AsyncNotification()
16 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NotificationObserver.swift:12:15: note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
10 | /// A helper generic struct used in Notifications.
11 | /// A `Notification.name` is a UUID String
12 | public struct AsyncNotification<T> {
| `- note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
13 | let name: String = UUID().uuidString
14 |
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Extensions/URLRequest+.swift:15:5: warning: let 'networkTaskDidCompleteNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<TaskComplete>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
14 | let networkTaskDidStartNotification: AsyncNotification<URLSessionDataTask> = AsyncNotification()
15 | let networkTaskDidCompleteNotification: AsyncNotification<TaskComplete> = AsyncNotification()
| |- warning: let 'networkTaskDidCompleteNotification' is not concurrency-safe because non-'Sendable' type 'AsyncNotification<TaskComplete>' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'networkTaskDidCompleteNotification' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
16 |
17 | extension URLRequest: ConvertsToURLRequest {
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NotificationObserver.swift:12:15: note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
10 | /// A helper generic struct used in Notifications.
11 | /// A `Notification.name` is a UUID String
12 | public struct AsyncNotification<T> {
| `- note: consider making generic struct 'AsyncNotification' conform to the 'Sendable' protocol
13 | let name: String = UUID().uuidString
14 |
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/ResponseValidator.swift:13:12: warning: let 'statusCodeIsIn200s' is not concurrency-safe because non-'Sendable' type 'ResponseValidator' (aka '(HTTPURLResponse, Optional<Data>) throws -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
11 | public typealias ResponseValidator = (HTTPURLResponse, Data?) throws -> Void
12 |
13 | public let statusCodeIsIn200s: ResponseValidator = { response, data in
| |- warning: let 'statusCodeIsIn200s' is not concurrency-safe because non-'Sendable' type 'ResponseValidator' (aka '(HTTPURLResponse, Optional<Data>) throws -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'statusCodeIsIn200s' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | guard 200 ..< 300 ~= response.statusCode else {
15 | throw NetworkError.non200StatusCode(statusCode: response.statusCode, data: data)
[20/23] Compiling AsyncNetworkService UploadableFile.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NetworkLogger.swift:24:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | class ConsoleLogger: NetworkLogger {
24 | static var shared: ConsoleLogger = .init()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 |
26 | func log(_ message: String, type: OSLogType, log: OSLog = .default, sender: String) {
[21/23] Compiling AsyncNetworkService NetworkLogger.swift
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/Common/NetworkLogger.swift:24:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
22 |
23 | class ConsoleLogger: NetworkLogger {
24 | static var shared: ConsoleLogger = .init()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
25 |
26 | func log(_ message: String, type: OSLogType, log: OSLog = .default, sender: String) {
[22/23] Compiling AsyncNetworkService NetworkError.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/ResponseValidator.swift:13:12: warning: let 'statusCodeIsIn200s' is not concurrency-safe because non-'Sendable' type 'ResponseValidator' (aka '(HTTPURLResponse, Optional<Data>) throws -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
11 | public typealias ResponseValidator = (HTTPURLResponse, Data?) throws -> Void
12 |
13 | public let statusCodeIsIn200s: ResponseValidator = { response, data in
| |- warning: let 'statusCodeIsIn200s' is not concurrency-safe because non-'Sendable' type 'ResponseValidator' (aka '(HTTPURLResponse, Optional<Data>) throws -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'statusCodeIsIn200s' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | guard 200 ..< 300 ~= response.statusCode else {
15 | throw NetworkError.non200StatusCode(statusCode: response.statusCode, data: data)
[23/23] Compiling AsyncNetworkService ResponseValidator.swift
<unknown>:0: note: a function type must be marked '@Sendable' to conform to 'Sendable'
/Users/admin/builder/spi-builder-workspace/AsyncNetworkService/ResponseValidator.swift:13:12: warning: let 'statusCodeIsIn200s' is not concurrency-safe because non-'Sendable' type 'ResponseValidator' (aka '(HTTPURLResponse, Optional<Data>) throws -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
11 | public typealias ResponseValidator = (HTTPURLResponse, Data?) throws -> Void
12 |
13 | public let statusCodeIsIn200s: ResponseValidator = { response, data in
| |- warning: let 'statusCodeIsIn200s' is not concurrency-safe because non-'Sendable' type 'ResponseValidator' (aka '(HTTPURLResponse, Optional<Data>) throws -> ()') may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make let 'statusCodeIsIn200s' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
14 | guard 200 ..< 300 ~= response.statusCode else {
15 | throw NetworkError.non200StatusCode(statusCode: response.statusCode, data: data)
Build complete! (7.88s)
Fetching https://github.com/AliSoftware/OHHTTPStubs.git
[1/7902] Fetching ohhttpstubs
Fetched https://github.com/AliSoftware/OHHTTPStubs.git from cache (1.08s)
Computing version for https://github.com/AliSoftware/OHHTTPStubs.git
Computed https://github.com/AliSoftware/OHHTTPStubs.git at 9.1.0 (1.71s)
Creating working copy for https://github.com/AliSoftware/OHHTTPStubs.git
Working copy of https://github.com/AliSoftware/OHHTTPStubs.git resolved at 9.1.0
Build complete.
{
"dependencies" : [
{
"identity" : "ohhttpstubs",
"requirement" : {
"range" : [
{
"lower_bound" : "9.0.0",
"upper_bound" : "10.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/AliSoftware/OHHTTPStubs.git"
}
],
"manifest_display_name" : "AsyncNetworkService",
"name" : "AsyncNetworkService",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
},
{
"name" : "macos",
"version" : "10.15"
}
],
"products" : [
{
"name" : "AsyncNetworkService",
"targets" : [
"AsyncNetworkService"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "AsyncNetworkServiceTests",
"module_type" : "SwiftTarget",
"name" : "AsyncNetworkServiceTests",
"path" : "AsyncNetworkServiceTests",
"product_dependencies" : [
"OHHTTPStubs"
],
"sources" : [
"AsyncNetworkServiceTests.swift",
"TestHelpers/Mocks.swift",
"TestHelpers/OHHTTPHelper.swift",
"TestHelpers/Stubs.swift"
],
"type" : "test"
},
{
"c99name" : "AsyncNetworkService",
"module_type" : "SwiftTarget",
"name" : "AsyncNetworkService",
"path" : "AsyncNetworkService",
"product_memberships" : [
"AsyncNetworkService"
],
"sources" : [
"AsyncHTTPNetworkService.swift",
"AsyncNetworkHandler.swift",
"Common/Models/UploadableFile.swift",
"Common/NetworkLogger.swift",
"Common/NetworkRequestModifier.swift",
"Common/NetworkResponseInterceptor.swift",
"Common/NotificationObserver.swift",
"Common/RequestModifiers/APIKeyRequestModifier.swift",
"Common/RequestModifiers/BearerTokenRequestModifier.swift",
"Common/RequestModifiers/FileUploadRequestModifier.swift",
"Common/RequestModifiers/HeaderRequestModifier.swift",
"Common/URLRequestBuilder.swift",
"Extensions/Codable+.swift",
"Extensions/Data+.swift",
"Extensions/DateFormatter+.swift",
"Extensions/JSONDecoder+.swift",
"Extensions/URL+.swift",
"Extensions/URLRequest+.swift",
"NetworkError.swift",
"ResponseValidator.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
Done.