diff --git a/Package.resolved b/Package.resolved index bf14856..b87b366 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,123 +1,123 @@ { - "originHash": "aa8bf4913549d8243ca09d1b54c3e8f35f1e2da825e9f455e170f1887093dad8", - "pins": [ + "originHash" : "49e79d5efb917806606060911ad9820b909135af063afed7da460f19840f3e3b", + "pins" : [ { - "identity": "combine-schedulers", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/combine-schedulers", - "state": { - "revision": "dcccb979a2183b8df3334237e3dc1ae2b4116a86", - "version": "1.2.0" + "identity" : "combine-schedulers", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/combine-schedulers", + "state" : { + "revision" : "dcccb979a2183b8df3334237e3dc1ae2b4116a86", + "version" : "1.2.0" } }, { - "identity": "swift-clocks", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/swift-clocks", - "state": { - "revision": "72d749bf341b78851203066ab421869b783ec42a", - "version": "1.1.0" + "identity" : "swift-clocks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-clocks", + "state" : { + "revision" : "72d749bf341b78851203066ab421869b783ec42a", + "version" : "1.1.0" } }, { - "identity": "swift-collections", - "kind": "remoteSourceControl", - "location": "https://github.com/apple/swift-collections", - "state": { - "revision": "a0cb0954ecb21e4e31b0070e6ed5674e8556685a", - "version": "1.6.0" + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections", + "state" : { + "revision" : "a0cb0954ecb21e4e31b0070e6ed5674e8556685a", + "version" : "1.6.0" } }, { - "identity": "swift-concurrency-extras", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/swift-concurrency-extras", - "state": { - "revision": "a90e2e40a7a840a853dd29e57cbef5dbb72c9d5b", - "version": "1.4.0" + "identity" : "swift-concurrency-extras", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-concurrency-extras", + "state" : { + "revision" : "a90e2e40a7a840a853dd29e57cbef5dbb72c9d5b", + "version" : "1.4.0" } }, { - "identity": "swift-custom-dump", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/swift-custom-dump", - "state": { - "revision": "b9b59eb58c946236d6f16305c576ad194c36444e", - "version": "1.6.0" + "identity" : "swift-custom-dump", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-custom-dump", + "state" : { + "revision" : "b9b59eb58c946236d6f16305c576ad194c36444e", + "version" : "1.6.0" } }, { - "identity": "swift-dependencies", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/swift-dependencies", - "state": { - "revision": "f80552807ec92f72fe3fe4543d71879182b0bfd5", - "version": "1.13.0" + "identity" : "swift-dependencies", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-dependencies", + "state" : { + "revision" : "f80552807ec92f72fe3fe4543d71879182b0bfd5", + "version" : "1.13.0" } }, { - "identity": "swift-docc-plugin", - "kind": "remoteSourceControl", - "location": "https://github.com/swiftlang/swift-docc-plugin", - "state": { - "revision": "647c708be89f834fa6a6d4945442793a77ddf5b6", - "version": "1.5.0" + "identity" : "swift-docc-plugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-docc-plugin", + "state" : { + "revision" : "647c708be89f834fa6a6d4945442793a77ddf5b6", + "version" : "1.5.0" } }, { - "identity": "swift-docc-symbolkit", - "kind": "remoteSourceControl", - "location": "https://github.com/swiftlang/swift-docc-symbolkit", - "state": { - "revision": "b45d1f2ed151d057b54504d653e0da5552844e34", - "version": "1.0.0" + "identity" : "swift-docc-symbolkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-docc-symbolkit", + "state" : { + "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", + "version" : "1.0.0" } }, { - "identity": "swift-identified-collections", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/swift-identified-collections", - "state": { - "revision": "322d9ffeeba85c9f7c4984b39422ec7cc3c56597", - "version": "1.1.1" + "identity" : "swift-identified-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-identified-collections", + "state" : { + "revision" : "322d9ffeeba85c9f7c4984b39422ec7cc3c56597", + "version" : "1.1.1" } }, { - "identity": "swift-issue-reporting", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/swift-issue-reporting", - "state": { - "revision": "71c7c9a761d1ca6ed4ccb6ced040fe1c1a39e8e7", - "version": "2.1.0" + "identity" : "swift-issue-reporting", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-issue-reporting", + "state" : { + "revision" : "71c7c9a761d1ca6ed4ccb6ced040fe1c1a39e8e7", + "version" : "2.1.0" } }, { - "identity": "swift-perception", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/swift-perception", - "state": { - "revision": "25ac73741c3436605d61eceb5207e896973918e7", - "version": "2.0.10" + "identity" : "swift-perception", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-perception", + "state" : { + "revision" : "25ac73741c3436605d61eceb5207e896973918e7", + "version" : "2.0.10" } }, { - "identity": "swift-syntax", - "kind": "remoteSourceControl", - "location": "https://github.com/swiftlang/swift-syntax", - "state": { - "revision": "4799286537280063c85a32f09884cfbca301b1a1", - "version": "602.0.0" + "identity" : "swift-syntax", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-syntax", + "state" : { + "revision" : "4799286537280063c85a32f09884cfbca301b1a1", + "version" : "602.0.0" } }, { - "identity": "xctest-dynamic-overlay", - "kind": "remoteSourceControl", - "location": "https://github.com/pointfreeco/xctest-dynamic-overlay", - "state": { - "revision": "7bbd97af585672a3dcdf6575ad37b339ad41b579", - "version": "1.13.0" + "identity" : "xctest-dynamic-overlay", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", + "state" : { + "revision" : "cb281f343fd953280336dcbd3822cdf47c182f5b", + "version" : "1.10.0" } } ], - "version": 3 + "version" : 3 } diff --git a/Package.swift b/Package.swift index b79a52e..bf064a2 100644 --- a/Package.swift +++ b/Package.swift @@ -33,7 +33,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/pointfreeco/combine-schedulers", from: "1.0.0"), - .package(url: "https://github.com/pointfreeco/swift-case-paths", from: "1.7.3"), + .package(url: "https://github.com/pointfreeco/swift-case-paths", from: "1.10.0"), .package(url: "https://github.com/pointfreeco/swift-concurrency-extras", from: "1.3.0"), .package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0"), .package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.5.1"), diff --git a/Sources/Sharing/Traits/CasePaths.swift b/Sources/Sharing/Traits/CasePaths.swift index 26540e2..d4d93c5 100644 --- a/Sources/Sharing/Traits/CasePaths.swift +++ b/Sources/Sharing/Traits/CasePaths.swift @@ -8,7 +8,7 @@ extension Shared { @_disfavoredOverload public subscript( - dynamicMember keyPath: KeyPath> + dynamicMember keyPath: KeyPath & Sendable> ) -> Shared? where Value: CasePathable { func open(_ reference: some MutableReference) -> Shared { @@ -24,7 +24,7 @@ extension SharedReader { @_disfavoredOverload public subscript( - dynamicMember keyPath: KeyPath> + dynamicMember keyPath: KeyPath & Sendable> ) -> SharedReader? where Value: CasePathable { func open(_ reference: some Reference) -> SharedReader { @@ -37,15 +37,15 @@ } } - private final class _ReferenceEnumToOptionalCase - where Base.Value: CasePathable { - typealias Value = Case? + private final class _ReferenceEnumToOptionalCase + where Base.Value: CasePathable, Path.Root == Base.Value { + typealias Value = Path.Value? let base: Base - let keyPath: _SendableKeyPath> - let casePath: AnyCasePath + let keyPath: _SendableKeyPath + let casePath: Path init( - base: Base, keyPath: _SendableKeyPath> + base: Base, keyPath: _SendableKeyPath ) { self.base = base self.keyPath = keyPath @@ -102,15 +102,15 @@ #endif } - private final class _MutableReferenceEnumToOptionalCase - where Base.Value: CasePathable { - typealias Value = Case? + private final class _MutableReferenceEnumToOptionalCase + where Base.Value: CasePathable, Path.Root == Base.Value { + typealias Value = Path.Value? let base: Base - let keyPath: _SendableKeyPath> - let casePath: AnyCasePath + let keyPath: _SendableKeyPath + let casePath: Path init( - base: Base, keyPath: _SendableKeyPath> + base: Base, keyPath: _SendableKeyPath ) { self.base = base self.keyPath = keyPath