Build Information
Successful build of IBMWatsonRestKit, reference master (724572
), with Swift 6.0 for macOS (SPM) on 27 Nov 2024 08:14:46 UTC.
Swift 6 data race errors: 3
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.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
Build Log
========================================
RunAll
========================================
Builder version: 4.58.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
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "restkit",
"name": "IBMWatsonRestKit",
"url": "https://github.com/watson-developer-cloud/restkit.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/restkit",
"dependencies": [
]
}
]
}
Fetching https://github.com/watson-developer-cloud/restkit.git
[1/861] Fetching restkit
Fetched https://github.com/watson-developer-cloud/restkit.git from cache (0.84s)
Creating working copy for https://github.com/watson-developer-cloud/restkit.git
Working copy of https://github.com/watson-developer-cloud/restkit.git resolved at master (7245729)
warning: '.resolve-product-dependencies': dependency 'restkit' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/watson-developer-cloud/restkit.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.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--7754E27361AE5C74.txt
[3/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 nonisolated 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 nonisolated 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 | }
[4/10] Compiling RestKit RestResponse.swift
[5/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 |
[6/10] Compiling RestKit MultipartFormData.swift
[7/10] Compiling RestKit Authentication.swift
[8/10] Compiling RestKit JSON.swift
[9/10] Compiling RestKit CodableExtensions.swift
[10/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 nonisolated 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 nonisolated 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
Build complete! (9.68s)
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.