Build Information
Failed to build Atoms, reference main (d19c9a
), with Swift 6.0 for macOS (SPM) on 29 Nov 2024 10:52:54 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
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 {
[68/79] Compiling Atoms AtomStore.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 {
[69/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 {
[70/79] Compiling Atoms RefCounter.swift
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/RefCounter.swift:4:5: warning: let 'refCounterDecreased' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UUID, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
2 | import Combine
3 |
4 | let refCounterDecreased = PassthroughSubject<UUID, Never>()
| `- warning: let 'refCounterDecreased' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UUID, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | class RefCounter {
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/RefCounter.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 | let refCounterDecreased = PassthroughSubject<UUID, Never>()
| |- note: annotate 'refCounterDecreased' 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
5 |
6 | class RefCounter {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/RefCounter.swift:25:32: warning: sending 'store' risks causing data races; this is an error in the Swift 6 language mode
23 |
24 | DispatchQueue.main.async { [id] in
25 | if let viewsRefs = store.viewRefs.value[id], viewsRefs <= 0 {
| |- warning: sending 'store' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'store' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
26 | if store.watchCount.value[id, default: 0] == 0 {
27 | store.removeAtomValue(for: id)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ResettableAtom.swift:10:57: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
8 | func onReset(_ value: @escaping (inout Self.T) -> Void) -> Self {
9 | Task { @MainActor in
10 | StoreConfig.store.resettableCallbacks[id] = value
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'value' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
11 | }
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ResettableAtom.swift:9:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
7 | extension ResettableAtom where Self: ReadableAtom {
8 | func onReset(_ value: @escaping (inout Self.T) -> Void) -> Self {
9 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
10 | StoreConfig.store.resettableCallbacks[id] = value
11 | }
[71/79] Compiling Atoms ResettableAtom.swift
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/RefCounter.swift:4:5: warning: let 'refCounterDecreased' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UUID, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
2 | import Combine
3 |
4 | let refCounterDecreased = PassthroughSubject<UUID, Never>()
| `- warning: let 'refCounterDecreased' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UUID, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | class RefCounter {
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/RefCounter.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 | let refCounterDecreased = PassthroughSubject<UUID, Never>()
| |- note: annotate 'refCounterDecreased' 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
5 |
6 | class RefCounter {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/RefCounter.swift:25:32: warning: sending 'store' risks causing data races; this is an error in the Swift 6 language mode
23 |
24 | DispatchQueue.main.async { [id] in
25 | if let viewsRefs = store.viewRefs.value[id], viewsRefs <= 0 {
| |- warning: sending 'store' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'store' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
26 | if store.watchCount.value[id, default: 0] == 0 {
27 | store.removeAtomValue(for: id)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ResettableAtom.swift:10:57: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
8 | func onReset(_ value: @escaping (inout Self.T) -> Void) -> Self {
9 | Task { @MainActor in
10 | StoreConfig.store.resettableCallbacks[id] = value
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'value' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
11 | }
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ResettableAtom.swift:9:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
7 | extension ResettableAtom where Self: ReadableAtom {
8 | func onReset(_ value: @escaping (inout Self.T) -> Void) -> Self {
9 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
10 | StoreConfig.store.resettableCallbacks[id] = value
11 | }
[72/79] Compiling Atoms Scope.swift
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/RefCounter.swift:4:5: warning: let 'refCounterDecreased' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UUID, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
2 | import Combine
3 |
4 | let refCounterDecreased = PassthroughSubject<UUID, Never>()
| `- warning: let 'refCounterDecreased' is not concurrency-safe because non-'Sendable' type 'PassthroughSubject<UUID, Never>' may have shared mutable state; this is an error in the Swift 6 language mode
5 |
6 | class RefCounter {
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/RefCounter.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 | let refCounterDecreased = PassthroughSubject<UUID, Never>()
| |- note: annotate 'refCounterDecreased' 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
5 |
6 | class RefCounter {
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/RefCounter.swift:25:32: warning: sending 'store' risks causing data races; this is an error in the Swift 6 language mode
23 |
24 | DispatchQueue.main.async { [id] in
25 | if let viewsRefs = store.viewRefs.value[id], viewsRefs <= 0 {
| |- warning: sending 'store' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'store' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
26 | if store.watchCount.value[id, default: 0] == 0 {
27 | store.removeAtomValue(for: id)
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ResettableAtom.swift:10:57: warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
8 | func onReset(_ value: @escaping (inout Self.T) -> Void) -> Self {
9 | Task { @MainActor in
10 | StoreConfig.store.resettableCallbacks[id] = value
| |- warning: sending 'value' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'value' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
11 | }
12 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/Internal/ResettableAtom.swift:9:14: warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
7 | extension ResettableAtom where Self: ReadableAtom {
8 | func onReset(_ value: @escaping (inout Self.T) -> Void) -> Self {
9 | Task { @MainActor in
| `- warning: task or actor isolated value cannot be sent; this is an error in the Swift 6 language mode
10 | StoreConfig.store.resettableCallbacks[id] = value
11 | }
[73/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 | }
[74/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 | }
[75/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 | }
[76/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 | }
[77/79] Compiling Atoms CaptureAtom.swift
/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/CaptureAtomPublisher.swift:39: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
37 | }
38 |
39 | @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
40 | private var refCounter: RefCounter? = nil
41 |
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/CaptureAtomPublisher.swift:32:31: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
30 | /// The wrapped `ReadableAtom` value as an `AnyPublisher`.
31 | public var wrappedValue: AnyPublisher<T, Never> {
32 | let setterPublisher = atom.setterPublisher.map { 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
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
:
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:32:58: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
30 | /// The wrapped `ReadableAtom` value as an `AnyPublisher`.
31 | public var wrappedValue: AnyPublisher<T, Never> {
32 | let setterPublisher = atom.setterPublisher.map { 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
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
:
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:34:18: 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 | let setterPublisher = atom.setterPublisher.map { atom.value }
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
35 | setterPublisher.eraseToAnyPublisher()
36 | ).eraseToAnyPublisher()
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:46:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
44 | /// - Parameter readableAtom: A `ReadableAtom` instance whose value will be captured by the `CaptureAtomPublisher`.
45 | public init<R: ReadableAtom>(_ readableAtom: R) where R.T == T {
46 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
47 | let store = StoreConfig.store
48 | 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/CaptureAtomPublisher.swift:57:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
55 | }
56 | }
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
58 | _atom = .init(wrappedValue: atom)
59 | 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/CaptureAtomPublisher.swift:58: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
56 | }
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
58 | _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
59 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
60 | 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/CaptureAtomPublisher.swift:59:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
58 | _atom = .init(wrappedValue: atom)
59 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
60 | atom: readableAtom.id,
61 | 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
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:72:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
70 |
71 | init<R: ReadableAtom>(onUpdate readableAtom: R) where R.T == T {
72 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
/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/CaptureAtomPublisher.swift:74:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
72 | readableAtom.runSetupIfNeeded()
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
75 | _atom = .init(wrappedValue: atom)
76 | }
/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/CaptureAtomPublisher.swift:75: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
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
75 | _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
76 | }
77 | }
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 }
[78/79] Compiling Atoms CaptureAtomPublisher.swift
/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/CaptureAtomPublisher.swift:39: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
37 | }
38 |
39 | @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
40 | private var refCounter: RefCounter? = nil
41 |
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/CaptureAtomPublisher.swift:32:31: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
30 | /// The wrapped `ReadableAtom` value as an `AnyPublisher`.
31 | public var wrappedValue: AnyPublisher<T, Never> {
32 | let setterPublisher = atom.setterPublisher.map { 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
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
:
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:32:58: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
30 | /// The wrapped `ReadableAtom` value as an `AnyPublisher`.
31 | public var wrappedValue: AnyPublisher<T, Never> {
32 | let setterPublisher = atom.setterPublisher.map { 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
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
:
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:34:18: 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 | let setterPublisher = atom.setterPublisher.map { atom.value }
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
35 | setterPublisher.eraseToAnyPublisher()
36 | ).eraseToAnyPublisher()
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:46:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
44 | /// - Parameter readableAtom: A `ReadableAtom` instance whose value will be captured by the `CaptureAtomPublisher`.
45 | public init<R: ReadableAtom>(_ readableAtom: R) where R.T == T {
46 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
47 | let store = StoreConfig.store
48 | 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/CaptureAtomPublisher.swift:57:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
55 | }
56 | }
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
58 | _atom = .init(wrappedValue: atom)
59 | 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/CaptureAtomPublisher.swift:58: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
56 | }
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
58 | _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
59 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
60 | 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/CaptureAtomPublisher.swift:59:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
58 | _atom = .init(wrappedValue: atom)
59 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
60 | atom: readableAtom.id,
61 | 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
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:72:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
70 |
71 | init<R: ReadableAtom>(onUpdate readableAtom: R) where R.T == T {
72 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
/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/CaptureAtomPublisher.swift:74:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
72 | readableAtom.runSetupIfNeeded()
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
75 | _atom = .init(wrappedValue: atom)
76 | }
/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/CaptureAtomPublisher.swift:75: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
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
75 | _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
76 | }
77 | }
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 }
[79/79] Compiling Atoms CaptureAtomValue.swift
/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/CaptureAtomPublisher.swift:39: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
37 | }
38 |
39 | @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
40 | private var refCounter: RefCounter? = nil
41 |
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/CaptureAtomPublisher.swift:32:31: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
30 | /// The wrapped `ReadableAtom` value as an `AnyPublisher`.
31 | public var wrappedValue: AnyPublisher<T, Never> {
32 | let setterPublisher = atom.setterPublisher.map { 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
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
:
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:32:58: warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
30 | /// The wrapped `ReadableAtom` value as an `AnyPublisher`.
31 | public var wrappedValue: AnyPublisher<T, Never> {
32 | let setterPublisher = atom.setterPublisher.map { 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
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
:
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:34:18: 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 | let setterPublisher = atom.setterPublisher.map { atom.value }
33 | return Publishers.MergeMany(
34 | Just(atom.value).eraseToAnyPublisher(),
| `- warning: main actor-isolated property 'atom' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
35 | setterPublisher.eraseToAnyPublisher()
36 | ).eraseToAnyPublisher()
37 | }
38 |
39 | @ObservedObject private var atom: AtomValue<T>
| `- note: property declared here
40 | private var refCounter: RefCounter? = nil
41 |
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:46:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
44 | /// - Parameter readableAtom: A `ReadableAtom` instance whose value will be captured by the `CaptureAtomPublisher`.
45 | public init<R: ReadableAtom>(_ readableAtom: R) where R.T == T {
46 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
47 | let store = StoreConfig.store
48 | 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/CaptureAtomPublisher.swift:57:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
55 | }
56 | }
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
58 | _atom = .init(wrappedValue: atom)
59 | 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/CaptureAtomPublisher.swift:58: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
56 | }
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
58 | _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
59 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
60 | 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/CaptureAtomPublisher.swift:59:15: error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
57 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
58 | _atom = .init(wrappedValue: atom)
59 | store.usedAtoms[Scope.id, default: []].append(.init(scope: Scope.id,
| `- error: main actor-isolated property 'usedAtoms' can not be mutated from a nonisolated context
60 | atom: readableAtom.id,
61 | 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
/Users/admin/builder/spi-builder-workspace/Sources/Atoms/PropertyWrappers/CaptureAtomPublisher.swift:72:22: error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
70 |
71 | init<R: ReadableAtom>(onUpdate readableAtom: R) where R.T == T {
72 | readableAtom.runSetupIfNeeded()
| `- error: call to main actor-isolated instance method 'runSetupIfNeeded()' in a synchronous nonisolated context
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
/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/CaptureAtomPublisher.swift:74:40: error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
72 | readableAtom.runSetupIfNeeded()
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
| `- error: call to main actor-isolated instance method 'getAtomValue(for:)' in a synchronous nonisolated context
75 | _atom = .init(wrappedValue: atom)
76 | }
/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/CaptureAtomPublisher.swift:75: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
73 | let store = StoreConfig.store
74 | let atom: AtomValue<T> = store.getAtomValue(for: readableAtom.id)
75 | _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
76 | }
77 | }
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 }
warning: 'spi-builder-workspace': dependency 'xctest-dynamic-overlay' is not used by any target
BUILD FAILURE 6.0 macosSpm