Build Information
Successful build of IBMWatsonRestKit with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 3
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/watson-developer-cloud/restkit.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/watson-developer-cloud/restkit
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 7245729 Merge pull request #26 from watson-developer-cloud/ci/automated-release
Cloned https://github.com/watson-developer-cloud/restkit.git
Revision (git rev-parse @):
7245729a223b69e813a1fa9fa2de87053b2f5ea6
SUCCESS checkout https://github.com/watson-developer-cloud/restkit.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/watson-developer-cloud/restkit.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 RestKit RestError.swift
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestError.swift:46:10: warning: associated value 'http(statusCode:message:metadata:)' of 'Sendable'-conforming enum 'RestError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
44 |
45 | /// Generic HTTP error with a status code and description.
46 | case http(statusCode: Int?, message: String?, metadata: [String: Any]?)
| `- warning: associated value 'http(statusCode:message:metadata:)' of 'Sendable'-conforming enum 'RestError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
47 |
48 | /// Error that does not fall under any other `RestError` category
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestError.swift:49:10: warning: associated value 'other(message:metadata:)' of 'Sendable'-conforming enum 'RestError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
47 |
48 | /// Error that does not fall under any other `RestError` category
49 | case other(message: String?, metadata: [String: Any]?)
| `- warning: associated value 'other(message:metadata:)' of 'Sendable'-conforming enum 'RestError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
50 | }
51 |
[4/10] Compiling RestKit JSON.swift
[5/10] Compiling RestKit MultipartFormData.swift
[6/10] Compiling RestKit CodableExtensions.swift
[7/10] Compiling RestKit RestRequest.swift
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestRequest.swift:25:23: warning: static property 'userAgent' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
23 | /// The "User-Agent" header that will be sent with every network request
24 | /// This can include information such as the operating system and the SDK/framework calling this API
25 | public static var userAgent: String?
| |- warning: static property 'userAgent' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'userAgent' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'userAgent' 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 | private let session: URLSession
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestRequest.swift:110:21: warning: capture of 'completionHandler' with non-sendable type '(Data?, HTTPURLResponse?, RestError?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
108 | guard let response = response as? HTTPURLResponse else {
109 | let error = RestError.noResponse
110 | completionHandler(data, nil, error)
| |- warning: capture of 'completionHandler' with non-sendable type '(Data?, HTTPURLResponse?, RestError?) -> 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'
111 | return
112 | }
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestRequest.swift:124:44: warning: capture of 'self' with non-sendable type 'RestRequest' in a `@Sendable` closure; this is an error in the Swift 6 language mode
19 | // MARK: - RestRequest
20 |
21 | public struct RestRequest {
| `- note: consider making struct 'RestRequest' conform to the 'Sendable' protocol
22 |
23 | /// The "User-Agent" header that will be sent with every network request
:
122 | guard (200..<300).contains(response.statusCode) else {
123 | if let data = data {
124 | let serviceError = self.errorResponseDecoder(data, response)
| `- warning: capture of 'self' with non-sendable type 'RestRequest' in a `@Sendable` closure; this is an error in the Swift 6 language mode
125 | completionHandler(data, response, serviceError)
126 | } else {
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestRequest.swift:310:21: warning: capture of 'completionHandler' with non-sendable type '(HTTPURLResponse?, RestError?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
308 | // ensure there is a valid http response
309 | guard let response = response as? HTTPURLResponse else {
310 | completionHandler(nil, RestError.noResponse)
| |- warning: capture of 'completionHandler' with non-sendable type '(HTTPURLResponse?, RestError?) -> 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'
311 | return
312 | }
[8/10] Compiling RestKit RestResponse.swift
[9/10] Emitting module RestKit
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestError.swift:46:10: warning: associated value 'http(statusCode:message:metadata:)' of 'Sendable'-conforming enum 'RestError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
44 |
45 | /// Generic HTTP error with a status code and description.
46 | case http(statusCode: Int?, message: String?, metadata: [String: Any]?)
| `- warning: associated value 'http(statusCode:message:metadata:)' of 'Sendable'-conforming enum 'RestError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
47 |
48 | /// Error that does not fall under any other `RestError` category
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestError.swift:49:10: warning: associated value 'other(message:metadata:)' of 'Sendable'-conforming enum 'RestError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
47 |
48 | /// Error that does not fall under any other `RestError` category
49 | case other(message: String?, metadata: [String: Any]?)
| `- warning: associated value 'other(message:metadata:)' of 'Sendable'-conforming enum 'RestError' has non-sendable type 'Any'; this is an error in the Swift 6 language mode
50 | }
51 |
/Users/admin/builder/spi-builder-workspace/Sources/RestKit/RestRequest.swift:25:23: warning: static property 'userAgent' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
23 | /// The "User-Agent" header that will be sent with every network request
24 | /// This can include information such as the operating system and the SDK/framework calling this API
25 | public static var userAgent: String?
| |- warning: static property 'userAgent' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'userAgent' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'userAgent' 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 | private let session: URLSession
[10/10] Compiling RestKit Authentication.swift
Build complete! (19.03s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "IBMWatsonRestKit",
"name" : "IBMWatsonRestKit",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "RestKit",
"targets" : [
"RestKit"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "RestKitTests",
"module_type" : "SwiftTarget",
"name" : "RestKitTests",
"path" : "Tests/RestKitTests",
"sources" : [
"AuthenticationTests.swift",
"CodableExtensionsTests.swift",
"JSONTests.swift",
"MockURLProtocol.swift",
"MultiPartFormDataTests.swift",
"ResponseTests.swift",
"RestErrorTests.swift"
],
"target_dependencies" : [
"RestKit"
],
"type" : "test"
},
{
"c99name" : "RestKit",
"module_type" : "SwiftTarget",
"name" : "RestKit",
"path" : "Sources/RestKit",
"product_memberships" : [
"RestKit"
],
"sources" : [
"Authentication.swift",
"CodableExtensions.swift",
"JSON.swift",
"MultipartFormData.swift",
"RestError.swift",
"RestRequest.swift",
"RestResponse.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
Done.