Build Information
Failed to build Atoms, reference 0.0.2 (fa49f2
), with Swift 6.0 for macOS (SPM) on 29 Nov 2024 10:53:20 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:86:28: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
84 | var cancellable: AnyCancellable?
85 | let store = StoreConfig.store
86 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
87 | let atom = create(operation, id: id, throwOnCancellation: throwOnCancellation) { atom, finishedTask in
88 | if finishedTask {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:99:48: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
97 | return
98 | }
99 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | if let publisher = store.getSetPublisher(for: value.atom), !usedIDs.contains(value.atom) {
101 | usedIDs.insert(value.atom)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:109:91: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
107 | store.tasks[id] = Task { @MainActor [cancellable] in
108 | do {
109 | let result = try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
110 | try await operation()
111 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:146:59: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
144 | atom.value = .loading
145 | do {
146 | let result = try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
147 | try await operation()
148 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:174:67: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
172 | store.tasks[id] = Task {
173 | do {
174 | let result = try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
175 | try await callback()
176 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:175:39: warning: non-sendable type 'Root' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
162 |
163 | @MainActor
164 | fileprivate func create<Root>(_ callback: @escaping () async throws -> Root, id: UUID, throwOnCancellation: Bool, taskStatus: @MainActor @escaping ( AtomValue<AsyncState<Root>>, Bool) -> Void) -> AtomValue<AsyncState<Root>> {
| `- note: consider making generic parameter 'Root' conform to the 'Sendable' protocol
165 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id)
166 | let store = StoreConfig.store
:
173 | do {
174 | let result = try await StoreConfig.$store.withValue(store) {
175 | try await callback()
| `- warning: non-sendable type 'Root' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
176 | }
177 | guard !atom.overriden else {
[72/79] Compiling Atoms AsyncAtom.swift
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/AtomStore.swift:20:23: 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
18 |
19 | /// The shared singleton instance of `AtomStore`.
20 | public static var shared = AtomStore()
| |- 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
21 |
22 | /// A Boolean value that indicates whether logging is enabled for `Atom` operations. Defaults to `false`.
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:67:32: warning: converting non-sendable function value to '@MainActor @Sendable () -> Void' may introduce data races
65 | self.function = function
66 | self.line = line
67 | atomConfigurations[id] = setup
| `- warning: converting non-sendable function value to '@MainActor @Sendable () -> Void' may introduce data races
68 | }
69 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:100:5: warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | var atomConfigurations: [UUID: @MainActor () -> Void] = [:]
| |- warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'atomConfigurations' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'atomConfigurations' 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
101 |
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:86:28: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
84 | var cancellable: AnyCancellable?
85 | let store = StoreConfig.store
86 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
87 | let atom = create(operation, id: id, throwOnCancellation: throwOnCancellation) { atom, finishedTask in
88 | if finishedTask {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:99:48: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
97 | return
98 | }
99 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
100 | if let publisher = store.getSetPublisher(for: value.atom), !usedIDs.contains(value.atom) {
101 | usedIDs.insert(value.atom)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:109:91: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
107 | store.tasks[id] = Task { @MainActor [cancellable] in
108 | do {
109 | let result = try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
110 | try await operation()
111 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:146:59: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
144 | atom.value = .loading
145 | do {
146 | let result = try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
147 | try await operation()
148 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:174:67: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
172 | store.tasks[id] = Task {
173 | do {
174 | let result = try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
175 | try await callback()
176 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncAtom.swift:175:39: warning: non-sendable type 'Root' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
162 |
163 | @MainActor
164 | fileprivate func create<Root>(_ callback: @escaping () async throws -> Root, id: UUID, throwOnCancellation: Bool, taskStatus: @MainActor @escaping ( AtomValue<AsyncState<Root>>, Bool) -> Void) -> AtomValue<AsyncState<Root>> {
| `- note: consider making generic parameter 'Root' conform to the 'Sendable' protocol
165 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id)
166 | let store = StoreConfig.store
:
173 | do {
174 | let result = try await StoreConfig.$store.withValue(store) {
175 | try await callback()
| `- warning: non-sendable type 'Root' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
176 | }
177 | guard !atom.overriden else {
[73/79] Compiling Atoms UseAtom.swift
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:38:6: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
39 | private var refCounter: RefCounter? = nil
40 |
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:27:20: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
25 | public var wrappedValue: T {
26 | get {
27 | return atom.value
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
28 | } nonmutating set {
29 | atom.value = newValue
:
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:29:13: warning: main actor-isolated property 'atom' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
27 | return atom.value
28 | } nonmutating set {
29 | atom.value = newValue
| `- warning: main actor-isolated property 'atom' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 | }
:
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: mutation of this property is only permitted within the actor
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:35:21: 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
33 | /// A `Binding` to the value of the wrapped `WritableAtom`.
34 | public var projectedValue: Binding<T> {
35 | return $atom.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
36 | }
37 |
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/Sources/Atoms/PropertyWrappers/UseAtom.swift:35:16: warning: main actor-isolated property '$atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
33 | /// A `Binding` to the value of the wrapped `WritableAtom`.
34 | public var projectedValue: Binding<T> {
35 | return $atom.value
| `- warning: main actor-isolated property '$atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:48:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
46 | ///
47 | public init<W: WritableAtom>(_ writableAtom: W, debounce: TimeInterval = 0) where W.T == T {
48 | writableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
49 | let store = StoreConfig.store
50 | if !writableAtom.keepAlive {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ReadableAtom.swift:17:10: note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
15 | extension ReadableAtom {
16 | @MainActor
17 | func runSetupIfNeeded() {
| `- note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
18 | if shouldRunSetup() {
19 | let store = StoreConfig.store
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:59:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
57 | }
58 | }
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
60 | _atom = .init(wrappedValue: atom)
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:71:10: note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
69 |
70 | @MainActor
71 | func getAtomValue<T>(for id: UUID) -> AtomValue<T> {
| `- note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
72 | guard let atom = atomMap[id] as? AtomValue<T> else {
73 | fatalError()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:60:18: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
58 | }
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
60 | _atom = .init(wrappedValue: atom)
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
62 | atom: writableAtom.id,
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:61:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
60 | _atom = .init(wrappedValue: atom)
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
62 | atom: writableAtom.id,
63 | watching: true, debounced: debounce,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:26:9: note: mutation of this property is only permitted within the actor
24 | var resettableCallbacks: [UUID: Any] = [:]
25 | @MainActor
26 | var usedAtoms: [UUID: [UsedAtomInfo]] = [:]
| `- note: mutation of this property is only permitted within the actor
27 | @MainActor
28 | var didSetupUpdates = false
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:34:6: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
32 | }
33 |
34 | @ObservedObject private var atom: AtomValue<T>
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
35 | private var refCounter: RefCounter? = nil
36 |
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:31:16: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
29 | /// The current value of the wrapped `WritableAtom`.
30 | public var wrappedValue: T {
31 | return atom.value
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
32 | }
33 |
34 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
35 | private var refCounter: RefCounter? = nil
36 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:43:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
41 | /// - debounce: An optional time interval for debouncing the value updates. Default is `0`.
42 | public init<R: ReadableAtom>(_ readableAtom: R, debounce: TimeInterval = 0) where R.T == T {
43 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
44 | let store = StoreConfig.store
45 | if !readableAtom.keepAlive {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ReadableAtom.swift:17:10: note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
15 | extension ReadableAtom {
16 | @MainActor
17 | func runSetupIfNeeded() {
| `- note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
18 | if shouldRunSetup() {
19 | let store = StoreConfig.store
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:54:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
52 | }
53 | }
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
55 | _atom = .init(wrappedValue: atom)
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:71:10: note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
69 |
70 | @MainActor
71 | func getAtomValue<T>(for id: UUID) -> AtomValue<T> {
| `- note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
72 | guard let atom = atomMap[id] as? AtomValue<T> else {
73 | fatalError()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:55:18: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
53 | }
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
55 | _atom = .init(wrappedValue: atom)
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
57 | atom: readableAtom.id,
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:56:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
55 | _atom = .init(wrappedValue: atom)
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
57 | atom: readableAtom.id,
58 | watching: true,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:26:9: note: mutation of this property is only permitted within the actor
24 | var resettableCallbacks: [UUID: Any] = [:]
25 | @MainActor
26 | var usedAtoms: [UUID: [UsedAtomInfo]] = [:]
| `- note: mutation of this property is only permitted within the actor
27 | @MainActor
28 | var didSetupUpdates = false
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/TestStore.swift:14:38: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
12 | let newStore = Store()
13 | newStore.onUpdates = StoreConfig.store.onUpdates
14 | try await StoreConfig.$store.withValue(newStore) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
15 | try await operation(newStore)
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
[74/79] Compiling Atoms UseAtomValue.swift
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:38:6: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
39 | private var refCounter: RefCounter? = nil
40 |
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:27:20: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
25 | public var wrappedValue: T {
26 | get {
27 | return atom.value
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
28 | } nonmutating set {
29 | atom.value = newValue
:
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:29:13: warning: main actor-isolated property 'atom' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
27 | return atom.value
28 | } nonmutating set {
29 | atom.value = newValue
| `- warning: main actor-isolated property 'atom' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 | }
:
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: mutation of this property is only permitted within the actor
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:35:21: 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
33 | /// A `Binding` to the value of the wrapped `WritableAtom`.
34 | public var projectedValue: Binding<T> {
35 | return $atom.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
36 | }
37 |
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/Sources/Atoms/PropertyWrappers/UseAtom.swift:35:16: warning: main actor-isolated property '$atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
33 | /// A `Binding` to the value of the wrapped `WritableAtom`.
34 | public var projectedValue: Binding<T> {
35 | return $atom.value
| `- warning: main actor-isolated property '$atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:48:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
46 | ///
47 | public init<W: WritableAtom>(_ writableAtom: W, debounce: TimeInterval = 0) where W.T == T {
48 | writableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
49 | let store = StoreConfig.store
50 | if !writableAtom.keepAlive {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ReadableAtom.swift:17:10: note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
15 | extension ReadableAtom {
16 | @MainActor
17 | func runSetupIfNeeded() {
| `- note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
18 | if shouldRunSetup() {
19 | let store = StoreConfig.store
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:59:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
57 | }
58 | }
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
60 | _atom = .init(wrappedValue: atom)
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:71:10: note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
69 |
70 | @MainActor
71 | func getAtomValue<T>(for id: UUID) -> AtomValue<T> {
| `- note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
72 | guard let atom = atomMap[id] as? AtomValue<T> else {
73 | fatalError()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:60:18: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
58 | }
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
60 | _atom = .init(wrappedValue: atom)
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
62 | atom: writableAtom.id,
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:61:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
60 | _atom = .init(wrappedValue: atom)
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
62 | atom: writableAtom.id,
63 | watching: true, debounced: debounce,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:26:9: note: mutation of this property is only permitted within the actor
24 | var resettableCallbacks: [UUID: Any] = [:]
25 | @MainActor
26 | var usedAtoms: [UUID: [UsedAtomInfo]] = [:]
| `- note: mutation of this property is only permitted within the actor
27 | @MainActor
28 | var didSetupUpdates = false
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:34:6: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
32 | }
33 |
34 | @ObservedObject private var atom: AtomValue<T>
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
35 | private var refCounter: RefCounter? = nil
36 |
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:31:16: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
29 | /// The current value of the wrapped `WritableAtom`.
30 | public var wrappedValue: T {
31 | return atom.value
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
32 | }
33 |
34 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
35 | private var refCounter: RefCounter? = nil
36 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:43:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
41 | /// - debounce: An optional time interval for debouncing the value updates. Default is `0`.
42 | public init<R: ReadableAtom>(_ readableAtom: R, debounce: TimeInterval = 0) where R.T == T {
43 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
44 | let store = StoreConfig.store
45 | if !readableAtom.keepAlive {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ReadableAtom.swift:17:10: note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
15 | extension ReadableAtom {
16 | @MainActor
17 | func runSetupIfNeeded() {
| `- note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
18 | if shouldRunSetup() {
19 | let store = StoreConfig.store
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:54:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
52 | }
53 | }
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
55 | _atom = .init(wrappedValue: atom)
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:71:10: note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
69 |
70 | @MainActor
71 | func getAtomValue<T>(for id: UUID) -> AtomValue<T> {
| `- note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
72 | guard let atom = atomMap[id] as? AtomValue<T> else {
73 | fatalError()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:55:18: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
53 | }
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
55 | _atom = .init(wrappedValue: atom)
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
57 | atom: readableAtom.id,
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:56:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
55 | _atom = .init(wrappedValue: atom)
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
57 | atom: readableAtom.id,
58 | watching: true,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:26:9: note: mutation of this property is only permitted within the actor
24 | var resettableCallbacks: [UUID: Any] = [:]
25 | @MainActor
26 | var usedAtoms: [UUID: [UsedAtomInfo]] = [:]
| `- note: mutation of this property is only permitted within the actor
27 | @MainActor
28 | var didSetupUpdates = false
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/TestStore.swift:14:38: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
12 | let newStore = Store()
13 | newStore.onUpdates = StoreConfig.store.onUpdates
14 | try await StoreConfig.$store.withValue(newStore) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
15 | try await operation(newStore)
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
[75/79] Compiling Atoms TestStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:38:6: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
39 | private var refCounter: RefCounter? = nil
40 |
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:27:20: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
25 | public var wrappedValue: T {
26 | get {
27 | return atom.value
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
28 | } nonmutating set {
29 | atom.value = newValue
:
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:29:13: warning: main actor-isolated property 'atom' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
27 | return atom.value
28 | } nonmutating set {
29 | atom.value = newValue
| `- warning: main actor-isolated property 'atom' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
30 | }
31 | }
:
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: mutation of this property is only permitted within the actor
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:35:21: 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
33 | /// A `Binding` to the value of the wrapped `WritableAtom`.
34 | public var projectedValue: Binding<T> {
35 | return $atom.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
36 | }
37 |
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/Sources/Atoms/PropertyWrappers/UseAtom.swift:35:16: warning: main actor-isolated property '$atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
33 | /// A `Binding` to the value of the wrapped `WritableAtom`.
34 | public var projectedValue: Binding<T> {
35 | return $atom.value
| `- warning: main actor-isolated property '$atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
36 | }
37 |
38 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
39 | private var refCounter: RefCounter? = nil
40 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:48:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
46 | ///
47 | public init<W: WritableAtom>(_ writableAtom: W, debounce: TimeInterval = 0) where W.T == T {
48 | writableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
49 | let store = StoreConfig.store
50 | if !writableAtom.keepAlive {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ReadableAtom.swift:17:10: note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
15 | extension ReadableAtom {
16 | @MainActor
17 | func runSetupIfNeeded() {
| `- note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
18 | if shouldRunSetup() {
19 | let store = StoreConfig.store
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:59:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
57 | }
58 | }
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
60 | _atom = .init(wrappedValue: atom)
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:71:10: note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
69 |
70 | @MainActor
71 | func getAtomValue<T>(for id: UUID) -> AtomValue<T> {
| `- note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
72 | guard let atom = atomMap[id] as? AtomValue<T> else {
73 | fatalError()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:60:18: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
58 | }
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
60 | _atom = .init(wrappedValue: atom)
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
62 | atom: writableAtom.id,
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtom.swift:61:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
59 | let atom: AtomValue<T> = store.getAtomValue(for: writableAtom.id)
60 | _atom = .init(wrappedValue: atom)
61 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
62 | atom: writableAtom.id,
63 | watching: true, debounced: debounce,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:26:9: note: mutation of this property is only permitted within the actor
24 | var resettableCallbacks: [UUID: Any] = [:]
25 | @MainActor
26 | var usedAtoms: [UUID: [UsedAtomInfo]] = [:]
| `- note: mutation of this property is only permitted within the actor
27 | @MainActor
28 | var didSetupUpdates = false
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:34:6: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
32 | }
33 |
34 | @ObservedObject private var atom: AtomValue<T>
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
35 | private var refCounter: RefCounter? = nil
36 |
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:31:16: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
29 | /// The current value of the wrapped `WritableAtom`.
30 | public var wrappedValue: T {
31 | return atom.value
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
32 | }
33 |
34 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
35 | private var refCounter: RefCounter? = nil
36 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:43:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
41 | /// - debounce: An optional time interval for debouncing the value updates. Default is `0`.
42 | public init<R: ReadableAtom>(_ readableAtom: R, debounce: TimeInterval = 0) where R.T == T {
43 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
44 | let store = StoreConfig.store
45 | if !readableAtom.keepAlive {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ReadableAtom.swift:17:10: note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
15 | extension ReadableAtom {
16 | @MainActor
17 | func runSetupIfNeeded() {
| `- note: calls to instance method 'runSetupIfNeeded()' from outside of its actor context are implicitly asynchronous
18 | if shouldRunSetup() {
19 | let store = StoreConfig.store
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:54:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
52 | }
53 | }
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
55 | _atom = .init(wrappedValue: atom)
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:71:10: note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
69 |
70 | @MainActor
71 | func getAtomValue<T>(for id: UUID) -> AtomValue<T> {
| `- note: calls to instance method 'getAtomValue(for:)' from outside of its actor context are implicitly asynchronous
72 | guard let atom = atomMap[id] as? AtomValue<T> else {
73 | fatalError()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:55:18: warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
53 | }
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
55 | _atom = .init(wrappedValue: atom)
| `- warning: call to main actor-isolated initializer 'init(wrappedValue:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
57 | atom: readableAtom.id,
SwiftUICore.ObservedObject:7:39: note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
5 | }
6 | @MainActor @preconcurrency public init(initialValue: ObjectType)
7 | @MainActor @preconcurrency public init(wrappedValue: ObjectType)
| `- note: calls to initializer 'init(wrappedValue:)' from outside of its actor context are implicitly asynchronous
8 | @MainActor @preconcurrency public var wrappedValue: ObjectType
9 | @MainActor @preconcurrency public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/UseAtomValue.swift:56:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
54 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
55 | _atom = .init(wrappedValue: atom)
56 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
57 | atom: readableAtom.id,
58 | watching: true,
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:26:9: note: mutation of this property is only permitted within the actor
24 | var resettableCallbacks: [UUID: Any] = [:]
25 | @MainActor
26 | var usedAtoms: [UUID: [UsedAtomInfo]] = [:]
| `- note: mutation of this property is only permitted within the actor
27 | @MainActor
28 | var didSetupUpdates = false
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/TestStore.swift:14:38: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
12 | let newStore = Store()
13 | newStore.onUpdates = StoreConfig.store.onUpdates
14 | try await StoreConfig.$store.withValue(newStore) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
15 | try await operation(newStore)
16 | }
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
[76/79] Compiling Atoms AsyncSequenceAtom.swift
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:57:54: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
55 | store.tasks[id] = Task { @MainActor in
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
58 | for try await value in asyncSequence {
59 | guard !Task.isCancelled else {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:58:29: warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
25 | ///
26 | /// - Note: Conforms to the `ReadableAtom` protocol.
27 | public struct AsyncSequenceAtom<T>: ReadableAtom {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
28 | /// The unique identifier for the atom.
29 | public let id: UUID
:
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
58 | for try await value in asyncSequence {
| `- warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
59 | guard !Task.isCancelled else {
60 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:100:5: warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | var atomConfigurations: [UUID: @MainActor () -> Void] = [:]
| |- warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'atomConfigurations' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'atomConfigurations' 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
101 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:89:32: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
87 | var cancellable: AnyCancellable?
88 | let store = StoreConfig.store
89 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
90 | let atom = create(asyncSequence, id: id) { atom, finishedTask in
91 | if finishedTask {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:101:52: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
99 | return
100 | }
101 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
102 | if value.scope == id {
103 | if let publisher = store.getSetPublisher(for: value.atom), !usedIDs.contains(value.atom) {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:113:86: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
111 | store.tasks[id] = Task { @MainActor in
112 | do {
113 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
114 | let sequence = asyncSequence()
115 | for try await value in sequence {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:115:61: warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
25 | ///
26 | /// - Note: Conforms to the `ReadableAtom` protocol.
27 | public struct AsyncSequenceAtom<T>: ReadableAtom {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
28 | /// The unique identifier for the atom.
29 | public let id: UUID
:
113 | try await StoreConfig.$store.withValue(store) {
114 | let sequence = asyncSequence()
115 | for try await value in sequence {
| `- warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
116 | guard !Task.isCancelled else {
117 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:163:58: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
161 | taskStatus(atom, false)
162 | var didStart = false
163 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
164 | let sequence = asyncSequence()
165 | for try await value in sequence {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:165:33: warning: non-sendable type 'Root?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
149 | }
150 |
151 | fileprivate func create<Root, A: AsyncSequence>(_ asyncSequence: @escaping () -> A, id: UUID, taskStatus: @MainActor @escaping ( AtomValue<AsyncState<Root>>, Bool) -> Void) -> AtomValue<AsyncState<Root>> where Root == A.Element {
| `- note: consider making generic parameter 'Root' conform to the 'Sendable' protocol
152 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id, dontCheckEqual: true)
153 | let store = StoreConfig.store
:
163 | try await StoreConfig.$store.withValue(store) {
164 | let sequence = asyncSequence()
165 | for try await value in sequence {
| `- warning: non-sendable type 'Root?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
166 | guard !Task.isCancelled else {
167 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:73:47: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
71 | if !didSetupGet {
72 | didSetupGet = true
73 | return StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | let value = findObservables(using: id) {
75 | return get()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:95:40: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
93 | if !didSetupSet {
94 | didSetupSet = true
95 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
96 | findObservables(using: id) {
97 | set(newValue)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:58:52: warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
58 | for try await value in asyncSequence {
| |- warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asyncSequence' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
59 | guard !Task.isCancelled else {
60 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:90:35: warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
88 | let store = StoreConfig.store
89 | StoreConfig.$store.withValue(store) {
90 | let atom = create(asyncSequence, id: id) { atom, finishedTask in
| |- warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asyncSequence' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
91 | if finishedTask {
92 | cancellable?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:154:10: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
152 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id, dontCheckEqual: true)
153 | let store = StoreConfig.store
154 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
155 | atom.getterPublisher.prefix(1).receive(on: DispatchQueue.main).sink { _ in
156 | if store.tasks[id] == nil {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:156:16: warning: sending 'atom' risks causing data races; this is an error in the Swift 6 language mode
154 | Task { @MainActor in
155 | atom.getterPublisher.prefix(1).receive(on: DispatchQueue.main).sink { _ in
156 | if store.tasks[id] == nil {
| |- warning: sending 'atom' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'atom' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
157 | Scope.$id.withValue(id, operation: {
158 | taskStatus(atom, false)
:
188 | }
189 |
190 | return atom
| `- note: access can happen concurrently
191 | }
192 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/Atom.swift:52:34: warning: sending 'defaultValue' risks causing data races; this is an error in the Swift 6 language mode
50 | self.defaultValue = defaultValue
51 | self.setup = {
52 | let atom = AtomValue(defaultValue, id: id)
| |- warning: sending 'defaultValue' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'defaultValue' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
53 | let store = StoreConfig.store
54 | store.addAtomValue(atom, for: id)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/Atom.swift:65:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
63 | /// it will be executed before updating the atom's value.
64 | public func reset() {
65 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
66 | let store = StoreConfig.store
67 | guard let atom: AtomValue<T> = store.getAtomValue(for: id) else {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:69:13: warning: main actor-isolated closure captures value of non-Sendable type 'GetSetAtom<T>.Cache' from nonisolated context; later accesses to value could race; this is an error in the Swift 6 language mode
67 | var didSetupGet = false
68 | let store = StoreConfig.store
69 | cache.value = get()
| `- warning: main actor-isolated closure captures value of non-Sendable type 'GetSetAtom<T>.Cache' from nonisolated context; later accesses to value could race; this is an error in the Swift 6 language mode
70 | let getProxy: () -> T = {
71 | if !didSetupGet {
:
116 | }
117 | atomConfigurations[id] = setup
118 | }
| `- note: access can happen concurrently
119 |
120 | /// Resets the value of the `GetSetAtom` to the initial state as defined by the custom getter.
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:122:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
120 | /// Resets the value of the `GetSetAtom` to the initial state as defined by the custom getter.
121 | public func reset() {
122 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
123 | cache.value = get()
124 | }
[77/79] Compiling Atoms Atom.swift
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:57:54: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
55 | store.tasks[id] = Task { @MainActor in
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
58 | for try await value in asyncSequence {
59 | guard !Task.isCancelled else {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:58:29: warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
25 | ///
26 | /// - Note: Conforms to the `ReadableAtom` protocol.
27 | public struct AsyncSequenceAtom<T>: ReadableAtom {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
28 | /// The unique identifier for the atom.
29 | public let id: UUID
:
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
58 | for try await value in asyncSequence {
| `- warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
59 | guard !Task.isCancelled else {
60 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:100:5: warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | var atomConfigurations: [UUID: @MainActor () -> Void] = [:]
| |- warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'atomConfigurations' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'atomConfigurations' 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
101 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:89:32: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
87 | var cancellable: AnyCancellable?
88 | let store = StoreConfig.store
89 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
90 | let atom = create(asyncSequence, id: id) { atom, finishedTask in
91 | if finishedTask {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:101:52: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
99 | return
100 | }
101 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
102 | if value.scope == id {
103 | if let publisher = store.getSetPublisher(for: value.atom), !usedIDs.contains(value.atom) {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:113:86: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
111 | store.tasks[id] = Task { @MainActor in
112 | do {
113 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
114 | let sequence = asyncSequence()
115 | for try await value in sequence {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:115:61: warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
25 | ///
26 | /// - Note: Conforms to the `ReadableAtom` protocol.
27 | public struct AsyncSequenceAtom<T>: ReadableAtom {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
28 | /// The unique identifier for the atom.
29 | public let id: UUID
:
113 | try await StoreConfig.$store.withValue(store) {
114 | let sequence = asyncSequence()
115 | for try await value in sequence {
| `- warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
116 | guard !Task.isCancelled else {
117 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:163:58: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
161 | taskStatus(atom, false)
162 | var didStart = false
163 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
164 | let sequence = asyncSequence()
165 | for try await value in sequence {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:165:33: warning: non-sendable type 'Root?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
149 | }
150 |
151 | fileprivate func create<Root, A: AsyncSequence>(_ asyncSequence: @escaping () -> A, id: UUID, taskStatus: @MainActor @escaping ( AtomValue<AsyncState<Root>>, Bool) -> Void) -> AtomValue<AsyncState<Root>> where Root == A.Element {
| `- note: consider making generic parameter 'Root' conform to the 'Sendable' protocol
152 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id, dontCheckEqual: true)
153 | let store = StoreConfig.store
:
163 | try await StoreConfig.$store.withValue(store) {
164 | let sequence = asyncSequence()
165 | for try await value in sequence {
| `- warning: non-sendable type 'Root?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
166 | guard !Task.isCancelled else {
167 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:73:47: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
71 | if !didSetupGet {
72 | didSetupGet = true
73 | return StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | let value = findObservables(using: id) {
75 | return get()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:95:40: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
93 | if !didSetupSet {
94 | didSetupSet = true
95 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
96 | findObservables(using: id) {
97 | set(newValue)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:58:52: warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
58 | for try await value in asyncSequence {
| |- warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asyncSequence' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
59 | guard !Task.isCancelled else {
60 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:90:35: warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
88 | let store = StoreConfig.store
89 | StoreConfig.$store.withValue(store) {
90 | let atom = create(asyncSequence, id: id) { atom, finishedTask in
| |- warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asyncSequence' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
91 | if finishedTask {
92 | cancellable?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:154:10: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
152 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id, dontCheckEqual: true)
153 | let store = StoreConfig.store
154 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
155 | atom.getterPublisher.prefix(1).receive(on: DispatchQueue.main).sink { _ in
156 | if store.tasks[id] == nil {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:156:16: warning: sending 'atom' risks causing data races; this is an error in the Swift 6 language mode
154 | Task { @MainActor in
155 | atom.getterPublisher.prefix(1).receive(on: DispatchQueue.main).sink { _ in
156 | if store.tasks[id] == nil {
| |- warning: sending 'atom' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'atom' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
157 | Scope.$id.withValue(id, operation: {
158 | taskStatus(atom, false)
:
188 | }
189 |
190 | return atom
| `- note: access can happen concurrently
191 | }
192 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/Atom.swift:52:34: warning: sending 'defaultValue' risks causing data races; this is an error in the Swift 6 language mode
50 | self.defaultValue = defaultValue
51 | self.setup = {
52 | let atom = AtomValue(defaultValue, id: id)
| |- warning: sending 'defaultValue' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'defaultValue' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
53 | let store = StoreConfig.store
54 | store.addAtomValue(atom, for: id)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/Atom.swift:65:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
63 | /// it will be executed before updating the atom's value.
64 | public func reset() {
65 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
66 | let store = StoreConfig.store
67 | guard let atom: AtomValue<T> = store.getAtomValue(for: id) else {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:69:13: warning: main actor-isolated closure captures value of non-Sendable type 'GetSetAtom<T>.Cache' from nonisolated context; later accesses to value could race; this is an error in the Swift 6 language mode
67 | var didSetupGet = false
68 | let store = StoreConfig.store
69 | cache.value = get()
| `- warning: main actor-isolated closure captures value of non-Sendable type 'GetSetAtom<T>.Cache' from nonisolated context; later accesses to value could race; this is an error in the Swift 6 language mode
70 | let getProxy: () -> T = {
71 | if !didSetupGet {
:
116 | }
117 | atomConfigurations[id] = setup
118 | }
| `- note: access can happen concurrently
119 |
120 | /// Resets the value of the `GetSetAtom` to the initial state as defined by the custom getter.
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:122:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
120 | /// Resets the value of the `GetSetAtom` to the initial state as defined by the custom getter.
121 | public func reset() {
122 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
123 | cache.value = get()
124 | }
[78/79] Compiling Atoms DerivedAtom.swift
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:57:54: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
55 | store.tasks[id] = Task { @MainActor in
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
58 | for try await value in asyncSequence {
59 | guard !Task.isCancelled else {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:58:29: warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
25 | ///
26 | /// - Note: Conforms to the `ReadableAtom` protocol.
27 | public struct AsyncSequenceAtom<T>: ReadableAtom {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
28 | /// The unique identifier for the atom.
29 | public let id: UUID
:
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
58 | for try await value in asyncSequence {
| `- warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
59 | guard !Task.isCancelled else {
60 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:100:5: warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | var atomConfigurations: [UUID: @MainActor () -> Void] = [:]
| |- warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'atomConfigurations' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'atomConfigurations' 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
101 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:89:32: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
87 | var cancellable: AnyCancellable?
88 | let store = StoreConfig.store
89 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
90 | let atom = create(asyncSequence, id: id) { atom, finishedTask in
91 | if finishedTask {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:101:52: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
99 | return
100 | }
101 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
102 | if value.scope == id {
103 | if let publisher = store.getSetPublisher(for: value.atom), !usedIDs.contains(value.atom) {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:113:86: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
111 | store.tasks[id] = Task { @MainActor in
112 | do {
113 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
114 | let sequence = asyncSequence()
115 | for try await value in sequence {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:115:61: warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
25 | ///
26 | /// - Note: Conforms to the `ReadableAtom` protocol.
27 | public struct AsyncSequenceAtom<T>: ReadableAtom {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
28 | /// The unique identifier for the atom.
29 | public let id: UUID
:
113 | try await StoreConfig.$store.withValue(store) {
114 | let sequence = asyncSequence()
115 | for try await value in sequence {
| `- warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
116 | guard !Task.isCancelled else {
117 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:163:58: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
161 | taskStatus(atom, false)
162 | var didStart = false
163 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
164 | let sequence = asyncSequence()
165 | for try await value in sequence {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:165:33: warning: non-sendable type 'Root?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
149 | }
150 |
151 | fileprivate func create<Root, A: AsyncSequence>(_ asyncSequence: @escaping () -> A, id: UUID, taskStatus: @MainActor @escaping ( AtomValue<AsyncState<Root>>, Bool) -> Void) -> AtomValue<AsyncState<Root>> where Root == A.Element {
| `- note: consider making generic parameter 'Root' conform to the 'Sendable' protocol
152 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id, dontCheckEqual: true)
153 | let store = StoreConfig.store
:
163 | try await StoreConfig.$store.withValue(store) {
164 | let sequence = asyncSequence()
165 | for try await value in sequence {
| `- warning: non-sendable type 'Root?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
166 | guard !Task.isCancelled else {
167 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:73:47: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
71 | if !didSetupGet {
72 | didSetupGet = true
73 | return StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | let value = findObservables(using: id) {
75 | return get()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:95:40: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
93 | if !didSetupSet {
94 | didSetupSet = true
95 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
96 | findObservables(using: id) {
97 | set(newValue)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:58:52: warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
58 | for try await value in asyncSequence {
| |- warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asyncSequence' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
59 | guard !Task.isCancelled else {
60 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:90:35: warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
88 | let store = StoreConfig.store
89 | StoreConfig.$store.withValue(store) {
90 | let atom = create(asyncSequence, id: id) { atom, finishedTask in
| |- warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asyncSequence' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
91 | if finishedTask {
92 | cancellable?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:154:10: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
152 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id, dontCheckEqual: true)
153 | let store = StoreConfig.store
154 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
155 | atom.getterPublisher.prefix(1).receive(on: DispatchQueue.main).sink { _ in
156 | if store.tasks[id] == nil {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:156:16: warning: sending 'atom' risks causing data races; this is an error in the Swift 6 language mode
154 | Task { @MainActor in
155 | atom.getterPublisher.prefix(1).receive(on: DispatchQueue.main).sink { _ in
156 | if store.tasks[id] == nil {
| |- warning: sending 'atom' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'atom' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
157 | Scope.$id.withValue(id, operation: {
158 | taskStatus(atom, false)
:
188 | }
189 |
190 | return atom
| `- note: access can happen concurrently
191 | }
192 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/Atom.swift:52:34: warning: sending 'defaultValue' risks causing data races; this is an error in the Swift 6 language mode
50 | self.defaultValue = defaultValue
51 | self.setup = {
52 | let atom = AtomValue(defaultValue, id: id)
| |- warning: sending 'defaultValue' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'defaultValue' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
53 | let store = StoreConfig.store
54 | store.addAtomValue(atom, for: id)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/Atom.swift:65:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
63 | /// it will be executed before updating the atom's value.
64 | public func reset() {
65 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
66 | let store = StoreConfig.store
67 | guard let atom: AtomValue<T> = store.getAtomValue(for: id) else {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:69:13: warning: main actor-isolated closure captures value of non-Sendable type 'GetSetAtom<T>.Cache' from nonisolated context; later accesses to value could race; this is an error in the Swift 6 language mode
67 | var didSetupGet = false
68 | let store = StoreConfig.store
69 | cache.value = get()
| `- warning: main actor-isolated closure captures value of non-Sendable type 'GetSetAtom<T>.Cache' from nonisolated context; later accesses to value could race; this is an error in the Swift 6 language mode
70 | let getProxy: () -> T = {
71 | if !didSetupGet {
:
116 | }
117 | atomConfigurations[id] = setup
118 | }
| `- note: access can happen concurrently
119 |
120 | /// Resets the value of the `GetSetAtom` to the initial state as defined by the custom getter.
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:122:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
120 | /// Resets the value of the `GetSetAtom` to the initial state as defined by the custom getter.
121 | public func reset() {
122 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
123 | cache.value = get()
124 | }
[79/79] Compiling Atoms GetSetAtom.swift
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:22: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:57:54: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
55 | store.tasks[id] = Task { @MainActor in
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
58 | for try await value in asyncSequence {
59 | guard !Task.isCancelled else {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
macro expansion @TaskLocal:1:12: warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/StoreConfig.swift:5:60: note: expanded code originates here
3 | let defaultStoreID = UUID()
4 | enum StoreConfig {
5 | @TaskLocal static var store = Store(id: defaultStoreID)
+--- macro expansion @TaskLocal --------------------------------------
|1 | static let $store = TaskLocal(wrappedValue: Store(id: defaultStoreID))
| | |- warning: static property '$store' is not concurrency-safe because non-'Sendable' type 'TaskLocal<Store>' may have shared mutable state; this is an error in the Swift 6 language mode
| | |- note: annotate '$store' 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
+---------------------------------------------------------------------
6 | }
7 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:58:29: warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
25 | ///
26 | /// - Note: Conforms to the `ReadableAtom` protocol.
27 | public struct AsyncSequenceAtom<T>: ReadableAtom {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
28 | /// The unique identifier for the atom.
29 | public let id: UUID
:
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
58 | for try await value in asyncSequence {
| `- warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
59 | guard !Task.isCancelled else {
60 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:100:5: warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
98 | }
99 |
100 | var atomConfigurations: [UUID: @MainActor () -> Void] = [:]
| |- warning: var 'atomConfigurations' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
| |- note: convert 'atomConfigurations' to a 'let' constant to make 'Sendable' shared state immutable
| |- note: annotate 'atomConfigurations' 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
101 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:89:32: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
87 | var cancellable: AnyCancellable?
88 | let store = StoreConfig.store
89 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
90 | let atom = create(asyncSequence, id: id) { atom, finishedTask in
91 | if finishedTask {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:101:52: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
99 | return
100 | }
101 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
102 | if value.scope == id {
103 | if let publisher = store.getSetPublisher(for: value.atom), !usedIDs.contains(value.atom) {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:113:86: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
111 | store.tasks[id] = Task { @MainActor in
112 | do {
113 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
114 | let sequence = asyncSequence()
115 | for try await value in sequence {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:12:5: warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| `- warning: let 'usedAtomsSubject' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UsedAtomInfo, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
13 |
Combine.PassthroughSubject:2:20: note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
1 | @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
2 | final public class PassthroughSubject<Output, Failure> : Subject where Failure : Error {
| `- note: generic class 'PassthroughSubject' does not conform to the 'Sendable' protocol
3 | public init()
4 | @objc deinit
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/UsedAtomInfo.swift:2:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
1 | import Foundation
2 | import Combine
| `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'Combine'
3 |
4 | struct UsedAtomInfo: Hashable {
:
10 | }
11 |
12 | let usedAtomsSubject: PassthroughSubject<UsedAtomInfo, Never> = .init()
| |- note: annotate 'usedAtomsSubject' 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
13 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:115:61: warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
25 | ///
26 | /// - Note: Conforms to the `ReadableAtom` protocol.
27 | public struct AsyncSequenceAtom<T>: ReadableAtom {
| `- note: consider making generic parameter 'T' conform to the 'Sendable' protocol
28 | /// The unique identifier for the atom.
29 | public let id: UUID
:
113 | try await StoreConfig.$store.withValue(store) {
114 | let sequence = asyncSequence()
115 | for try await value in sequence {
| `- warning: non-sendable type 'T?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
116 | guard !Task.isCancelled else {
117 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:163:58: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
161 | taskStatus(atom, false)
162 | var didStart = false
163 | try await StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
164 | let sequence = asyncSequence()
165 | for try await value in sequence {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:165:33: warning: non-sendable type 'Root?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
149 | }
150 |
151 | fileprivate func create<Root, A: AsyncSequence>(_ asyncSequence: @escaping () -> A, id: UUID, taskStatus: @MainActor @escaping ( AtomValue<AsyncState<Root>>, Bool) -> Void) -> AtomValue<AsyncState<Root>> where Root == A.Element {
| `- note: consider making generic parameter 'Root' conform to the 'Sendable' protocol
152 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id, dontCheckEqual: true)
153 | let store = StoreConfig.store
:
163 | try await StoreConfig.$store.withValue(store) {
164 | let sequence = asyncSequence()
165 | for try await value in sequence {
| `- warning: non-sendable type 'Root?' returned by implicitly asynchronous call to nonisolated function cannot cross actor boundary; this is an error in the Swift 6 language mode
166 | guard !Task.isCancelled else {
167 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:73:47: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
71 | if !didSetupGet {
72 | didSetupGet = true
73 | return StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
74 | let value = findObservables(using: id) {
75 | return get()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:95:40: warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
93 | if !didSetupSet {
94 | didSetupSet = true
95 | StoreConfig.$store.withValue(store) {
| `- warning: type 'Store' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
96 | findObservables(using: id) {
97 | set(newValue)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/Store.swift:8:20: note: class 'Store' does not conform to the 'Sendable' protocol
6 | /// It stores the state for atoms, tracks dependencies between them, and updates the state when required.
7 | /// The `Store` class is the core of the state management system.
8 | public final class Store {
| `- note: class 'Store' does not conform to the 'Sendable' protocol
9 | @MainActor
10 | var cancellables: [UUID: Set<AnyCancellable>] = [:]
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:58:52: warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
56 | do {
57 | try await StoreConfig.$store.withValue(store) {
58 | for try await value in asyncSequence {
| |- warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asyncSequence' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
59 | guard !Task.isCancelled else {
60 | return
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:90:35: warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
88 | let store = StoreConfig.store
89 | StoreConfig.$store.withValue(store) {
90 | let atom = create(asyncSequence, id: id) { atom, finishedTask in
| |- warning: sending 'asyncSequence' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'asyncSequence' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
91 | if finishedTask {
92 | cancellable?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:154:10: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
152 | let atom = AtomValue<AsyncState<Root>>(.loading, id: id, dontCheckEqual: true)
153 | let store = StoreConfig.store
154 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
155 | atom.getterPublisher.prefix(1).receive(on: DispatchQueue.main).sink { _ in
156 | if store.tasks[id] == nil {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/AsyncSequenceAtom.swift:156:16: warning: sending 'atom' risks causing data races; this is an error in the Swift 6 language mode
154 | Task { @MainActor in
155 | atom.getterPublisher.prefix(1).receive(on: DispatchQueue.main).sink { _ in
156 | if store.tasks[id] == nil {
| |- warning: sending 'atom' risks causing data races; this is an error in the Swift 6 language mode
| `- note: 'atom' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
157 | Scope.$id.withValue(id, operation: {
158 | taskStatus(atom, false)
:
188 | }
189 |
190 | return atom
| `- note: access can happen concurrently
191 | }
192 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/Atom.swift:52:34: warning: sending 'defaultValue' risks causing data races; this is an error in the Swift 6 language mode
50 | self.defaultValue = defaultValue
51 | self.setup = {
52 | let atom = AtomValue(defaultValue, id: id)
| |- warning: sending 'defaultValue' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'defaultValue' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
53 | let store = StoreConfig.store
54 | store.addAtomValue(atom, for: id)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/Atom.swift:65:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
63 | /// it will be executed before updating the atom's value.
64 | public func reset() {
65 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
66 | let store = StoreConfig.store
67 | guard let atom: AtomValue<T> = store.getAtomValue(for: id) else {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:69:13: warning: main actor-isolated closure captures value of non-Sendable type 'GetSetAtom<T>.Cache' from nonisolated context; later accesses to value could race; this is an error in the Swift 6 language mode
67 | var didSetupGet = false
68 | let store = StoreConfig.store
69 | cache.value = get()
| `- warning: main actor-isolated closure captures value of non-Sendable type 'GetSetAtom<T>.Cache' from nonisolated context; later accesses to value could race; this is an error in the Swift 6 language mode
70 | let getProxy: () -> T = {
71 | if !didSetupGet {
:
116 | }
117 | atomConfigurations[id] = setup
118 | }
| `- note: access can happen concurrently
119 |
120 | /// Resets the value of the `GetSetAtom` to the initial state as defined by the custom getter.
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Atoms/GetSetAtom.swift:122:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
120 | /// Resets the value of the `GetSetAtom` to the initial state as defined by the custom getter.
121 | public func reset() {
122 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
123 | cache.value = get()
124 | }
warning: 'spi-builder-workspace': dependency 'xctest-dynamic-overlay' is not used by any target
BUILD FAILURE 6.0 macosSpm