Build Information
Successful build of APIRequest, reference master (0f0e8e
), with Swift 6.0 for Linux on 2 Nov 2024 22:22:20 UTC.
Swift 6 data race errors: 3
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" 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.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/NathanFallet/APIRequest.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/NathanFallet/APIRequest
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 0f0e8e7 Fixing README
Cloned https://github.com/NathanFallet/APIRequest.git
Revision (git rev-parse @):
0f0e8e78d50be27444704022cc8740730f1efa54
SUCCESS checkout https://github.com/NathanFallet/APIRequest.git at master
========================================
Build
========================================
Selected platform: linux
Swift version: 6.0
Building package at path: $PWD
https://github.com/NathanFallet/APIRequest.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" 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
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling APIRequest APIConfiguration.swift
/host/spi-builder-workspace/Sources/APIRequest/Request/APIConfiguration.swift:25:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | // Default configuration
25 | public static var current: APIConfiguration?
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | // Configuration variables
[4/11] Compiling APIRequest APIRequest.swift
/host/spi-builder-workspace/Sources/APIRequest/Request/APIConfiguration.swift:25:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | // Default configuration
25 | public static var current: APIConfiguration?
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | // Configuration variables
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:14: warning: non-final class 'APIRequest' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
24 | #endif
25 |
26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
| `- warning: non-final class 'APIRequest' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
27 |
28 | /// Completion handler of an APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:40:17: warning: stored property 'method' of 'Sendable'-conforming class 'APIRequest' is mutable; this is an error in the Swift 6 language mode
38 |
39 | // Object properties
40 | private var method: String
| `- warning: stored property 'method' of 'Sendable'-conforming class 'APIRequest' is mutable; this is an error in the Swift 6 language mode
41 | private var path: String
42 | private var configuration: APIConfiguration
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:211:82: warning: capture of 'completionHandler' with non-sendable type 'APIRequest.CompletionHandler<T>' (aka '(Optional<T>, APIResponseStatus) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
209 | if (error as NSError).code == -1009 {
210 | // Device is offline
211 | self.end(data: nil, status: .offline, completionHandler: completionHandler)
| |- warning: capture of 'completionHandler' with non-sendable type 'APIRequest.CompletionHandler<T>' (aka '(Optional<T>, APIResponseStatus) -> ()') 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'
212 | return
213 | }
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:252:17: warning: capture of 'completionHandler' with non-sendable type 'APIRequest.CompletionHandler<T>' (aka '(Optional<T>, APIResponseStatus) -> ()') in a `@Sendable` closure; this is an error in the Swift 6 language mode
250 | DispatchQueue.main.async {
251 | // And complete
252 | completionHandler(data, status)
| |- warning: capture of 'completionHandler' with non-sendable type 'APIRequest.CompletionHandler<T>' (aka '(Optional<T>, APIResponseStatus) -> ()') 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'
253 | }
254 | } else {
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:252:35: warning: capture of 'data' with non-sendable type 'T?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
245 |
246 | // End the request and call completion handler
247 | private func end<T>(data: T?, status: APIResponseStatus, completionHandler: @escaping CompletionHandler<T>) where T: Decodable {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
248 | if configuration.completionInMainThread {
249 | // Call main thread
250 | DispatchQueue.main.async {
251 | // And complete
252 | completionHandler(data, status)
| `- warning: capture of 'data' with non-sendable type 'T?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
253 | }
254 | } else {
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:252:41: warning: capture of 'status' with non-sendable type 'APIResponseStatus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
250 | DispatchQueue.main.async {
251 | // And complete
252 | completionHandler(data, status)
| `- warning: capture of 'status' with non-sendable type 'APIResponseStatus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
253 | }
254 | } else {
/host/spi-builder-workspace/Sources/APIRequest/Request/APIResponseStatus.swift:22:13: note: consider making enum 'APIResponseStatus' conform to the 'Sendable' protocol
20 | import Foundation
21 |
22 | public enum APIResponseStatus: Int, CaseIterable {
| `- note: consider making enum 'APIResponseStatus' conform to the 'Sendable' protocol
23 |
24 | // 1xx
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:252:17: warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
250 | DispatchQueue.main.async {
251 | // And complete
252 | completionHandler(data, status)
| |- warning: sending 'completionHandler' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'completionHandler' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
253 | }
254 | } else {
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:252:35: warning: sending 'data' risks causing data races; this is an error in the Swift 6 language mode
250 | DispatchQueue.main.async {
251 | // And complete
252 | completionHandler(data, status)
| |- warning: sending 'data' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'data' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
253 | }
254 | } else {
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:252:41: warning: sending 'status' risks causing data races; this is an error in the Swift 6 language mode
250 | DispatchQueue.main.async {
251 | // And complete
252 | completionHandler(data, status)
| |- warning: sending 'status' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'status' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
253 | }
254 | } else {
[5/11] Compiling APIRequest JSONAPIEncoder.swift
[6/11] Compiling APIRequest EncodableExtension.swift
[7/11] Compiling APIRequest APIEncoder.swift
[8/11] Compiling APIRequest APIDecoder.swift
[9/11] Emitting module APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIConfiguration.swift:25:23: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
23 |
24 | // Default configuration
25 | public static var current: APIConfiguration?
| |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
26 |
27 | // Configuration variables
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:26:14: warning: non-final class 'APIRequest' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
24 | #endif
25 |
26 | public class APIRequest: NSObject, URLSessionDelegate, URLSessionTaskDelegate {
| `- warning: non-final class 'APIRequest' cannot conform to 'Sendable'; use '@unchecked Sendable'; this is an error in the Swift 6 language mode
27 |
28 | /// Completion handler of an APIRequest
/host/spi-builder-workspace/Sources/APIRequest/Request/APIRequest.swift:40:17: warning: stored property 'method' of 'Sendable'-conforming class 'APIRequest' is mutable; this is an error in the Swift 6 language mode
38 |
39 | // Object properties
40 | private var method: String
| `- warning: stored property 'method' of 'Sendable'-conforming class 'APIRequest' is mutable; this is an error in the Swift 6 language mode
41 | private var path: String
42 | private var configuration: APIConfiguration
[10/11] Compiling APIRequest JSONAPIDecoder.swift
[11/11] Compiling APIRequest APIResponseStatus.swift
Build complete! (8.80s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "APIRequest",
"name" : "APIRequest",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "APIRequest",
"targets" : [
"APIRequest"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "APIRequestTests",
"module_type" : "SwiftTarget",
"name" : "APIRequestTests",
"path" : "Tests/APIRequestTests",
"sources" : [
"APIRequestTests.swift",
"XCTestManifests.swift"
],
"target_dependencies" : [
"APIRequest"
],
"type" : "test"
},
{
"c99name" : "APIRequest",
"module_type" : "SwiftTarget",
"name" : "APIRequest",
"path" : "Sources/APIRequest",
"product_memberships" : [
"APIRequest"
],
"sources" : [
"Decoder/APIDecoder.swift",
"Decoder/JSONAPIDecoder.swift",
"Encoder/APIEncoder.swift",
"Encoder/EncodableExtension.swift",
"Encoder/JSONAPIEncoder.swift",
"Request/APIConfiguration.swift",
"Request/APIRequest.swift",
"Request/APIResponseStatus.swift"
],
"type" : "library"
}
],
"tools_version" : "5.2"
}
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Done.