diff --git a/.github/package.xcworkspace/xcshareddata/swiftpm/Package.resolved b/.github/package.xcworkspace/xcshareddata/swiftpm/Package.resolved index 984607182e02..8bb736adb33b 100644 --- a/.github/package.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/.github/package.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-issue-reporting", "state" : { - "revision" : "926f43898706eaa127db79ac42138e1ad7e85a3f", - "version" : "1.2.0" + "revision" : "357ca1e5dd31f613a1d43320870ebc219386a495", + "version" : "1.2.2" } }, { diff --git a/ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved index b2fd4087e20e..f122482400a1 100644 --- a/ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-issue-reporting", "state" : { - "revision" : "926f43898706eaa127db79ac42138e1ad7e85a3f", - "version" : "1.2.0" + "revision" : "357ca1e5dd31f613a1d43320870ebc219386a495", + "version" : "1.2.2" } }, { diff --git a/Package.resolved b/Package.resolved index ba565986e12f..e8fdff8a7b35 100644 --- a/Package.resolved +++ b/Package.resolved @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-issue-reporting", "state" : { - "revision" : "926f43898706eaa127db79ac42138e1ad7e85a3f", - "version" : "1.2.0" + "revision" : "357ca1e5dd31f613a1d43320870ebc219386a495", + "version" : "1.2.2" } }, { diff --git a/Package.swift b/Package.swift index 945ed025bddb..74b5e62a2387 100644 --- a/Package.swift +++ b/Package.swift @@ -30,7 +30,7 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.2.0"), .package(url: "https://github.com/pointfreeco/swift-perception", from: "1.3.3"), .package(url: "https://github.com/pointfreeco/swiftui-navigation", from: "1.5.2"), - .package(url: "https://github.com/pointfreeco/swift-issue-reporting", from: "1.2.0"), + .package(url: "https://github.com/pointfreeco/swift-issue-reporting", from: "1.2.2"), .package(url: "https://github.com/swiftlang/swift-syntax", "509.0.0"..<"601.0.0-prerelease"), ], targets: [ diff --git a/Sources/ComposableArchitecture/Documentation.docc/Articles/SharingState.md b/Sources/ComposableArchitecture/Documentation.docc/Articles/SharingState.md index 34e6034cc09c..f22c3a7d4665 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Articles/SharingState.md +++ b/Sources/ComposableArchitecture/Documentation.docc/Articles/SharingState.md @@ -1133,7 +1133,7 @@ struct MainApp: App { var body: some Scene { WindowGroup { - if _XCTIsTesting { + if isTesting { // NB: Don't run application in tests to avoid interference // between the app and the test. EmptyView() diff --git a/Sources/ComposableArchitecture/Reducer/Reducers/StackReducer.swift b/Sources/ComposableArchitecture/Reducer/Reducers/StackReducer.swift index b15bd47de6ec..e9d4ed0ce7a1 100644 --- a/Sources/ComposableArchitecture/Reducer/Reducers/StackReducer.swift +++ b/Sources/ComposableArchitecture/Reducer/Reducers/StackReducer.swift @@ -46,11 +46,11 @@ public struct StackState { _read { yield self._dictionary[id] } _modify { yield &self._dictionary[id] } set { - switch (self.ids.contains(id), newValue, _XCTIsTesting) { + switch (self.ids.contains(id), newValue, isTesting) { case (true, _, _), (false, .some, true): self._dictionary[id] = newValue case (false, .some, false): - if !_XCTIsTesting { + if !isTesting { reportIssue( "Can't assign element at missing ID.", fileID: fileID.rawValue, @@ -65,35 +65,6 @@ public struct StackState { } } - // subscript( - // id id: StackElementID, - // fileID fileID: HashableStaticString, - // filePath filePath: HashableStaticString, - // line line: UInt = #line, - // column column: UInt = #column - // ) -> Element? { - // _read { yield self._dictionary[id] } - // _modify { yield &self._dictionary[id] } - // set { - // switch (self.ids.contains(id), newValue, _XCTIsTesting) { - // case (true, _, _), (false, .some, true): - // self._dictionary[id] = newValue - // case (false, .some, false): - // if !_XCTIsTesting { - // reportIssue( - // "Can't assign element at missing ID.", - // fileID: fileID.rawValue, - // filePath: filePath.rawValue, - // line: line, - // column: column - // ) - // } - // case (false, .none, _): - // break - // } - // } - // } - /// Accesses the value associated with the given id and case for reading and writing. /// /// When using stack-based navigation (see ) you will typically have a @@ -755,7 +726,7 @@ extension StackElementID: CustomDumpStringConvertible { extension StackElementID: ExpressibleByIntegerLiteral { public init(integerLiteral value: Int) { - if !_XCTIsTesting { + if !isTesting { fatalError( """ Specifying stack element IDs by integer literal is not allowed outside of tests.