Skip to content

Commit ce1bac0

Browse files
committed
WIP
1 parent 78cee39 commit ce1bac0

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.mise.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[tools]
2-
tuist = "4.10.2"
2+
tuist = "4.24.0"

Package.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.9
1+
// swift-tools-version:6.0
22
import PackageDescription
33
import CompilerPluginSupport
44

@@ -26,8 +26,8 @@ let package = Package(
2626
.package(url: "https://github.com/VergeGroup/swift-concurrency-task-manager", from: "1.1.0"),
2727

2828
/// for testing
29-
.package(url: "https://github.com/nalexn/ViewInspector.git", from: "0.9.3"),
30-
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),
29+
.package(url: "https://github.com/nalexn/ViewInspector.git", branch: "0.10.0"),
30+
.package(url: "https://github.com/apple/swift-syntax.git", from: "510.0.3"),
3131
.package(url: "https://github.com/pointfreeco/swift-macro-testing.git", from: "0.2.1")
3232
],
3333
targets: [
@@ -121,5 +121,5 @@ let package = Package(
121121
.product(name: "MacroTesting", package: "swift-macro-testing"),
122122
])
123123
],
124-
swiftLanguageVersions: [.v5]
124+
swiftLanguageModes: [.v5, .v6]
125125
)

Sources/Verge/Store/StoreType+SwiftUI.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extension BindingDerived {
4242
}
4343

4444
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
45-
extension StoreDriverType {
45+
extension StoreDriverType where Self : Sendable {
4646

4747
public func binding() -> SwiftUI.Binding<Scope> {
4848
.init(get: { [self /* source store lives until binding released */] in
@@ -65,7 +65,7 @@ extension StoreDriverType {
6565
/// - mutation: A closure to update the state.
6666
/// If the closure is nil, state will be automatically updated.
6767
/// - Returns: The result of binding
68-
public func binding<T>(_ keypath: WritableKeyPath<Scope, T>, with mutation: ((T) -> Void)? = nil) -> SwiftUI.Binding<T> {
68+
public func binding<T>(_ keypath: WritableKeyPath<Scope, T> & Sendable, with mutation: (@Sendable (T) -> Void)? = nil) -> SwiftUI.Binding<T> {
6969
.init(get: { [self /* source store lives until binding released */] in
7070
return self.state.primitive[keyPath: keypath]
7171
}, set: { [weak self] value in

Sources/VergeNormalization/Selector.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ public struct KeyPathTableSelector<
1010
Table: TableType
1111
>: TableSelector, Equatable {
1212

13-
public let keyPath: KeyPath<Storage, Table>
13+
public let keyPath: KeyPath<Storage, Table> & Sendable
1414

15-
public init(keyPath: KeyPath<Storage, Table>) {
15+
public init(keyPath: KeyPath<Storage, Table> & Sendable) {
1616
self.keyPath = keyPath
1717
}
1818

@@ -28,7 +28,7 @@ extension TableSelector {
2828
Storage: NormalizedStorageType,
2929
Table: TableType
3030
>(
31-
_ keyPath: KeyPath<Storage, Table>
31+
_ keyPath: KeyPath<Storage, Table> & Sendable
3232
) -> Self where Self == KeyPathTableSelector<Storage, Table> {
3333
return .init(keyPath: keyPath)
3434
}
@@ -46,9 +46,9 @@ public struct KeyPathStorageSelector<
4646
Storage: NormalizedStorageType
4747
>: StorageSelector, Equatable {
4848

49-
public let keyPath: KeyPath<Source, Storage>
49+
public let keyPath: KeyPath<Source, Storage> & Sendable
5050

51-
public init(keyPath: KeyPath<Source, Storage>) {
51+
public init(keyPath: KeyPath<Source, Storage> & Sendable) {
5252
self.keyPath = keyPath
5353
}
5454

@@ -65,7 +65,7 @@ extension StorageSelector {
6565
Storage: NormalizedStorageType
6666
>
6767
(
68-
_ keyPath: KeyPath<Source, Storage>
68+
_ keyPath: KeyPath<Source, Storage> & Sendable
6969
) -> Self where Self == KeyPathStorageSelector<Source, Storage> {
7070
return .init(keyPath: keyPath)
7171
}

Sources/VergeTiny/Source.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public final class DynamicPropertyStorage {
215215

216216
}
217217

218-
private var _storageKey: Void?
218+
nonisolated(unsafe) private var _storageKey: Void?
219219

220220
extension NSObject {
221221

0 commit comments

Comments
 (0)