Build Information
Successful build of Causality with Swift 6.0 (beta) for macOS (SPM).
Swift 6 data race errors: 2
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/dannys42/Causality.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/dannys42/Causality
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at da261a5 Add link to FayeSwift project
Cloned https://github.com/dannys42/Causality.git
Revision (git rev-parse @):
da261a50546d538a0610d07bd1737f5312138466
SUCCESS checkout https://github.com/dannys42/Causality.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/dannys42/Causality.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/13] Compiling Causality Message.swift
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Message.swift:18:29: warning: static property 'message' is not concurrency-safe because non-'Sendable' type 'Causality.NoMessage' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | /// A convenience message that can be included for events that have no associated data
13 | struct NoMessage: Message {
| `- note: consider making struct 'NoMessage' conform to the 'Sendable' protocol
14 |
15 | /// Users of the library are not expected to create these messages
16 | private init() {
17 | }
18 | internal static let message = NoMessage()
| |- warning: static property 'message' is not concurrency-safe because non-'Sendable' type 'Causality.NoMessage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'message' 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
19 | }
20 |
[4/14] Compiling Causality WorkQueue.swift
/Users/admin/builder/spi-builder-workspace/Sources/Causality/WorkQueue.swift:51:17: warning: capture of 'work' with non-sendable type '() -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
49 | case .dispatch(let q):
50 | q.async {
51 | work()
| |- warning: capture of 'work' with non-sendable type '() -> 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'
52 | }
53 | case .operation(let q):
/Users/admin/builder/spi-builder-workspace/Sources/Causality/WorkQueue.swift:55:17: warning: capture of 'work' with non-sendable type '() -> Void' in a `@Sendable` closure; this is an error in the Swift 6 language mode
53 | case .operation(let q):
54 | q.addOperation {
55 | work()
| |- warning: capture of 'work' with non-sendable type '() -> 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'
56 | }
57 | }
[5/14] Compiling Causality State.swift
/Users/admin/builder/spi-builder-workspace/Sources/Causality/State.swift:186:34: warning: capture of 'self' with non-sendable type 'Causality.Bus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
184 | public func unsubscribe<State: Causality.AnyState<Value>, Value: Causality.StateValue>(_ subscriptions: [Causality.StateSubscription<State, Value>]) {
185 | self.queue.async {
186 | var newSubscribers = self.eventSubscribers
| `- warning: capture of 'self' with non-sendable type 'Causality.Bus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
187 | for subscription in subscriptions {
188 | newSubscribers.removeValue(forKey: subscription.id)
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Bus.swift:32:11: note: class 'Bus' does not conform to the 'Sendable' protocol
30 |
31 | /// A Bus for events to go from publishers to subscribers
32 | class Bus {
| `- note: class 'Bus' does not conform to the 'Sendable' protocol
33 | /// A name for the bus.
34 | public private(set) var label: String
/Users/admin/builder/spi-builder-workspace/Sources/Causality/State.swift:187:33: warning: capture of 'subscriptions' with non-sendable type '[Causality.StateSubscription<State, Value>]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
185 | self.queue.async {
186 | var newSubscribers = self.eventSubscribers
187 | for subscription in subscriptions {
| `- warning: capture of 'subscriptions' with non-sendable type '[Causality.StateSubscription<State, Value>]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
188 | newSubscribers.removeValue(forKey: subscription.id)
189 | }
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Internal/StateSubscription.swift:18:11: note: generic class 'StateSubscription' does not conform to the 'Sendable' protocol
16 | /// Subscription handler for States.
17 | /// Used to `unsubscribe()` or determine the `bus` or `state` that triggered an update.
18 | class StateSubscription<State: Causality.AnyState<Value>, Value: Causality.StateValue>: CausalityAnyStateSubscription {
| `- note: generic class 'StateSubscription' does not conform to the 'Sendable' protocol
19 | typealias SubscriptionHandler = (Causality.StateSubscription<State,Value>, Value)->Void
20 |
/Users/admin/builder/spi-builder-workspace/Sources/Causality/State.swift:205:13: warning: capture of 'self' with non-sendable type 'Causality.Bus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
203 | let subscriber = Causality.StateSubscription(bus: self, state: state, handler: handler, workQueue: workQueue)
204 | self.queue.async {
205 | self.stateSubscribers[subscriber.id] = subscriber
| `- warning: capture of 'self' with non-sendable type 'Causality.Bus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
206 |
207 | if let lastState = self.state[state.causalityStateId] as? Value {
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Bus.swift:32:11: note: class 'Bus' does not conform to the 'Sendable' protocol
30 |
31 | /// A Bus for events to go from publishers to subscribers
32 | class Bus {
| `- note: class 'Bus' does not conform to the 'Sendable' protocol
33 | /// A name for the bus.
34 | public private(set) var label: String
/Users/admin/builder/spi-builder-workspace/Sources/Causality/State.swift:205:35: warning: capture of 'subscriber' with non-sendable type 'Causality.StateSubscription<State, Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
203 | let subscriber = Causality.StateSubscription(bus: self, state: state, handler: handler, workQueue: workQueue)
204 | self.queue.async {
205 | self.stateSubscribers[subscriber.id] = subscriber
| `- warning: capture of 'subscriber' with non-sendable type 'Causality.StateSubscription<State, Value>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
206 |
207 | if let lastState = self.state[state.causalityStateId] as? Value {
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Internal/StateSubscription.swift:18:11: note: generic class 'StateSubscription' does not conform to the 'Sendable' protocol
16 | /// Subscription handler for States.
17 | /// Used to `unsubscribe()` or determine the `bus` or `state` that triggered an update.
18 | class StateSubscription<State: Causality.AnyState<Value>, Value: Causality.StateValue>: CausalityAnyStateSubscription {
| `- note: generic class 'StateSubscription' does not conform to the 'Sendable' protocol
19 | typealias SubscriptionHandler = (Causality.StateSubscription<State,Value>, Value)->Void
20 |
/Users/admin/builder/spi-builder-workspace/Sources/Causality/State.swift:207:43: warning: capture of 'state' with non-sendable type 'State' in a `@Sendable` closure; this is an error in the Swift 6 language mode
199 | /// - workQueue: The queue on which to execute the handler
200 | /// - handler: A handler that is called when the state changes. If there was a previous value, the handler be called immediately with the old value.
201 | private func subscribe<State: Causality.AnyState<Value>, Value: Causality.StateValue>(_ state: State, workQueue: WorkQueue, handler: @escaping (Causality.StateSubscription<State, Value>, Value)->Void) -> Causality.StateSubscription<State, Value> {
| `- note: consider making generic parameter 'State' conform to the 'Sendable' protocol
202 |
203 | let subscriber = Causality.StateSubscription(bus: self, state: state, handler: handler, workQueue: workQueue)
:
205 | self.stateSubscribers[subscriber.id] = subscriber
206 |
207 | if let lastState = self.state[state.causalityStateId] as? Value {
| `- warning: capture of 'state' with non-sendable type 'State' in a `@Sendable` closure; this is an error in the Swift 6 language mode
208 | let runQueue = subscriber.workQueue.withDefault(workQueue)
209 | runQueue.execute {
/Users/admin/builder/spi-builder-workspace/Sources/Causality/State.swift:210:21: warning: capture of 'subscriber' with non-sendable type 'Causality.StateSubscription<State, Value>' in an isolated closure; this is an error in the Swift 6 language mode
208 | let runQueue = subscriber.workQueue.withDefault(workQueue)
209 | runQueue.execute {
210 | subscriber.handler(subscriber, lastState)
| `- warning: capture of 'subscriber' with non-sendable type 'Causality.StateSubscription<State, Value>' in an isolated closure; this is an error in the Swift 6 language mode
211 | }
212 | }
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Internal/StateSubscription.swift:18:11: note: generic class 'StateSubscription' does not conform to the 'Sendable' protocol
16 | /// Subscription handler for States.
17 | /// Used to `unsubscribe()` or determine the `bus` or `state` that triggered an update.
18 | class StateSubscription<State: Causality.AnyState<Value>, Value: Causality.StateValue>: CausalityAnyStateSubscription {
| `- note: generic class 'StateSubscription' does not conform to the 'Sendable' protocol
19 | typealias SubscriptionHandler = (Causality.StateSubscription<State,Value>, Value)->Void
20 |
[6/14] Compiling Causality StateSubscription.swift
[7/14] Compiling Causality CausalityAnySubscription.swift
[8/14] Compiling Causality Event.swift
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Message.swift:18:29: warning: static property 'message' is not concurrency-safe because non-'Sendable' type 'Causality.NoMessage' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | /// A convenience message that can be included for events that have no associated data
13 | struct NoMessage: Message {
| `- note: consider making struct 'NoMessage' conform to the 'Sendable' protocol
14 |
15 | /// Users of the library are not expected to create these messages
16 | private init() {
17 | }
18 | internal static let message = NoMessage()
| |- warning: static property 'message' is not concurrency-safe because non-'Sendable' type 'Causality.NoMessage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'message' 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
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Event.swift:164:34: warning: capture of 'self' with non-sendable type 'Causality.Bus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
162 | public func unsubscribe<Event: Causality.AnyEvent<Message>, Message: Causality.Message>(_ subscriptions: [Causality.EventSubscription<Event, Message>]) {
163 | self.queue.async {
164 | var newSubscribers = self.eventSubscribers
| `- warning: capture of 'self' with non-sendable type 'Causality.Bus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
165 | for subscription in subscriptions {
166 | newSubscribers.removeValue(forKey: subscription.id)
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Bus.swift:32:11: note: class 'Bus' does not conform to the 'Sendable' protocol
30 |
31 | /// A Bus for events to go from publishers to subscribers
32 | class Bus {
| `- note: class 'Bus' does not conform to the 'Sendable' protocol
33 | /// A name for the bus.
34 | public private(set) var label: String
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Event.swift:165:33: warning: capture of 'subscriptions' with non-sendable type '[Causality.EventSubscription<Event, Message>]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
163 | self.queue.async {
164 | var newSubscribers = self.eventSubscribers
165 | for subscription in subscriptions {
| `- warning: capture of 'subscriptions' with non-sendable type '[Causality.EventSubscription<Event, Message>]' in a `@Sendable` closure; this is an error in the Swift 6 language mode
166 | newSubscribers.removeValue(forKey: subscription.id)
167 | }
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Internal/EventSubscription.swift:19:18: note: generic class 'EventSubscription' does not conform to the 'Sendable' protocol
17 | /// Subscription handler for Events.
18 | /// Used to `unsubscribe()` or determine the `bus` or `state` that triggered an update.
19 | public class EventSubscription<Event: Causality.AnyEvent<Message>, Message: Causality.Message>: CausalityAnyEventSubscription {
| `- note: generic class 'EventSubscription' does not conform to the 'Sendable' protocol
20 | typealias SubscriptionHandler = (EventSubscription<Event,Message>, Message)->Void
21 |
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Event.swift:184:13: warning: capture of 'self' with non-sendable type 'Causality.Bus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
182 | let subscriber = Causality.EventSubscription(bus: self, event: event, handler: handler, workQueue: workQueue)
183 | self.queue.async {
184 | self.eventSubscribers[subscriber.id] = subscriber
| `- warning: capture of 'self' with non-sendable type 'Causality.Bus' in a `@Sendable` closure; this is an error in the Swift 6 language mode
185 | }
186 |
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Bus.swift:32:11: note: class 'Bus' does not conform to the 'Sendable' protocol
30 |
31 | /// A Bus for events to go from publishers to subscribers
32 | class Bus {
| `- note: class 'Bus' does not conform to the 'Sendable' protocol
33 | /// A name for the bus.
34 | public private(set) var label: String
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Event.swift:184:35: warning: capture of 'subscriber' with non-sendable type 'Causality.EventSubscription<Event, Message>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
182 | let subscriber = Causality.EventSubscription(bus: self, event: event, handler: handler, workQueue: workQueue)
183 | self.queue.async {
184 | self.eventSubscribers[subscriber.id] = subscriber
| `- warning: capture of 'subscriber' with non-sendable type 'Causality.EventSubscription<Event, Message>' in a `@Sendable` closure; this is an error in the Swift 6 language mode
185 | }
186 |
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Internal/EventSubscription.swift:19:18: note: generic class 'EventSubscription' does not conform to the 'Sendable' protocol
17 | /// Subscription handler for Events.
18 | /// Used to `unsubscribe()` or determine the `bus` or `state` that triggered an update.
19 | public class EventSubscription<Event: Causality.AnyEvent<Message>, Message: Causality.Message>: CausalityAnyEventSubscription {
| `- note: generic class 'EventSubscription' does not conform to the 'Sendable' protocol
20 | typealias SubscriptionHandler = (EventSubscription<Event,Message>, Message)->Void
21 |
[9/14] Compiling Causality EncodableExtension.swift
[10/14] Compiling Causality Causality.swift
[11/14] Compiling Causality Address.swift
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Bus.swift:15:16: warning: static property 'bus' is not concurrency-safe because non-'Sendable' type 'Causality.Bus' may have shared mutable state; this is an error in the Swift 6 language mode
13 | static let globalQueue = DispatchQueue(label: "Causality.global", qos: .default, attributes: [], autoreleaseFrequency: .inherit, target: .global(qos: .default))
14 | /// A default/global bus
15 | static let bus = Bus(label: "global", queue: globalQueue)
| |- warning: static property 'bus' is not concurrency-safe because non-'Sendable' type 'Causality.Bus' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'bus' 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
16 |
17 | /// Subscriptions can have the following statuses:
:
30 |
31 | /// A Bus for events to go from publishers to subscribers
32 | class Bus {
| `- note: class 'Bus' does not conform to the 'Sendable' protocol
33 | /// A name for the bus.
34 | public private(set) var label: String
[12/14] Compiling Causality Bus.swift
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Bus.swift:15:16: warning: static property 'bus' is not concurrency-safe because non-'Sendable' type 'Causality.Bus' may have shared mutable state; this is an error in the Swift 6 language mode
13 | static let globalQueue = DispatchQueue(label: "Causality.global", qos: .default, attributes: [], autoreleaseFrequency: .inherit, target: .global(qos: .default))
14 | /// A default/global bus
15 | static let bus = Bus(label: "global", queue: globalQueue)
| |- warning: static property 'bus' is not concurrency-safe because non-'Sendable' type 'Causality.Bus' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'bus' 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
16 |
17 | /// Subscriptions can have the following statuses:
:
30 |
31 | /// A Bus for events to go from publishers to subscribers
32 | class Bus {
| `- note: class 'Bus' does not conform to the 'Sendable' protocol
33 | /// A name for the bus.
34 | public private(set) var label: String
[13/14] Emitting module Causality
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Bus.swift:15:16: warning: static property 'bus' is not concurrency-safe because non-'Sendable' type 'Causality.Bus' may have shared mutable state; this is an error in the Swift 6 language mode
13 | static let globalQueue = DispatchQueue(label: "Causality.global", qos: .default, attributes: [], autoreleaseFrequency: .inherit, target: .global(qos: .default))
14 | /// A default/global bus
15 | static let bus = Bus(label: "global", queue: globalQueue)
| |- warning: static property 'bus' is not concurrency-safe because non-'Sendable' type 'Causality.Bus' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'bus' 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
16 |
17 | /// Subscriptions can have the following statuses:
:
30 |
31 | /// A Bus for events to go from publishers to subscribers
32 | class Bus {
| `- note: class 'Bus' does not conform to the 'Sendable' protocol
33 | /// A name for the bus.
34 | public private(set) var label: String
/Users/admin/builder/spi-builder-workspace/Sources/Causality/Message.swift:18:29: warning: static property 'message' is not concurrency-safe because non-'Sendable' type 'Causality.NoMessage' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | /// A convenience message that can be included for events that have no associated data
13 | struct NoMessage: Message {
| `- note: consider making struct 'NoMessage' conform to the 'Sendable' protocol
14 |
15 | /// Users of the library are not expected to create these messages
16 | private init() {
17 | }
18 | internal static let message = NoMessage()
| |- warning: static property 'message' is not concurrency-safe because non-'Sendable' type 'Causality.NoMessage' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: annotate 'message' 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
19 | }
20 |
[14/14] Compiling Causality EventSubscription.swift
Build complete! (21.04s)
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "Causality",
"name" : "Causality",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "Causality",
"targets" : [
"Causality"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "CausalityTests",
"module_type" : "SwiftTarget",
"name" : "CausalityTests",
"path" : "Tests/CausalityTests",
"sources" : [
"EventTests.swift",
"StateTests.swift",
"XCTestManifests.swift"
],
"target_dependencies" : [
"Causality"
],
"type" : "test"
},
{
"c99name" : "Causality",
"module_type" : "SwiftTarget",
"name" : "Causality",
"path" : "Sources/Causality",
"product_memberships" : [
"Causality"
],
"sources" : [
"Address.swift",
"Bus.swift",
"Causality.swift",
"Event.swift",
"Internal/CausalityAnySubscription.swift",
"Internal/EncodableExtension.swift",
"Internal/EventSubscription.swift",
"Internal/StateSubscription.swift",
"Message.swift",
"State.swift",
"WorkQueue.swift"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
Done.