Build Information
Successful build of BaseAPI with Swift 6.0 for Linux.
Swift 6 data race errors: 0
Build Command
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/serhii-londar/BaseAPI.git
Reference: master
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/serhii-londar/BaseAPI
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 8e736fa Update BaseAPI.podspec
Cloned https://github.com/serhii-londar/BaseAPI.git
Revision (git rev-parse @):
8e736fa8302647749fb1b4ebe3c59e920174a095
SUCCESS checkout https://github.com/serhii-londar/BaseAPI.git at master
========================================
Build
========================================
Selected platform: linux
Swift version: 6.0
Building package at path: $workDir
https://github.com/serhii-londar/BaseAPI.git
Running build ...
bash -c docker run --rm -v "checkouts-4606859-0":/host -w "$workDir" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling BaseAPI RequestHeaderFields.swift
[4/10] Compiling BaseAPI RequestMethod.swift
[5/10] Compiling BaseAPI Request.swift
[6/10] Compiling BaseAPI ResponsetHeaderFields.swift
[7/10] Compiling BaseAPI URLSession.swift
[8/10] Compiling BaseAPI CharacterSet.swift
[9/10] Compiling BaseAPI BaseAPI.swift
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:44:39: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
42 | if let urlRequest = buildRequest.request {
43 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
44 | callbackQueue.async { completion(data, response, error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
45 | }
46 | task.resume()
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:44:56: warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
42 | if let urlRequest = buildRequest.request {
43 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
44 | callbackQueue.async { completion(data, response, error) }
| `- warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
45 | }
46 | task.resume()
FoundationNetworking.URLResponse:1:12: note: class 'URLResponse' does not conform to the 'Sendable' protocol
1 | open class URLResponse : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'URLResponse' does not conform to the 'Sendable' protocol
2 | public static var supportsSecureCoding: Bool { get }
3 | required public init?(coder aDecoder: NSCoder)
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:11:4: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'FoundationNetworking'
9 |
10 | #if swift(>=5.1) && os(Linux)
11 | import FoundationNetworking
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'FoundationNetworking'
12 | #endif
13 |
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:48:35: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 | task.resume()
47 | } else {
48 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
49 | }
50 | }
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:48:56: warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
46 | task.resume()
47 | } else {
48 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| `- warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 | }
50 | }
FoundationNetworking.URLRequest:1:15: note: struct 'URLRequest' does not conform to the 'Sendable' protocol
1 | public struct URLRequest : ReferenceConvertible, Equatable, Hashable {
| `- note: struct 'URLRequest' does not conform to the 'Sendable' protocol
2 | public typealias ReferenceType = NSURLRequest
3 | public typealias CachePolicy = NSURLRequest.CachePolicy
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:95:35: warning: capture of 'success' with non-sendable type '() -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
93 | private func handle(data: Data?, response: URLResponse?, error: Error?, callbackQueue: DispatchQueue = .main, success: @escaping () -> Void, failure: @escaping (Error) -> Void) {
94 | if let resp = response as? HTTPURLResponse, resp.statusCode == 200 {
95 | callbackQueue.async { success() }
| |- warning: capture of 'success' 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'
96 | } else if let error = error {
97 | callFailure(with: error, callbackQueue: callbackQueue, failure: failure)
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:104:31: warning: capture of 'success' with non-sendable type '(T) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
102 |
103 | private func callSuccess<T: Decodable>(with model: T, callbackQueue: DispatchQueue = .main, success: @escaping (T) -> Void) {
104 | callbackQueue.async { success(model) }
| |- warning: capture of 'success' with non-sendable type '(T) -> 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'
105 | }
106 |
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:104:39: warning: capture of 'model' with non-sendable type 'T' in a `@Sendable` closure; this is an error in the Swift 6 language mode
101 | }
102 |
103 | private func callSuccess<T: Decodable>(with model: T, callbackQueue: DispatchQueue = .main, success: @escaping (T) -> Void) {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
104 | callbackQueue.async { success(model) }
| `- warning: capture of 'model' with non-sendable type 'T' in a `@Sendable` closure; this is an error in the Swift 6 language mode
105 | }
106 |
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:108:31: warning: capture of 'failure' with non-sendable type '(any Error) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
106 |
107 | private func callFailure(with error: Error, callbackQueue: DispatchQueue = .main, failure: @escaping (Error) -> Void) {
108 | callbackQueue.async { failure(error) }
| |- warning: capture of 'failure' with non-sendable type '(any Error) -> 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'
109 | }
110 |
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:118:39: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
116 | if let urlRequest = buildRequest.request {
117 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
118 | callbackQueue.async { completion(data, response, error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
119 | }
120 | task.resume()
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:118:56: warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
116 | if let urlRequest = buildRequest.request {
117 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
118 | callbackQueue.async { completion(data, response, error) }
| `- warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
119 | }
120 | task.resume()
FoundationNetworking.URLResponse:1:12: note: class 'URLResponse' does not conform to the 'Sendable' protocol
1 | open class URLResponse : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'URLResponse' does not conform to the 'Sendable' protocol
2 | public static var supportsSecureCoding: Bool { get }
3 | required public init?(coder aDecoder: NSCoder)
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:122:35: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 | task.resume()
121 | } else {
122 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
123 | }
124 | }
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:122:56: warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
120 | task.resume()
121 | } else {
122 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| `- warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
123 | }
124 | }
FoundationNetworking.URLRequest:1:15: note: struct 'URLRequest' does not conform to the 'Sendable' protocol
1 | public struct URLRequest : ReferenceConvertible, Equatable, Hashable {
| `- note: struct 'URLRequest' does not conform to the 'Sendable' protocol
2 | public typealias ReferenceType = NSURLRequest
3 | public typealias CachePolicy = NSURLRequest.CachePolicy
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:150:39: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
148 | if let urlRequest = buildRequest.request {
149 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
150 | callbackQueue.async { completion(data, response, error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
151 | }
152 | task.resume()
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:150:56: warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
148 | if let urlRequest = buildRequest.request {
149 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
150 | callbackQueue.async { completion(data, response, error) }
| `- warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
151 | }
152 | task.resume()
FoundationNetworking.URLResponse:1:12: note: class 'URLResponse' does not conform to the 'Sendable' protocol
1 | open class URLResponse : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'URLResponse' does not conform to the 'Sendable' protocol
2 | public static var supportsSecureCoding: Bool { get }
3 | required public init?(coder aDecoder: NSCoder)
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:154:35: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
152 | task.resume()
153 | } else {
154 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
155 | }
156 | }
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:154:56: warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
152 | task.resume()
153 | } else {
154 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| `- warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
155 | }
156 | }
FoundationNetworking.URLRequest:1:15: note: struct 'URLRequest' does not conform to the 'Sendable' protocol
1 | public struct URLRequest : ReferenceConvertible, Equatable, Hashable {
| `- note: struct 'URLRequest' does not conform to the 'Sendable' protocol
2 | public typealias ReferenceType = NSURLRequest
3 | public typealias CachePolicy = NSURLRequest.CachePolicy
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:189:39: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
187 | if let urlRequest = buildRequest.request {
188 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
189 | callbackQueue.async { completion(data, response, error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
190 | }
191 | task.resume()
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:189:56: warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
187 | if let urlRequest = buildRequest.request {
188 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
189 | callbackQueue.async { completion(data, response, error) }
| `- warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
190 | }
191 | task.resume()
FoundationNetworking.URLResponse:1:12: note: class 'URLResponse' does not conform to the 'Sendable' protocol
1 | open class URLResponse : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'URLResponse' does not conform to the 'Sendable' protocol
2 | public static var supportsSecureCoding: Bool { get }
3 | required public init?(coder aDecoder: NSCoder)
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:193:35: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
191 | task.resume()
192 | } else {
193 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
194 | }
195 | }
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:193:56: warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
191 | task.resume()
192 | } else {
193 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| `- warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
194 | }
195 | }
FoundationNetworking.URLRequest:1:15: note: struct 'URLRequest' does not conform to the 'Sendable' protocol
1 | public struct URLRequest : ReferenceConvertible, Equatable, Hashable {
| `- note: struct 'URLRequest' does not conform to the 'Sendable' protocol
2 | public typealias ReferenceType = NSURLRequest
3 | public typealias CachePolicy = NSURLRequest.CachePolicy
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:228:39: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
226 | if let urlRequest = buildRequest.request {
227 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
228 | callbackQueue.async { completion(data, response, error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
229 | }
230 | task.resume()
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:228:56: warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
226 | if let urlRequest = buildRequest.request {
227 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
228 | callbackQueue.async { completion(data, response, error) }
| `- warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
229 | }
230 | task.resume()
FoundationNetworking.URLResponse:1:12: note: class 'URLResponse' does not conform to the 'Sendable' protocol
1 | open class URLResponse : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'URLResponse' does not conform to the 'Sendable' protocol
2 | public static var supportsSecureCoding: Bool { get }
3 | required public init?(coder aDecoder: NSCoder)
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:232:35: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
230 | task.resume()
231 | } else {
232 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
233 | }
234 | }
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:232:56: warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
230 | task.resume()
231 | } else {
232 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| `- warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
233 | }
234 | }
FoundationNetworking.URLRequest:1:15: note: struct 'URLRequest' does not conform to the 'Sendable' protocol
1 | public struct URLRequest : ReferenceConvertible, Equatable, Hashable {
| `- note: struct 'URLRequest' does not conform to the 'Sendable' protocol
2 | public typealias ReferenceType = NSURLRequest
3 | public typealias CachePolicy = NSURLRequest.CachePolicy
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:267:39: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
265 | if let urlRequest = buildRequest.request {
266 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
267 | callbackQueue.async { completion(data, response, error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
268 | }
269 | task.resume()
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:267:56: warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
265 | if let urlRequest = buildRequest.request {
266 | let task = session.dataTask(with: urlRequest) { (data, response, error) in
267 | callbackQueue.async { completion(data, response, error) }
| `- warning: capture of 'response' with non-sendable type 'URLResponse?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
268 | }
269 | task.resume()
FoundationNetworking.URLResponse:1:12: note: class 'URLResponse' does not conform to the 'Sendable' protocol
1 | open class URLResponse : NSObject, NSSecureCoding, NSCopying {
| `- note: class 'URLResponse' does not conform to the 'Sendable' protocol
2 | public static var supportsSecureCoding: Bool { get }
3 | required public init?(coder aDecoder: NSCoder)
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:271:35: warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
269 | task.resume()
270 | } else {
271 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| |- warning: capture of 'completion' with non-sendable type 'BaseAPICompletion' (aka '(Optional<Data>, Optional<URLResponse>, Optional<any Error>) -> ()') 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'
272 | }
273 | }
/host/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:271:56: warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
269 | task.resume()
270 | } else {
271 | callbackQueue.async { completion(nil, nil, buildRequest.error) }
| `- warning: capture of 'buildRequest' with non-sendable type '(request: URLRequest?, error: (any Error)?)' in a `@Sendable` closure; this is an error in the Swift 6 language mode
272 | }
273 | }
FoundationNetworking.URLRequest:1:15: note: struct 'URLRequest' does not conform to the 'Sendable' protocol
1 | public struct URLRequest : ReferenceConvertible, Equatable, Hashable {
| `- note: struct 'URLRequest' does not conform to the 'Sendable' protocol
2 | public typealias ReferenceType = NSURLRequest
3 | public typealias CachePolicy = NSURLRequest.CachePolicy
[10/10] Emitting module BaseAPI
Build complete! (9.76s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "BaseAPI",
"name" : "BaseAPI",
"path" : "/host/spi-builder-workspace",
"platforms" : [
{
"name" : "macos",
"version" : "10.13"
},
{
"name" : "ios",
"version" : "9.0"
},
{
"name" : "watchos",
"version" : "2.0"
},
{
"name" : "tvos",
"version" : "9.0"
}
],
"products" : [
{
"name" : "BaseAPI",
"targets" : [
"BaseAPI"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "BaseAPI",
"module_type" : "SwiftTarget",
"name" : "BaseAPI",
"path" : "BaseAPI/Classes",
"product_memberships" : [
"BaseAPI"
],
"sources" : [
"BaseAPI.swift",
"Extensions/CharacterSet.swift",
"Extensions/URLSession.swift",
"Request.swift",
"RequestHeaderFields.swift",
"RequestMethod.swift",
"ResponsetHeaderFields.swift"
],
"type" : "library"
}
],
"tools_version" : "5.2"
}
Done.