Build Information
Successful build of sMock with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 7
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/Alkenso/sMock.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Alkenso/sMock
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 831a80a Merge branch 'refactoring'
Cloned https://github.com/Alkenso/sMock.git
Revision (git rev-parse @):
831a80a4cef948c0b0a4bbaf812f7b6f4b101ba1
SUCCESS checkout https://github.com/Alkenso/sMock.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/Alkenso/sMock.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/8] Compiling sMock _MockFunctionBase.swift
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:45:23: warning: static property 'unexpectedCallBehavior' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
43 | /// By default, in such cases sMock will trigger XCTFail.
44 | /// Change this handler in 'setUp' method either on each test case or in the very beginning of the individual test.
45 | public static var unexpectedCallBehavior: UnexpectedCallBehavior = .failTest
| |- warning: static property 'unexpectedCallBehavior' 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 'unexpectedCallBehavior' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'unexpectedCallBehavior' 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
46 |
47 | /// Timeout used when calling `waitForExpectations() -> Bool` method.
/Users/admin/builder/spi-builder-workspace/Sources/sMock/_MockFunctionBase.swift:285:13: warning: capture of 'self' with non-sendable type 'ArgumentCaptor<Args>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
272 | // MARK: - Capturing arguments
273 |
274 | public class ArgumentCaptor<Args> {
| `- note: generic class 'ArgumentCaptor' does not conform to the 'Sendable' protocol
275 | private var queue = DispatchQueue(label: "ArgumentCaptor")
276 | private var capturedArgs: [Args] = []
:
283 | func capture(_ args: Args) {
284 | queue.async {
285 | self.capturedArgs.append(args)
| `- warning: capture of 'self' with non-sendable type 'ArgumentCaptor<Args>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
286 | }
287 | }
/Users/admin/builder/spi-builder-workspace/Sources/sMock/_MockFunctionBase.swift:285:38: warning: capture of 'args' with non-sendable type 'Args' in a `@Sendable` closure; this is an error in the Swift 6 language mode
272 | // MARK: - Capturing arguments
273 |
274 | public class ArgumentCaptor<Args> {
| `- note: consider making generic parameter 'Args' conform to the 'Sendable' protocol
275 | private var queue = DispatchQueue(label: "ArgumentCaptor")
276 | private var capturedArgs: [Args] = []
:
283 | func capture(_ args: Args) {
284 | queue.async {
285 | self.capturedArgs.append(args)
| `- warning: capture of 'args' with non-sendable type 'Args' in a `@Sendable` closure; this is an error in the Swift 6 language mode
286 | }
287 | }
[4/8] Compiling sMock sMock.swift
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:45:23: warning: static property 'unexpectedCallBehavior' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
43 | /// By default, in such cases sMock will trigger XCTFail.
44 | /// Change this handler in 'setUp' method either on each test case or in the very beginning of the individual test.
45 | public static var unexpectedCallBehavior: UnexpectedCallBehavior = .failTest
| |- warning: static property 'unexpectedCallBehavior' 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 'unexpectedCallBehavior' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'unexpectedCallBehavior' 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
46 |
47 | /// Timeout used when calling `waitForExpectations() -> Bool` method.
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:49:23: warning: static property 'waitTimeout' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
47 | /// Timeout used when calling `waitForExpectations() -> Bool` method.
48 | /// Change this value in 'setUp' method either on each test case or in the very beginning of the individual test.
49 | public static var waitTimeout: TimeInterval = 0.5
| |- warning: static property 'waitTimeout' 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 'waitTimeout' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'waitTimeout' 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
50 |
51 | /// Wait for currently registered sMock expectations.
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:80:23: warning: static property 'explicitCurrentTestCase' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
78 | /// Set this variable before using any mock objects.
79 | /// Usually set it in 'setUp' method of concrete XCTestCase, assigning 'self' to it.
80 | public static var explicitCurrentTestCase: XCTestCase? = nil
| |- warning: static property 'explicitCurrentTestCase' 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 'explicitCurrentTestCase' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'explicitCurrentTestCase' 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
81 | }
82 |
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:94:24: warning: static property 'expectations' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
92 |
93 | private static let expectationsSyncQueue = DispatchQueue(label: "sMock.expectationsSyncQueue")
94 | private static var expectations: [XCTestExpectation] = []
| |- warning: static property 'expectations' 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 'expectations' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'expectations' 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
95 | }
96 |
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:112:16: warning: static property 'defaultUnexpectedCallBehavior' is not concurrency-safe because non-'Sendable' type 'sMock.UnexpectedCallBehavior' may have shared mutable state; this is an error in the Swift 6 language mode
29 | /// sMock configuration.
30 | extension sMock {
31 | public enum UnexpectedCallBehavior {
| `- note: consider making enum 'UnexpectedCallBehavior' conform to the 'Sendable' protocol
32 | /// Only warns (print) about unexpected call of mocked entities.
33 | case warning
:
110 |
111 | private extension sMock {
112 | static let defaultUnexpectedCallBehavior: UnexpectedCallBehavior = .failTest
| |- warning: static property 'defaultUnexpectedCallBehavior' is not concurrency-safe because non-'Sendable' type 'sMock.UnexpectedCallBehavior' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultUnexpectedCallBehavior' 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
113 | static var defaultWaitTimeout: TimeInterval = 0.5
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:113:16: warning: static property 'defaultWaitTimeout' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
111 | private extension sMock {
112 | static let defaultUnexpectedCallBehavior: UnexpectedCallBehavior = .failTest
113 | static var defaultWaitTimeout: TimeInterval = 0.5
| |- warning: static property 'defaultWaitTimeout' 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 'defaultWaitTimeout' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultWaitTimeout' 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
114 | }
115 |
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:119:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MocksSupport' may have shared mutable state; this is an error in the Swift 6 language mode
116 | // MARK: - MocksSupport
117 |
118 | class MocksSupport {
| `- note: class 'MocksSupport' does not conform to the 'Sendable' protocol
119 | static let shared = MocksSupport()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MocksSupport' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
120 |
121 | var currentTestCase: XCTestCase {
[5/8] Compiling sMock MockMethod.swift
[6/8] Compiling sMock MockClosure.swift
[7/8] Compiling sMock Matcher.swift
[8/8] Emitting module sMock
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:45:23: warning: static property 'unexpectedCallBehavior' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
43 | /// By default, in such cases sMock will trigger XCTFail.
44 | /// Change this handler in 'setUp' method either on each test case or in the very beginning of the individual test.
45 | public static var unexpectedCallBehavior: UnexpectedCallBehavior = .failTest
| |- warning: static property 'unexpectedCallBehavior' 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 'unexpectedCallBehavior' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'unexpectedCallBehavior' 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
46 |
47 | /// Timeout used when calling `waitForExpectations() -> Bool` method.
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:49:23: warning: static property 'waitTimeout' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
47 | /// Timeout used when calling `waitForExpectations() -> Bool` method.
48 | /// Change this value in 'setUp' method either on each test case or in the very beginning of the individual test.
49 | public static var waitTimeout: TimeInterval = 0.5
| |- warning: static property 'waitTimeout' 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 'waitTimeout' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'waitTimeout' 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
50 |
51 | /// Wait for currently registered sMock expectations.
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:80:23: warning: static property 'explicitCurrentTestCase' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
78 | /// Set this variable before using any mock objects.
79 | /// Usually set it in 'setUp' method of concrete XCTestCase, assigning 'self' to it.
80 | public static var explicitCurrentTestCase: XCTestCase? = nil
| |- warning: static property 'explicitCurrentTestCase' 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 'explicitCurrentTestCase' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'explicitCurrentTestCase' 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
81 | }
82 |
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:94:24: warning: static property 'expectations' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
92 |
93 | private static let expectationsSyncQueue = DispatchQueue(label: "sMock.expectationsSyncQueue")
94 | private static var expectations: [XCTestExpectation] = []
| |- warning: static property 'expectations' 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 'expectations' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'expectations' 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
95 | }
96 |
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:112:16: warning: static property 'defaultUnexpectedCallBehavior' is not concurrency-safe because non-'Sendable' type 'sMock.UnexpectedCallBehavior' may have shared mutable state; this is an error in the Swift 6 language mode
29 | /// sMock configuration.
30 | extension sMock {
31 | public enum UnexpectedCallBehavior {
| `- note: consider making enum 'UnexpectedCallBehavior' conform to the 'Sendable' protocol
32 | /// Only warns (print) about unexpected call of mocked entities.
33 | case warning
:
110 |
111 | private extension sMock {
112 | static let defaultUnexpectedCallBehavior: UnexpectedCallBehavior = .failTest
| |- warning: static property 'defaultUnexpectedCallBehavior' is not concurrency-safe because non-'Sendable' type 'sMock.UnexpectedCallBehavior' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'defaultUnexpectedCallBehavior' 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
113 | static var defaultWaitTimeout: TimeInterval = 0.5
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:113:16: warning: static property 'defaultWaitTimeout' is not concurrency-safe because it is non-isolated global shared mutable state; this is an error in the Swift 6 language mode
111 | private extension sMock {
112 | static let defaultUnexpectedCallBehavior: UnexpectedCallBehavior = .failTest
113 | static var defaultWaitTimeout: TimeInterval = 0.5
| |- warning: static property 'defaultWaitTimeout' 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 'defaultWaitTimeout' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'defaultWaitTimeout' 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
114 | }
115 |
/Users/admin/builder/spi-builder-workspace/Sources/sMock/sMock.swift:119:16: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MocksSupport' may have shared mutable state; this is an error in the Swift 6 language mode
116 | // MARK: - MocksSupport
117 |
118 | class MocksSupport {
| `- note: class 'MocksSupport' does not conform to the 'Sendable' protocol
119 | static let shared = MocksSupport()
| |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'MocksSupport' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'shared' 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
120 |
121 | var currentTestCase: XCTestCase {
Build complete! (27.54s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "sMock",
"name" : "sMock",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "sMock",
"targets" : [
"sMock"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "sMockTests",
"module_type" : "SwiftTarget",
"name" : "sMockTests",
"path" : "Sources/sMockTests",
"sources" : [
"ClosureTests.swift",
"MatcherTests.swift"
],
"target_dependencies" : [
"sMock"
],
"type" : "test"
},
{
"c99name" : "sMock",
"module_type" : "SwiftTarget",
"name" : "sMock",
"path" : "Sources/sMock",
"product_memberships" : [
"sMock"
],
"sources" : [
"Matcher.swift",
"MockClosure.swift",
"MockMethod.swift",
"_MockFunctionBase.swift",
"sMock.swift"
],
"type" : "library"
}
],
"tools_version" : "5.1"
}
Done.