Skip to content

Commit 3a02c5e

Browse files
authored
Fix a bunch of DocC references. (#3287)
* Fix a bunch of DocC references. * wip * doc fix * issue message fix * swift-navigation 2.0.5
1 parent 833792e commit 3a02c5e

File tree

72 files changed

+856
-848
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+856
-848
lines changed

ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
"kind" : "remoteSourceControl",
123123
"location" : "https://github.com/pointfreeco/swift-navigation",
124124
"state" : {
125-
"revision" : "47cfd149ed01223d14fc8e3f52ae27d3a35fe036",
126-
"version" : "2.0.3"
125+
"revision" : "b8dced6524996b3dc5569346697ddcb1bc4307aa",
126+
"version" : "2.0.4"
127127
}
128128
},
129129
{

Package.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122
"kind" : "remoteSourceControl",
123123
"location" : "https://github.com/pointfreeco/swift-navigation",
124124
"state" : {
125-
"revision" : "47cfd149ed01223d14fc8e3f52ae27d3a35fe036",
126-
"version" : "2.0.3"
125+
"revision" : "b8dced6524996b3dc5569346697ddcb1bc4307aa",
126+
"version" : "2.0.4"
127127
}
128128
},
129129
{

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ let package = Package(
2727
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.3.5"),
2828
.package(url: "https://github.com/pointfreeco/swift-identified-collections", from: "1.1.0"),
2929
.package(url: "https://github.com/pointfreeco/swift-macro-testing", from: "0.2.0"),
30-
.package(url: "https://github.com/pointfreeco/swift-navigation", from: "2.0.3"),
30+
.package(url: "https://github.com/pointfreeco/swift-navigation", from: "2.0.5"),
3131
.package(url: "https://github.com/pointfreeco/swift-perception", from: "1.3.4"),
3232
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.2.2"),
3333
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),

Sources/ComposableArchitecture/CaseReducer.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public protocol CaseReducerState {
2727
}
2828

2929
extension Reducer {
30-
/// A special overload of ``Reducer/ifLet(_:action:destination:fileID:line:)-4k9by`` for enum
30+
/// A special overload of ``Reducer/ifLet(_:action:destination:fileID:filePath:line:column:)-4ub6q`` for enum
3131
/// reducers.
3232
public func ifLet<ChildState: CaseReducerState, ChildAction>(
3333
_ state: WritableKeyPath<State, PresentationState<ChildState>>,
@@ -38,7 +38,7 @@ extension Reducer {
3838
}
3939
}
4040

41-
/// A special overload of ``Reducer/forEach(_:action:destination:fileID:line:)-582rd`` for enum
41+
/// A special overload of ``Reducer/forEach(_:action:destination:fileID:filePath:line:column:)-9svqb`` for enum
4242
/// reducers.
4343
public func forEach<DestinationState: CaseReducerState, DestinationAction>(
4444
_ state: WritableKeyPath<State, StackState<DestinationState>>,

Sources/ComposableArchitecture/Dependencies/Dismiss.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ extension DependencyValues {
3636
/// ```
3737
///
3838
/// This operation works by finding the nearest parent feature that was presented using either the
39-
/// ``Reducer/ifLet(_:action:destination:fileID:line:)-4k9by`` or the
40-
/// ``Reducer/forEach(_:action:destination:fileID:line:)-582rd`` operator, and then dismisses _that_
39+
/// ``Reducer/ifLet(_:action:destination:fileID:filePath:line:column:)-4ub6q`` or the
40+
/// ``Reducer/forEach(_:action:destination:fileID:filePath:line:column:)-9svqb`` operator, and then dismisses _that_
4141
/// feature. It performs the dismissal by either sending the ``PresentationAction/dismiss`` in the
4242
/// case of `ifLet` or sending ``StackAction/popFrom(id:)`` in the case of `forEach`.
4343
///

Sources/ComposableArchitecture/Dependencies/IsPresented.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ extension DependencyValues {
33
/// feature.
44
///
55
/// This value is set to true on reducers that are run from within
6-
/// ``Reducer/ifLet(_:action:destination:fileID:line:)-4k9by`` and
7-
/// ``Reducer/forEach(_:action:destination:fileID:line:)-582rd``.
6+
/// ``Reducer/ifLet(_:action:destination:fileID:filePath:line:column:)-4ub6q`` and
7+
/// ``Reducer/forEach(_:action:destination:fileID:filePath:line:column:)-9svqb``.
88
///
99
/// See ``DismissEffect`` for more information on how child features can easily dismiss themselves
1010
/// without communicating to the parent.

Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigratingTo1.10.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ will be instantly observed by all features holding onto it.
3333

3434
Further, there are persistence strategies one can employ in `@Shared`. For example, if you want any
3535
changes of `signUpData` to be automatically persisted to the file system you can use the
36-
``PersistenceReaderKey/fileStorage(_:)`` and specify a URL:
36+
``PersistenceReaderKey/fileStorage(_:decoder:encoder:)`` and specify a URL:
3737

3838
```swift
3939
@ObservableState
@@ -59,7 +59,7 @@ struct State {
5959
}
6060
```
6161

62-
Similar to ``PersistenceReaderKey/fileStorage(_:)``, upon launch of the application the initial
62+
Similar to ``PersistenceReaderKey/fileStorage(_:decoder:encoder:)``, upon launch of the application the initial
6363
value of `isOn` will be populated from user defaults, and any change to `isOn` will be automatically
6464
persisted to user defaults. Further, if the user defaults value changes, all instances of `isOn`
6565
in the application will automatically update.

Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigratingTo1.13.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ on these tools):
6969
@Reducer
7070
struct AppFeature {
7171
struct State {
72-
var path: StackState<
72+
var path = StackState<Path.State>()
7373
// ...
7474
}
7575

@@ -91,8 +91,7 @@ stack state:
9191
class AppController: NavigationStackController {
9292
private var store: StoreOf<AppFeature>!
9393

94-
@MainActor
95-
init(store: StoreOf<AppFeature>) {
94+
convenience init(store: StoreOf<AppFeature>) {
9695
@UIBindable var store = store
9796

9897
self.init(path: $store.scope(state: \.path, action: \.path)) {
@@ -107,6 +106,7 @@ class AppController: NavigationStackController {
107106
EditViewController(store: store)
108107
}
109108
}
109+
110110
self.model = model
111111
}
112112
}

Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigratingTo1.4.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ You can also technically drop the ``Reducer`` conformance:
4444
```
4545

4646
However, there are some known issues in Xcode that cause autocomplete and type inference to break.
47-
See the documentation of <doc:Reducers#Gotchas> for more gotchas on using the `@Reducer` macro.
47+
See the documentation of <doc:Reducer#Gotchas> for more gotchas on using the `@Reducer` macro.
4848

4949

5050
### Using case key paths
@@ -278,8 +278,9 @@ enum Action {
278278
}
279279
```
280280

281-
And in the reducer, instead of invoking ``Reducer/forEach(_:action:element:fileID:line:)-92aox``
282-
with a case path using the `/` prefix operator:
281+
And in the reducer, instead of invoking
282+
``Reducer/forEach(_:action:element:fileID:filePath:line:column:)-3dw7i`` with a case path using the
283+
`/` prefix operator:
283284

284285
```swift
285286
Reduce { state, action in

Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigratingTo1.6.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Migrating to 1.6
22

3-
Update your code to make use of the new ``TestStore/receive(_:_:timeout:assert:file:line:)-dkei``
4-
method when you need to assert on the payload inside an action received.
3+
Update your code to make use of the new
4+
``TestStore/receive(_:_:timeout:assert:fileID:file:line:column:)-9jd7x`` method when you need to
5+
assert on the payload inside an action received.
56

67
## Overview
78

@@ -16,7 +17,8 @@ In version 1.4 of the library we provided a new assertion method on ``TestStore`
1617
asserting on actions received without asserting on the payload in the action (see
1718
<doc:MigratingTo1.4#Receiving-test-store-actions> for more information). However, sometimes it is
1819
important to assert on the payload, especially when testing delegate actions from child features,
19-
and so that is why 1.6 introduces ``TestStore/receive(_:_:timeout:assert:file:line:)-dkei``.
20+
and so that is why 1.6 introduces
21+
``TestStore/receive(_:_:timeout:assert:fileID:file:line:column:)-9jd7x``.
2022

2123
If you have code like the following for asserting that an action features sends a delegate action
2224
with a specific payload:

Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigratingTo1.7.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ IfLetStore(store: store.scope(state: \.child, action: \.child)) { childStore in
170170
}
171171
```
172172

173-
This can now be updated to use plain `if let` syntax with ``Store/scope(state:action:)-36e72``:
173+
This can now be updated to use plain `if let` syntax with ``Store/scope(state:action:)-90255``:
174174

175175
```swift
176176
if let childStore = store.scope(state: \.child, action: \.child) {
@@ -212,7 +212,7 @@ ForEachStore(
212212
```
213213

214214
This can now be updated to use the vanilla `ForEach` view in SwiftUI, along with
215-
``Store/scope(state:action:)-1nelp``, identified by the state of each row:
215+
``Store/scope(state:action:)-90255``, identified by the state of each row:
216216

217217
```swift
218218
ForEach(
@@ -538,7 +538,7 @@ property wrapper:
538538
```
539539

540540
And the original code can now be updated to our custom initializer
541-
``SwiftUI/NavigationStack/init(path:root:destination:fileID:line:)`` on `NavigationStack`:
541+
``SwiftUI/NavigationStack/init(path:root:destination:fileID:filePath:line:column:)`` on `NavigationStack`:
542542

543543
```swift
544544
NavigationStack(path: $store.scope(state: \.path, action: \.path)) {

Sources/ComposableArchitecture/Documentation.docc/Articles/MigrationGuides/MigratingTo1.9.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Migrating to 1.9
22

3-
Update your code to make use of the new ``TestStore/send(_:assert:file:line:)-1oopl`` method on
4-
``TestStore`` which gives a succinct syntax for sending actions with case key paths, and the
5-
``Reducer/dependency(_:)`` method for overriding dependencies.
3+
Update your code to make use of the new ``TestStore/send(_:assert:fileID:file:line:column:)-8877x``
4+
method on ``TestStore`` which gives a succinct syntax for sending actions with case key paths, and
5+
the ``Reducer/dependency(_:)`` method for overriding dependencies.
66

77
## Overview
88

@@ -29,9 +29,10 @@ store.receive(\.child.presented.success, "Hello")
2929
```
3030

3131
Version 1.9 introduces similar affordances for _sending_ actions to test stores via
32-
``TestStore/send(_:assert:file:line:)-1oopl`` and ``TestStore/send(_:_:assert:file:line:)``. These
33-
methods can significantly simplify integration-style tests that send deeply-nested actions to child
34-
features, and provide symmetry to how actions are received:
32+
``TestStore/send(_:assert:fileID:file:line:column:)-8877x`` and
33+
``TestStore/send(_:_:assert:fileID:file:line:column:)``. These methods can significantly simplify
34+
integration-style tests that send deeply-nested actions to child features, and provide symmetry to
35+
how actions are received:
3536

3637
```diff
3738
-store.send(.path(.element(id: 0, action: .destination(.presented(.record(.startButtonTapped))))))

Sources/ComposableArchitecture/Documentation.docc/Articles/Navigation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use these tools.
2121
- <doc:TreeBasedNavigation>
2222
- ``Presents()``
2323
- ``PresentationAction``
24-
- ``Reducer/ifLet(_:action:destination:fileID:line:)-4k9by``
24+
- ``Reducer/ifLet(_:action:destination:fileID:filePath:line:column:)-4ub6q``
2525

2626
### Stack-based navigation
2727

@@ -30,7 +30,7 @@ use these tools.
3030
- ``StackAction``
3131
- ``StackActionOf``
3232
- ``StackElementID``
33-
- ``Reducer/forEach(_:action:destination:fileID:line:)-582rd``
33+
- ``Reducer/forEach(_:action:destination:fileID:filePath:line:column:)-9svqb``
3434

3535
### Dismissal
3636

0 commit comments

Comments
 (0)