Build Information
Successful build of SwiftUI-UDF, reference 1.4.7 (623231
), with Swift 6.0 for macOS (SPM) on 12 Dec 2024 17:40:14 UTC.
Swift 6 data race errors: 6
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.2.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
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
75 | /// The view body of the `AlertTextField`.
76 | public var body: some View {
77 | TextField(title, text: $debouncer.value)
| `- warning: main actor-isolated property '$debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
78 | #if os(iOS)
79 | .textInputAutocapitalization(textInputAutocapitalization)
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:82:24: warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
80 | #endif
81 | .submitLabel(submitLabel)
82 | .onReceive(debouncer.$debouncedValue.dropFirst()) { value in
| `- warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
83 | self.text.wrappedValue = value
84 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:86:20: warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
84 | }
85 | .onChange(of: text.wrappedValue) { newValue in
86 | if debouncer.value.isEmpty, !newValue.isEmpty {
| `- warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
87 | debouncer.value = newValue
88 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:87:21: warning: main actor-isolated property 'debouncer' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: mutation of this property is only permitted within the actor
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
85 | .onChange(of: text.wrappedValue) { newValue in
86 | if debouncer.value.isEmpty, !newValue.isEmpty {
87 | debouncer.value = newValue
| `- warning: main actor-isolated property 'debouncer' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
88 | }
89 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertBuilder.swift:231:16: warning: static property 'alertBuilders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
229 | typealias AlertBuilderBlock = () -> AlertStyle
230 |
231 | static var alertBuilders: [AnyHashable: AlertBuilderBlock] = [:]
| |- warning: static property 'alertBuilders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'alertBuilders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'alertBuilders' 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
232 |
233 | /// Registers a custom alert builder for a given ID.
/Users/admin/builder/spi-builder-workspace/UDF/Store/XCTestStore/XCTestStore.swift:42:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
40 | mutableState.initialSetup()
41 |
42 | let store = InternalStore(initial: mutableState, loggers: [TestStoreLogger()])
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending global actor 'XCTestStoreActor'-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and global actor 'XCTestStoreActor'-isolated uses
43 | self.store = store
44 | self._state = .init(wrappedValue: mutableState, store: store)
[232/244] Compiling UDF AlertActionsBuilder.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/DelayedOperation.swift:14:13: warning: class 'DelayedOperation' must restate inherited '@unchecked Sendable' conformance
12 | import Foundation
13 |
14 | final class DelayedOperation: AsynchronousOperation {
| `- warning: class 'DelayedOperation' must restate inherited '@unchecked Sendable' conformance
15 | var priority: StoreOperation.Priority
16 | private let delay: Delay
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/StoreOperation.swift:14:13: warning: class 'StoreOperation' must restate inherited '@unchecked Sendable' conformance
12 | import Foundation
13 |
14 | final class StoreOperation: AsynchronousOperation {
| `- warning: class 'StoreOperation' must restate inherited '@unchecked Sendable' conformance
15 | var priority: Priority
16 | var closure: () async -> Void
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/StoreOperation.swift:53:37: warning: 'userInteractive' is deprecated: userInteractive priority will be removed
51 | switch self {
52 | case .default: .high
53 | case .userInteractive: .userInteractive
| `- warning: 'userInteractive' is deprecated: userInteractive priority will be removed
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/StoreQueue.swift:16:13: warning: class 'StoreQueue' must restate inherited '@unchecked Sendable' conformance
14 | /// A class that provides a serial queue for store operations, ensuring that only one operation
15 | /// is executed at a time.
16 | final class StoreQueue: OperationQueue {
| `- warning: class 'StoreQueue' must restate inherited '@unchecked Sendable' conformance
17 | /// Initializes a new `StoreQueue` with a maximum concurrency of one and a user-interactive quality of service.
18 | override init() {
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/StoreQueue.swift:29:7: warning: class 'AsynchronousOperation' must restate inherited '@unchecked Sendable' conformance
27 | /// This class manages the operation's execution state and allows subclasses to define
28 | /// custom asynchronous work.
29 | class AsynchronousOperation: Operation {
| `- warning: class 'AsynchronousOperation' must restate inherited '@unchecked Sendable' conformance
30 | /// Indicates that the operation is asynchronous.
31 | override var isAsynchronous: Bool {
/Users/admin/builder/spi-builder-workspace/UDF/Store/XCTestStore/XCTestGroup.swift:6:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | public final class XCTestGroup {
6 | static var shared = XCTestGroup()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- 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
7 | private var group: OSAllocatedUnfairLock<DispatchGroup> = .init(initialState: DispatchGroup())
8 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/XCTestStore/XCTestStore.swift:46:34: warning: actor-isolated property 'subject' can not be referenced from global actor 'XCTestStoreActor'; this is an error in the Swift 6 language mode
44 | self._state = .init(wrappedValue: mutableState, store: store)
45 |
46 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from global actor 'XCTestStoreActor'; this is an error in the Swift 6 language mode
47 | .map(\.0)
48 | .assign(to: \.state, on: self)
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:77:42: warning: main actor-isolated subscript 'subscript(dynamicMember:)' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
75 | /// The view body of the `AlertTextField`.
76 | public var body: some View {
77 | TextField(title, text: $debouncer.value)
| `- warning: main actor-isolated subscript 'subscript(dynamicMember:)' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
78 | #if os(iOS)
79 | .textInputAutocapitalization(textInputAutocapitalization)
SwiftUICore.ObservedObject:4:43: note: subscript declared here
2 | @MainActor @propertyWrapper @preconcurrency @frozen public struct ObservedObject<ObjectType> : DynamicProperty where ObjectType : ObservableObject {
3 | @MainActor @dynamicMemberLookup @preconcurrency @frozen public struct Wrapper {
4 | @MainActor @preconcurrency public subscript<Subject>(dynamicMember keyPath: ReferenceWritableKeyPath<ObjectType, Subject>) -> Binding<Subject> { get }
| `- note: subscript declared here
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:77:32: warning: main actor-isolated property '$debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
75 | /// The view body of the `AlertTextField`.
76 | public var body: some View {
77 | TextField(title, text: $debouncer.value)
| `- warning: main actor-isolated property '$debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
78 | #if os(iOS)
79 | .textInputAutocapitalization(textInputAutocapitalization)
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:82:24: warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
80 | #endif
81 | .submitLabel(submitLabel)
82 | .onReceive(debouncer.$debouncedValue.dropFirst()) { value in
| `- warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
83 | self.text.wrappedValue = value
84 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:86:20: warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
84 | }
85 | .onChange(of: text.wrappedValue) { newValue in
86 | if debouncer.value.isEmpty, !newValue.isEmpty {
| `- warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
87 | debouncer.value = newValue
88 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:87:21: warning: main actor-isolated property 'debouncer' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: mutation of this property is only permitted within the actor
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
85 | .onChange(of: text.wrappedValue) { newValue in
86 | if debouncer.value.isEmpty, !newValue.isEmpty {
87 | debouncer.value = newValue
| `- warning: main actor-isolated property 'debouncer' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
88 | }
89 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertBuilder.swift:231:16: warning: static property 'alertBuilders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
229 | typealias AlertBuilderBlock = () -> AlertStyle
230 |
231 | static var alertBuilders: [AnyHashable: AlertBuilderBlock] = [:]
| |- warning: static property 'alertBuilders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'alertBuilders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'alertBuilders' 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
232 |
233 | /// Registers a custom alert builder for a given ID.
/Users/admin/builder/spi-builder-workspace/UDF/Store/XCTestStore/XCTestStore.swift:42:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
40 | mutableState.initialSetup()
41 |
42 | let store = InternalStore(initial: mutableState, loggers: [TestStoreLogger()])
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending global actor 'XCTestStoreActor'-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and global actor 'XCTestStoreActor'-isolated uses
43 | self.store = store
44 | self._state = .init(wrappedValue: mutableState, store: store)
[233/244] Compiling UDF AlertBuilder.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/DelayedOperation.swift:14:13: warning: class 'DelayedOperation' must restate inherited '@unchecked Sendable' conformance
12 | import Foundation
13 |
14 | final class DelayedOperation: AsynchronousOperation {
| `- warning: class 'DelayedOperation' must restate inherited '@unchecked Sendable' conformance
15 | var priority: StoreOperation.Priority
16 | private let delay: Delay
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/StoreOperation.swift:14:13: warning: class 'StoreOperation' must restate inherited '@unchecked Sendable' conformance
12 | import Foundation
13 |
14 | final class StoreOperation: AsynchronousOperation {
| `- warning: class 'StoreOperation' must restate inherited '@unchecked Sendable' conformance
15 | var priority: Priority
16 | var closure: () async -> Void
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/StoreOperation.swift:53:37: warning: 'userInteractive' is deprecated: userInteractive priority will be removed
51 | switch self {
52 | case .default: .high
53 | case .userInteractive: .userInteractive
| `- warning: 'userInteractive' is deprecated: userInteractive priority will be removed
54 | }
55 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/StoreQueue.swift:16:13: warning: class 'StoreQueue' must restate inherited '@unchecked Sendable' conformance
14 | /// A class that provides a serial queue for store operations, ensuring that only one operation
15 | /// is executed at a time.
16 | final class StoreQueue: OperationQueue {
| `- warning: class 'StoreQueue' must restate inherited '@unchecked Sendable' conformance
17 | /// Initializes a new `StoreQueue` with a maximum concurrency of one and a user-interactive quality of service.
18 | override init() {
/Users/admin/builder/spi-builder-workspace/UDF/Store/StoreQueue/StoreQueue.swift:29:7: warning: class 'AsynchronousOperation' must restate inherited '@unchecked Sendable' conformance
27 | /// This class manages the operation's execution state and allows subclasses to define
28 | /// custom asynchronous work.
29 | class AsynchronousOperation: Operation {
| `- warning: class 'AsynchronousOperation' must restate inherited '@unchecked Sendable' conformance
30 | /// Indicates that the operation is asynchronous.
31 | override var isAsynchronous: Bool {
/Users/admin/builder/spi-builder-workspace/UDF/Store/XCTestStore/XCTestGroup.swift:6:16: warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
4 |
5 | public final class XCTestGroup {
6 | static var shared = XCTestGroup()
| |- warning: static property 'shared' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'shared' to a 'let' constant to make 'Sendable' shared state immutable
| |- 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
7 | private var group: OSAllocatedUnfairLock<DispatchGroup> = .init(initialState: DispatchGroup())
8 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/XCTestStore/XCTestStore.swift:46:34: warning: actor-isolated property 'subject' can not be referenced from global actor 'XCTestStoreActor'; this is an error in the Swift 6 language mode
44 | self._state = .init(wrappedValue: mutableState, store: store)
45 |
46 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from global actor 'XCTestStoreActor'; this is an error in the Swift 6 language mode
47 | .map(\.0)
48 | .assign(to: \.state, on: self)
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:77:42: warning: main actor-isolated subscript 'subscript(dynamicMember:)' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
75 | /// The view body of the `AlertTextField`.
76 | public var body: some View {
77 | TextField(title, text: $debouncer.value)
| `- warning: main actor-isolated subscript 'subscript(dynamicMember:)' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
78 | #if os(iOS)
79 | .textInputAutocapitalization(textInputAutocapitalization)
SwiftUICore.ObservedObject:4:43: note: subscript declared here
2 | @MainActor @propertyWrapper @preconcurrency @frozen public struct ObservedObject<ObjectType> : DynamicProperty where ObjectType : ObservableObject {
3 | @MainActor @dynamicMemberLookup @preconcurrency @frozen public struct Wrapper {
4 | @MainActor @preconcurrency public subscript<Subject>(dynamicMember keyPath: ReferenceWritableKeyPath<ObjectType, Subject>) -> Binding<Subject> { get }
| `- note: subscript declared here
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:77:32: warning: main actor-isolated property '$debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
75 | /// The view body of the `AlertTextField`.
76 | public var body: some View {
77 | TextField(title, text: $debouncer.value)
| `- warning: main actor-isolated property '$debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
78 | #if os(iOS)
79 | .textInputAutocapitalization(textInputAutocapitalization)
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:82:24: warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
80 | #endif
81 | .submitLabel(submitLabel)
82 | .onReceive(debouncer.$debouncedValue.dropFirst()) { value in
| `- warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
83 | self.text.wrappedValue = value
84 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:86:20: warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: property declared here
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
84 | }
85 | .onChange(of: text.wrappedValue) { newValue in
86 | if debouncer.value.isEmpty, !newValue.isEmpty {
| `- warning: main actor-isolated property 'debouncer' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
87 | debouncer.value = newValue
88 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertAction/AlertTextField.swift:87:21: warning: main actor-isolated property 'debouncer' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
52 | public var submitLabel: SubmitLabel = .done
53 |
54 | @StateObject private var debouncer: UserInputDebouncer<String>
| `- note: mutation of this property is only permitted within the actor
55 |
56 | public static func == (lhs: AlertTextField, rhs: AlertTextField) -> Bool {
:
85 | .onChange(of: text.wrappedValue) { newValue in
86 | if debouncer.value.isEmpty, !newValue.isEmpty {
87 | debouncer.value = newValue
| `- warning: main actor-isolated property 'debouncer' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
88 | }
89 | }
/Users/admin/builder/spi-builder-workspace/UDF/View/AlertBuilder/AlertBuilder.swift:231:16: warning: static property 'alertBuilders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
229 | typealias AlertBuilderBlock = () -> AlertStyle
230 |
231 | static var alertBuilders: [AnyHashable: AlertBuilderBlock] = [:]
| |- warning: static property 'alertBuilders' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'alertBuilders' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'alertBuilders' 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
232 |
233 | /// Registers a custom alert builder for a given ID.
/Users/admin/builder/spi-builder-workspace/UDF/Store/XCTestStore/XCTestStore.swift:42:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
40 | mutableState.initialSetup()
41 |
42 | let store = InternalStore(initial: mutableState, loggers: [TestStoreLogger()])
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending global actor 'XCTestStoreActor'-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and global actor 'XCTestStoreActor'-isolated uses
43 | self.store = store
44 | self._state = .init(wrappedValue: mutableState, store: store)
[234/244] Compiling UDF Action.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[235/244] Compiling UDF ActionGroup.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[236/244] Compiling UDF ActionGroupBuilder.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[237/244] Compiling UDF Actions.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[238/244] Compiling UDF InternalAction.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[239/244] Compiling UDF _AnyBindableAction.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[240/244] Compiling UDF DelayEffect.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[241/244] Compiling UDF FilterEffect.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[242/244] Compiling UDF LocationAccessEffect.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[243/244] Compiling UDF LocationMonitoringEffect.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[244/244] Compiling UDF EnvironmentStore.swift
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:128:20: warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
126 |
127 | /// A unique identifier for the error.
128 | public var id: AnyHashable
| `- warning: stored property 'id' of 'Sendable'-conforming struct 'Error' has non-sendable type 'AnyHashable'; this is an error in the Swift 6 language mode
129 |
130 | /// An integer representing the error code.
Swift.AnyHashable:1:23: note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
1 | @frozen public struct AnyHashable {
| `- note: struct 'AnyHashable' does not conform to the 'Sendable' protocol
2 | public init<H>(_ base: H) where H : Hashable
3 | public var base: Any { get }
/Users/admin/builder/spi-builder-workspace/UDF/Store/Action/Actions.swift:134:20: warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
132 |
133 | /// Additional metadata related to the error.
134 | public var meta: [String: Any]?
| `- warning: stored property 'meta' of 'Sendable'-conforming struct 'Error' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
135 |
136 | /// Initializes a new `Error` action.
/Users/admin/builder/spi-builder-workspace/UDF/Store/Effects/LocationAccessEffect.swift:74:25: warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
32 |
33 | /// A private subscription class that manages location updates.
34 | private final class LocationSubscription<S: Subscriber>: NSObject, CLLocationManagerDelegate,
| `- note: generic class 'LocationSubscription' does not conform to the 'Sendable' protocol
35 | Subscription where S.Input == any Action
36 | {
:
72 | accuracyAuthorization: accuracyAuthorization
73 | )
74 | _ = self?.subscriber?.receive(action)
| `- warning: capture of 'self' with non-sendable type 'Effects.LocationAccessEffect.LocationSubscription<S>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:13: warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
18 | /// The `EnvironmentStore` class is responsible for handling application state, managing subscribers, and dispatching actions.
19 | /// It works in conjunction with the `AppReducer` to provide unidirectional data flow throughout the app.
20 | public final class EnvironmentStore<State: AppReducer> {
| `- note: generic class 'EnvironmentStore' does not conform to the 'Sendable' protocol
21 | @SourceOfTruth public private(set) var state: State
22 |
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'self' with non-sendable type 'EnvironmentStore<State>?' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:74:34: warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
65 | /// - lineNumber: The line number where the action is dispatched. Defaults to the caller's line.
66 | public func dispatch(
67 | _ action: some Action,
| `- note: consider making generic parameter 'some Action' conform to the 'Sendable' protocol
68 | priority: ActionPriority = .default,
69 | fileName: String = #file,
:
72 | ) {
73 | storeQueue.async { [weak self] in
74 | self?.store.dispatch(action, priority: priority, fileName: fileName, functionName: functionName, lineNumber: lineNumber)
| `- warning: capture of 'action' with non-sendable type 'some Action' in a `@Sendable` closure
75 | }
76 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:138:34: warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
136 | /// Subscribes the environment store to changes in the state using a subject.
137 | private func sinkSubject() {
138 | self.cancelation = store.subject
| `- warning: actor-isolated property 'subject' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
139 | .receive(on: DispatchQueue.main)
140 | .sink { [unowned self] newState, oldState, animation in
/Users/admin/builder/spi-builder-workspace/UDF/Store/InternalStore.swift:15:9: note: property declared here
13 | var state: State
14 |
15 | let subject: PassthroughSubject<(State, State, Animation?), Never> = .init()
| `- note: property declared here
16 |
17 | var middlewares: OrderedSet<AnyMiddleware> = []
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:144:68: warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
142 |
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| |- warning: non-sendable type 'Dictionary<String, (State, State, Animation?) -> Void>.Values' returned by call to actor-isolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
| `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:39:21: warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
37 | mutableState.initialSetup()
38 |
39 | let store = InternalStore(initial: mutableState, loggers: loggers)
| |- warning: sending 'mutableState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'mutableState' to actor-isolated callee risks causing data races between actor-isolated and task-isolated uses
40 | self.store = store
41 | self._state = .init(wrappedValue: mutableState, store: store)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:143:39: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
141 | self.state = newState
142 |
143 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
144 | let subscribers = await subscribersCoordinator.allSubscibers()
| `- note: closure captures 'self' which is accessible to code in the current task
145 | await MainActor.run {
146 | for subscriber in subscribers {
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:145:41: warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
143 | Task(priority: .high) {
144 | let subscribers = await subscribersCoordinator.allSubscibers()
145 | await MainActor.run {
| `- warning: pattern that the region based isolation checker does not understand how to check. Please file a bug; this is an error in the Swift 6 language mode
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:40: warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'oldState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'oldState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:147:50: warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
145 | await MainActor.run {
146 | for subscriber in subscribers {
147 | subscriber(oldState, newState, animation)
| |- warning: sending 'newState' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'newState' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
148 | }
149 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:164:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
162 | let key = UUID().uuidString
163 |
164 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| `- note: closure captures 'self' which is accessible to code in the current task
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:165:42: warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
163 |
164 | Task(priority: .high) {
165 | await subscribersCoordinator.add(subscriber: statePublisher, for: key)
| |- warning: sending 'statePublisher' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'statePublisher' to actor-isolated instance method 'add(subscriber:for:)' risks causing data races between actor-isolated and task-isolated uses
166 | }
167 |
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:175:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
173 | /// - Parameter key: The unique key of the subscriber to remove.
174 | func removePublisher(forKey key: String) {
175 | Task(priority: .high) {
| `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
176 | await subscribersCoordinator.removeSubscriber(forKey: key)
| `- note: closure captures 'self' which is accessible to code in the current task
177 | }
178 | }
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:326:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
324 | func subscribeAsync(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
325 | executeSynchronously {
326 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
327 | build(self.store).map { wrapper in
328 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
/Users/admin/builder/spi-builder-workspace/UDF/Store/EnvironmentStore.swift:339:30: warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
337 | func subscribe(@MiddlewareBuilder<State> build: @escaping (_ store: any Store<State>) -> [MiddlewareWrapper<State>]) {
338 | executeSynchronously {
339 | await self.store.subscribe(
| `- warning: sending task-isolated value of type '[any Middleware<State>]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
340 | build(self.store).map { wrapper in
341 | wrapper.instance ?? self.middleware(store: self.store, type: wrapper.type)
[245/247] Compiling UDFXCTest XCTest+expectation.swift
[246/247] Compiling UDFXCTest XCTUnwrapAsync.swift
[247/247] Emitting module UDFXCTest
Build complete! (34.73s)
Build complete.
{
"dependencies" : [
{
"identity" : "swift-collections",
"requirement" : {
"range" : [
{
"lower_bound" : "1.1.4",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-collections"
},
{
"identity" : "runtime",
"requirement" : {
"range" : [
{
"lower_bound" : "2.2.6",
"upper_bound" : "3.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/urlaunched-com/Runtime"
}
],
"manifest_display_name" : "SwiftUI-UDF",
"name" : "SwiftUI-UDF",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "16.0"
},
{
"name" : "macos",
"version" : "13.0"
}
],
"products" : [
{
"name" : "UDF",
"targets" : [
"UDF"
],
"type" : {
"library" : [
"automatic"
]
}
},
{
"name" : "UDFXCTest",
"targets" : [
"UDFXCTest"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "UDFXCTest",
"module_type" : "SwiftTarget",
"name" : "UDFXCTest",
"path" : "UDFXCTest",
"product_memberships" : [
"UDFXCTest"
],
"sources" : [
"XCTUnwrapAsync.swift",
"XCTest+expectation.swift"
],
"target_dependencies" : [
"UDF"
],
"type" : "library"
},
{
"c99name" : "UDF",
"module_type" : "SwiftTarget",
"name" : "UDF",
"path" : "UDF",
"product_dependencies" : [
"OrderedCollections",
"Runtime"
],
"product_memberships" : [
"UDF",
"UDFXCTest"
],
"sources" : [
"Common/ActionPriority.swift",
"Common/Cached/Cached.swift",
"Common/Cached/Source/CacheSource.swift",
"Common/Cached/Source/FileCache.swift",
"Common/Common.swift",
"Common/Debouncer/Debouncer.swift",
"Common/Debouncer/UserInputDebouncer.swift",
"Common/Extensions/Binding+BindClosure.swift",
"Common/Extensions/CLAccuracyAuthorization.swift",
"Common/Extensions/CLAuthorizationStatus.swift",
"Common/Extensions/Collection+CaseIterable.swift",
"Common/Extensions/Dictionary+Storage.swift",
"Common/Extensions/Hashable.swift",
"Common/Extensions/ProcessInfo.swift",
"Common/Extensions/Publishers+AsyncState.swift",
"Common/Extensions/Text+Mirror.swift",
"Common/Extensions/View+AlertStatus.swift",
"Common/Extensions/View+NavigationDestination.swift",
"Common/Extensions/Window+Render.swift",
"Common/File.swift",
"Common/FileFunctionLine.swift",
"Common/GlobalValue.swift",
"Common/Merging/Mergeable+Dictionary.swift",
"Common/Merging/Mergeable+OrderedDictionary.swift",
"Common/Merging/Mergeable.swift",
"Common/Pagination/PaginationPage.swift",
"Common/Pagination/Paginator.swift",
"Common/PropertyWrappers/SourceOfTruth.swift",
"Common/Protocols/Initable.swift",
"Common/Protocols/IsEquatable.swift",
"Common/Protocols/WrappedReducer.swift",
"Common/RCDictionary.swift",
"Common/Scope/CombinedScope.swift",
"Common/Scope/ReducerScope.swift",
"Common/Scope/Scope+None.swift",
"Common/Scope/Scope.swift",
"Common/SubscribersCoordinator.swift",
"Common/Types.swift",
"Common/WeakObject.swift",
"Domain/Hook/Hook.swift",
"Domain/Hook/HookBuilder.swift",
"Domain/Hook/HookType.swift",
"Middleware/AnyMiddleware.swift",
"Middleware/BaseMiddleware.swift",
"Middleware/CancellableTask.swift",
"Middleware/Effect/ConcurrencyEffect.swift",
"Middleware/Effect/Effect.swift",
"Middleware/Effect/Effectable.swift",
"Middleware/Effect/PureEffect.swift",
"Middleware/EnvironmentMiddleware.swift",
"Middleware/Middleware.swift",
"Middleware/MiddlewareBuilder.swift",
"Middleware/MiddlewareStatus.swift",
"Middleware/ObservableMiddleware.swift",
"Middleware/ReducibleMiddleware.swift",
"Store/Action/Action.swift",
"Store/Action/ActionGroup/ActionGroup.swift",
"Store/Action/ActionGroup/ActionGroupBuilder.swift",
"Store/Action/Actions.swift",
"Store/Action/PrivateAction/InternalAction.swift",
"Store/Action/PrivateAction/_AnyBindableAction.swift",
"Store/Effects/DelayEffect.swift",
"Store/Effects/FilterEffect.swift",
"Store/Effects/LocationAccessEffect.swift",
"Store/Effects/LocationMonitoringEffect.swift",
"Store/EnvironmentStore.swift",
"Store/Flow/Flow.swift",
"Store/Flow/Flows.swift",
"Store/Flow/IdentifiableFlow.swift",
"Store/Flow/UserLocationFlow.swift",
"Store/Form.swift",
"Store/InternalStore.swift",
"Store/Logger/ActionLogger.swift",
"Store/Logger/ConsoleDebugLogger.swift",
"Store/Logger/Filters/DebugOnlyActionFilter.swift",
"Store/Logger/Filters/DefaultActionFilter.swift",
"Store/Logger/Filters/ErrorOnlyActionFilter.swift",
"Store/Logger/Filters/VerboseActionFilter.swift",
"Store/Logger/LogDistributor.swift",
"Store/Logger/LoggingAction.swift",
"Store/Logger/StringDescribingActionDescriptor.swift",
"Store/Reducer/AppReducer/AppReducer.swift",
"Store/Reducer/AppReducer/RuntimeReducing.swift",
"Store/Reducer/BindableReducer.swift",
"Store/Reducer/InitialSetup.swift",
"Store/Reducer/ReducerReference/BindableReducerReference.swift",
"Store/Reducer/ReducerReference/ReducerReference.swift",
"Store/Reducer/Reducible.swift",
"Store/Store.swift",
"Store/StoreQueue/DelayedOperation.swift",
"Store/StoreQueue/StoreOperation.swift",
"Store/StoreQueue/StoreQueue.swift",
"Store/XCTestStore/XCTestGroup.swift",
"Store/XCTestStore/XCTestStore.swift",
"View/AlertBuilder/AlertAction/AlertAction.swift",
"View/AlertBuilder/AlertAction/AlertButton.swift",
"View/AlertBuilder/AlertAction/AlertTextField.swift",
"View/AlertBuilder/AlertActionsBuilder.swift",
"View/AlertBuilder/AlertBuilder.swift",
"View/Component.swift",
"View/Container/BindableContainer.swift",
"View/Container/ConnectedContainer.swift",
"View/Container/Container.swift",
"View/Container/ContainerHooks.swift",
"View/Container/ContainerLifecycle.swift",
"View/Container/ContainerState.swift",
"View/Router/GlobalRouter/GlobalRouter.swift",
"View/Router/GlobalRouter/GlobalRoutingModifier.swift",
"View/Router/Router.swift"
],
"type" : "library"
},
{
"c99name" : "SwiftUI_UDF_Tests",
"module_type" : "SwiftTarget",
"name" : "SwiftUI-UDF-Tests",
"path" : "Tests/SwiftUI-UDF-Tests",
"sources" : [
"ActionGroup/ActionGroupBuilderTests.swift",
"Actions/DelayedActionTests.swift",
"Actions/ErrorActionTests.swift",
"Alert/AlertActionBuilderTests.swift",
"AlertTests.swift",
"BindableReducers/BindableContainerDataMutationTests.swift",
"BindableReducers/BindableContainerLifecycleTests.swift",
"BindableReducers/BindableContainerLoadUnloadTests.swift",
"BindableReducers/BindableReducersMiddlewareTests.swift",
"Cached/CachedTests.swift",
"ContainerHookTests.swift",
"ContainerLifecycleTests.swift",
"Mergeable/MergeableAppStateTests.swift",
"Mergeable/MergeableTests.swift",
"Middlewares/MiddlewareCancellationTests.swift",
"Middlewares/ObservableMiddlewareTests.swift",
"Middlewares/ReducibleMiddlewareTests.swift",
"NestedReducerTests.swift",
"PaginatorTests.swift",
"RouterTests.swift",
"StateCopyTests.swift"
],
"target_dependencies" : [
"UDFXCTest"
],
"type" : "test"
},
{
"c99name" : "SwiftUI_UDF_ConcurrencyTests",
"module_type" : "SwiftTarget",
"name" : "SwiftUI-UDF-ConcurrencyTests",
"path" : "Tests/SwiftUI-UDF-ConcurrencyTests",
"sources" : [
"AppStateInitialSetupTests.swift",
"ContainersRedrawing/ContainerScopeTests.swift",
"ContainersRedrawing/ContainerWithAppStateAsScopeTests.swift",
"DispatchActionsTests.swift",
"Middlewares/ConcurrencyMiddlewareCancellationTests.swift",
"Middlewares/ConcurrencyMiddlewareTaskIdTests.swift",
"Middlewares/MiddlewareCancellationTests.swift",
"Middlewares/MiddlewareDuplicationTests.swift",
"Middlewares/MiddlewareMapErrorTests.swift",
"Middlewares/MiddlewareSubscriptionTests.swift",
"Middlewares/NewObservableMiddlewareDDosProtectionTests.swift",
"Middlewares/NewReducibleMiddlewareTests.swift",
"Store/StoreInitializationTests.swift"
],
"target_dependencies" : [
"UDFXCTest"
],
"type" : "test"
}
],
"tools_version" : "5.9"
}
Done.