Build Information
Successful build of IBMSwiftSDKCore, reference 1.2.1 (652ff3
), with Swift 6.0 for Linux on 28 Nov 2024 11:32:49 UTC.
Swift 6 data race errors: 3
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/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 -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/IBM/swift-sdk-core.git
Reference: 1.2.1
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/IBM/swift-sdk-core
* tag 1.2.1 -> FETCH_HEAD
HEAD is now at 652ff3c build(version): ensure proper versionging is followed
Cloned https://github.com/IBM/swift-sdk-core.git
Revision (git rev-parse @):
652ff3cc98af7adb8130863fd7de7ab1e734e795
SUCCESS checkout https://github.com/IBM/swift-sdk-core.git at 1.2.1
========================================
Build
========================================
Selected platform: linux
Swift version: 6.0
Building package at path: $PWD
https://github.com/IBM/swift-sdk-core.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/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 -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 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/15] Compiling IBMSwiftSDKCore RestRequest.swift
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestRequest.swift:28: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
26 | /// The "User-Agent" header that will be sent with every network request
27 | /// This can include information such as the operating system and the SDK/framework calling this API
28 | 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
29 |
30 | private let session: URLSession
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestRequest.swift:114:25: 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
112 | if let error = error as NSError? {
113 | if error.code == NSURLErrorServerCertificateUntrusted {
114 | completionHandler(nil, nil, RestError.sslCertificateUntrusted)
| |- 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'
115 | return
116 | }
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestRequest.swift:136:44: warning: capture of 'self' with non-sendable type 'RestRequest' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 | // MARK: - RestRequest
23 |
24 | public struct RestRequest {
| `- note: consider making struct 'RestRequest' conform to the 'Sendable' protocol
25 |
26 | /// The "User-Agent" header that will be sent with every network request
:
134 | guard (200..<300).contains(response.statusCode) else {
135 | if let data = data {
136 | 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
137 | completionHandler(data, response, serviceError)
138 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestRequest.swift:322: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
320 | // ensure there is a valid http response
321 | guard let response = response as? HTTPURLResponse else {
322 | 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'
323 | return
324 | }
[4/16] Compiling IBMSwiftSDKCore JSON.swift
[5/16] Compiling IBMSwiftSDKCore MultipartFormData.swift
[6/16] Compiling IBMSwiftSDKCore RestError.swift
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestError.swift:55: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
53 |
54 | /// Generic HTTP error with a status code and description.
55 | 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
56 |
57 | /// Error that does not fall under any other `RestError` category
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestError.swift:58: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
56 |
57 | /// Error that does not fall under any other `RestError` category
58 | 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
59 | }
60 |
[7/16] Compiling IBMSwiftSDKCore InsecureConnection.swift
[8/16] Compiling IBMSwiftSDKCore JWT.swift
[9/16] Compiling IBMSwiftSDKCore CodableExtensions.swift
[10/16] Compiling IBMSwiftSDKCore CredentialUtils.swift
[11/16] Compiling IBMSwiftSDKCore Authentication.swift
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/CloudPakForDataAuthenticator.swift:89:37: warning: capture of 'self' with non-sendable type 'CloudPakForDataTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 | }
28 |
29 | class CloudPakForDataTokenSource: TokenSource {
| `- note: class 'CloudPakForDataTokenSource' does not conform to the 'Sendable' protocol
30 |
31 | let url: String
:
87 | completionHandler(token, nil)
88 | if let refreshDate = refreshDate, refreshDate.timeIntervalSinceNow < 0 {
89 | refreshQueue.async{ self.refreshToken() }
| `- warning: capture of 'self' with non-sendable type 'CloudPakForDataTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
90 | }
91 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/CloudPakForDataAuthenticator.swift:94:32: warning: capture of 'self' with non-sendable type 'CloudPakForDataTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 | }
28 |
29 | class CloudPakForDataTokenSource: TokenSource {
| `- note: class 'CloudPakForDataTokenSource' does not conform to the 'Sendable' protocol
30 |
31 | let url: String
:
92 | fetchQueue.async {
93 | // Check if token was obtained by an earlier fetch
94 | if let token = self.token {
| `- warning: capture of 'self' with non-sendable type 'CloudPakForDataTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | completionHandler(token, nil)
96 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/CloudPakForDataAuthenticator.swift:95:21: warning: capture of 'completionHandler' with non-sendable type '(String?, RestError?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
93 | // Check if token was obtained by an earlier fetch
94 | if let token = self.token {
95 | completionHandler(token, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(String?, 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'
96 | } else {
97 | self.requestToken(completionHandler: completionHandler)
[12/16] Compiling IBMSwiftSDKCore CloudPakForDataAuthenticator.swift
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/CloudPakForDataAuthenticator.swift:89:37: warning: capture of 'self' with non-sendable type 'CloudPakForDataTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 | }
28 |
29 | class CloudPakForDataTokenSource: TokenSource {
| `- note: class 'CloudPakForDataTokenSource' does not conform to the 'Sendable' protocol
30 |
31 | let url: String
:
87 | completionHandler(token, nil)
88 | if let refreshDate = refreshDate, refreshDate.timeIntervalSinceNow < 0 {
89 | refreshQueue.async{ self.refreshToken() }
| `- warning: capture of 'self' with non-sendable type 'CloudPakForDataTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
90 | }
91 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/CloudPakForDataAuthenticator.swift:94:32: warning: capture of 'self' with non-sendable type 'CloudPakForDataTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
27 | }
28 |
29 | class CloudPakForDataTokenSource: TokenSource {
| `- note: class 'CloudPakForDataTokenSource' does not conform to the 'Sendable' protocol
30 |
31 | let url: String
:
92 | fetchQueue.async {
93 | // Check if token was obtained by an earlier fetch
94 | if let token = self.token {
| `- warning: capture of 'self' with non-sendable type 'CloudPakForDataTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
95 | completionHandler(token, nil)
96 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/CloudPakForDataAuthenticator.swift:95:21: warning: capture of 'completionHandler' with non-sendable type '(String?, RestError?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
93 | // Check if token was obtained by an earlier fetch
94 | if let token = self.token {
95 | completionHandler(token, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(String?, 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'
96 | } else {
97 | self.requestToken(completionHandler: completionHandler)
[13/16] Emitting module IBMSwiftSDKCore
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestError.swift:55: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
53 |
54 | /// Generic HTTP error with a status code and description.
55 | 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
56 |
57 | /// Error that does not fall under any other `RestError` category
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestError.swift:58: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
56 |
57 | /// Error that does not fall under any other `RestError` category
58 | 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
59 | }
60 |
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/RestRequest.swift:28: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
26 | /// The "User-Agent" header that will be sent with every network request
27 | /// This can include information such as the operating system and the SDK/framework calling this API
28 | 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
29 |
30 | private let session: URLSession
[14/16] Compiling IBMSwiftSDKCore ConfigBasedAuthenticatorFactory.swift
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/IAMAuthenticator.swift:85:37: warning: capture of 'self' with non-sendable type 'IAMTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
34 | }
35 |
36 | class IAMTokenSource: TokenSource {
| `- note: class 'IAMTokenSource' does not conform to the 'Sendable' protocol
37 |
38 | let url: String
:
83 | completionHandler(token, nil)
84 | if let refreshDate = refreshDate, refreshDate.timeIntervalSinceNow < 0 {
85 | refreshQueue.async{ self.refreshToken() }
| `- warning: capture of 'self' with non-sendable type 'IAMTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
86 | }
87 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/IAMAuthenticator.swift:90:32: warning: capture of 'self' with non-sendable type 'IAMTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
34 | }
35 |
36 | class IAMTokenSource: TokenSource {
| `- note: class 'IAMTokenSource' does not conform to the 'Sendable' protocol
37 |
38 | let url: String
:
88 | fetchQueue.async {
89 | // Check if token was obtained by an earlier fetch
90 | if let token = self.token {
| `- warning: capture of 'self' with non-sendable type 'IAMTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
91 | completionHandler(token, nil)
92 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/IAMAuthenticator.swift:91:21: warning: capture of 'completionHandler' with non-sendable type '(String?, RestError?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
89 | // Check if token was obtained by an earlier fetch
90 | if let token = self.token {
91 | completionHandler(token, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(String?, 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'
92 | } else {
93 | self.requestToken(completionHandler: completionHandler)
[15/16] Compiling IBMSwiftSDKCore IAMAuthenticator.swift
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/IAMAuthenticator.swift:85:37: warning: capture of 'self' with non-sendable type 'IAMTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
34 | }
35 |
36 | class IAMTokenSource: TokenSource {
| `- note: class 'IAMTokenSource' does not conform to the 'Sendable' protocol
37 |
38 | let url: String
:
83 | completionHandler(token, nil)
84 | if let refreshDate = refreshDate, refreshDate.timeIntervalSinceNow < 0 {
85 | refreshQueue.async{ self.refreshToken() }
| `- warning: capture of 'self' with non-sendable type 'IAMTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
86 | }
87 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/IAMAuthenticator.swift:90:32: warning: capture of 'self' with non-sendable type 'IAMTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
34 | }
35 |
36 | class IAMTokenSource: TokenSource {
| `- note: class 'IAMTokenSource' does not conform to the 'Sendable' protocol
37 |
38 | let url: String
:
88 | fetchQueue.async {
89 | // Check if token was obtained by an earlier fetch
90 | if let token = self.token {
| `- warning: capture of 'self' with non-sendable type 'IAMTokenSource' in a `@Sendable` closure; this is an error in the Swift 6 language mode
91 | completionHandler(token, nil)
92 | } else {
/host/spi-builder-workspace/Sources/IBMSwiftSDKCore/Authentication/IAMAuthenticator.swift:91:21: warning: capture of 'completionHandler' with non-sendable type '(String?, RestError?) -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
89 | // Check if token was obtained by an earlier fetch
90 | if let token = self.token {
91 | completionHandler(token, nil)
| |- warning: capture of 'completionHandler' with non-sendable type '(String?, 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'
92 | } else {
93 | self.requestToken(completionHandler: completionHandler)
[16/16] Compiling IBMSwiftSDKCore RestResponse.swift
Build complete! (14.73s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "IBMSwiftSDKCore",
"name" : "IBMSwiftSDKCore",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "IBMSwiftSDKCore",
"targets" : [
"IBMSwiftSDKCore"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "IBMSwiftSDKCoreTests",
"module_type" : "SwiftTarget",
"name" : "IBMSwiftSDKCoreTests",
"path" : "Tests/IBMSwiftSDKCoreTests",
"sources" : [
"AuthenticationTests.swift",
"CodableExtensionsTests.swift",
"ConfigBasedAuthenticatorFactoryTests-Linux.swift",
"CredentialUtilsTests-Linux.swift",
"JSONTests.swift",
"MockURLProtocol.swift",
"MultiPartFormDataTests.swift",
"ResponseTests.swift",
"RestErrorTests.swift",
"SDKInitializerTests.swift"
],
"target_dependencies" : [
"IBMSwiftSDKCore"
],
"type" : "test"
},
{
"c99name" : "IBMSwiftSDKCore",
"module_type" : "SwiftTarget",
"name" : "IBMSwiftSDKCore",
"path" : "Sources/IBMSwiftSDKCore",
"product_memberships" : [
"IBMSwiftSDKCore"
],
"sources" : [
"Authentication/Authentication.swift",
"Authentication/CloudPakForDataAuthenticator.swift",
"Authentication/ConfigBasedAuthenticatorFactory.swift",
"Authentication/IAMAuthenticator.swift",
"Authentication/InsecureConnection.swift",
"Authentication/JWT.swift",
"CodableExtensions.swift",
"CredentialUtils.swift",
"JSON.swift",
"MultipartFormData.swift",
"RestError.swift",
"RestRequest.swift",
"RestResponse.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
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.