From 672654d0d2185009543ef274c558d4b49b4d8a3b Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Thu, 31 Jul 2025 10:01:36 -0500 Subject: [PATCH 1/2] Fixes for Perception 2 --- .../Observation/ObservationStateRegistrar.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/ComposableArchitecture/Observation/ObservationStateRegistrar.swift b/Sources/ComposableArchitecture/Observation/ObservationStateRegistrar.swift index f76508c3ae27..01f4740334a4 100644 --- a/Sources/ComposableArchitecture/Observation/ObservationStateRegistrar.swift +++ b/Sources/ComposableArchitecture/Observation/ObservationStateRegistrar.swift @@ -30,9 +30,11 @@ extension ObservationStateRegistrar: Equatable, Hashable, Codable { @inlinable public func access( _ subject: Subject, - keyPath: KeyPath + keyPath: KeyPath, + filePath: StaticString = #filePath, + line: UInt = #line ) { - self.registrar.access(subject, keyPath: keyPath) + self.registrar.access(subject, keyPath: keyPath, filePath: filePath, line: line) } /// Mutates a value to a new value, and decided to notify observers based on the identity of From ee56c56f093ddc3613f5f5a0dab29de6a6f37d52 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Thu, 31 Jul 2025 11:04:07 -0700 Subject: [PATCH 2/2] wip --- Package@swift-6.0.swift | 3 ++- .../Observation/ObservationStateRegistrar.swift | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift index 06fff9013621..d12fbe3b8e9a 100644 --- a/Package@swift-6.0.swift +++ b/Package@swift-6.0.swift @@ -27,7 +27,8 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.1.0"), .package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.2.0"), .package(url: "https://github.com/pointfreeco/swift-navigation", from: "2.3.0"), - .package(url: "https://github.com/pointfreeco/swift-perception", "1.3.4"..<"3.0.0"), +// .package(url: "https://github.com/pointfreeco/swift-perception", "1.3.4"..<"3.0.0"), + .package(url: "https://github.com/pointfreeco/swift-perception", branch: "perception-2-fixes"), .package(url: "https://github.com/pointfreeco/swift-sharing", "0.1.2"..<"3.0.0"), .package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.3.0"), .package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"), diff --git a/Sources/ComposableArchitecture/Observation/ObservationStateRegistrar.swift b/Sources/ComposableArchitecture/Observation/ObservationStateRegistrar.swift index 01f4740334a4..f76508c3ae27 100644 --- a/Sources/ComposableArchitecture/Observation/ObservationStateRegistrar.swift +++ b/Sources/ComposableArchitecture/Observation/ObservationStateRegistrar.swift @@ -30,11 +30,9 @@ extension ObservationStateRegistrar: Equatable, Hashable, Codable { @inlinable public func access( _ subject: Subject, - keyPath: KeyPath, - filePath: StaticString = #filePath, - line: UInt = #line + keyPath: KeyPath ) { - self.registrar.access(subject, keyPath: keyPath, filePath: filePath, line: line) + self.registrar.access(subject, keyPath: keyPath) } /// Mutates a value to a new value, and decided to notify observers based on the identity of