Build Information
Successful build of BaseAPI with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
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 /Users/admin/builder/spi-builder-workspace/.git/
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: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/serhii-londar/BaseAPI.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-6F35C1178C84523A.txt
[3/10] Compiling BaseAPI RequestMethod.swift
[4/10] Compiling BaseAPI RequestHeaderFields.swift
[5/10] Compiling BaseAPI ResponsetHeaderFields.swift
[6/10] Compiling BaseAPI URLSession.swift
/Users/admin/builder/spi-builder-workspace/BaseAPI/Classes/Extensions/URLSession.swift:27:13: warning: mutation of captured var 'data' in concurrently-executing code; this is an error in the Swift 6 language mode
25 |
26 | let dataTask = self.dataTask(with: request) { (rData, rResponse, eError) in
27 | data = rData
| `- warning: mutation of captured var 'data' in concurrently-executing code; this is an error in the Swift 6 language mode
28 | response = rResponse
29 | error = eError
/Users/admin/builder/spi-builder-workspace/BaseAPI/Classes/Extensions/URLSession.swift:28:13: warning: mutation of captured var 'response' in concurrently-executing code; this is an error in the Swift 6 language mode
26 | let dataTask = self.dataTask(with: request) { (rData, rResponse, eError) in
27 | data = rData
28 | response = rResponse
| `- warning: mutation of captured var 'response' in concurrently-executing code; this is an error in the Swift 6 language mode
29 | error = eError
30 | semaphore.signal()
/Users/admin/builder/spi-builder-workspace/BaseAPI/Classes/Extensions/URLSession.swift:29:13: warning: mutation of captured var 'error' in concurrently-executing code; this is an error in the Swift 6 language mode
27 | data = rData
28 | response = rResponse
29 | error = eError
| `- warning: mutation of captured var 'error' in concurrently-executing code; this is an error in the Swift 6 language mode
30 | semaphore.signal()
31 | }
/Users/admin/builder/spi-builder-workspace/BaseAPI/Classes/Extensions/URLSession.swift:47:13: warning: mutation of captured var 'data' in concurrently-executing code; this is an error in the Swift 6 language mode
45 |
46 | let dataTask = self.dataTask(with: url) {
47 | data = $0
| `- warning: mutation of captured var 'data' in concurrently-executing code; this is an error in the Swift 6 language mode
48 | response = $1
49 | error = $2
/Users/admin/builder/spi-builder-workspace/BaseAPI/Classes/Extensions/URLSession.swift:48:13: warning: mutation of captured var 'response' in concurrently-executing code; this is an error in the Swift 6 language mode
46 | let dataTask = self.dataTask(with: url) {
47 | data = $0
48 | response = $1
| `- warning: mutation of captured var 'response' in concurrently-executing code; this is an error in the Swift 6 language mode
49 | error = $2
50 |
/Users/admin/builder/spi-builder-workspace/BaseAPI/Classes/Extensions/URLSession.swift:49:13: warning: mutation of captured var 'error' in concurrently-executing code; this is an error in the Swift 6 language mode
47 | data = $0
48 | response = $1
49 | error = $2
| `- warning: mutation of captured var 'error' in concurrently-executing code; this is an error in the Swift 6 language mode
50 |
51 | semaphore.signal()
[7/10] Emitting module BaseAPI
[8/10] Compiling BaseAPI BaseAPI.swift
/Users/admin/builder/spi-builder-workspace/BaseAPI/Classes/BaseAPI.swift:30:60: warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
27 | }
28 |
29 | public func send(request: URLRequest, completion: @escaping BaseAPICompletion) {
| `- note: parameter 'completion' is implicitly non-sendable
30 | session.dataTask(with: request, completionHandler: completion).resume()
| `- warning: passing non-sendable parameter 'completion' to function expecting a @Sendable closure
31 | }
32 |
/Users/admin/builder/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()
/Users/admin/builder/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()
/Users/admin/builder/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 | }
/Users/admin/builder/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)
/Users/admin/builder/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 |
/Users/admin/builder/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 |
/Users/admin/builder/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 |
/Users/admin/builder/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()
/Users/admin/builder/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()
/Users/admin/builder/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 | }
/Users/admin/builder/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()
/Users/admin/builder/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()
/Users/admin/builder/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 | }
/Users/admin/builder/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()
/Users/admin/builder/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()
/Users/admin/builder/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 | }
/Users/admin/builder/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()
/Users/admin/builder/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()
/Users/admin/builder/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 | }
/Users/admin/builder/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()
/Users/admin/builder/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()
/Users/admin/builder/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 | }
[9/10] Compiling BaseAPI CharacterSet.swift
[10/10] Compiling BaseAPI Request.swift
Build complete! (19.88s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "BaseAPI",
"name" : "BaseAPI",
"path" : "/Users/admin/builder/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.