Skip to content

Commit

Permalink
Merge branch 'pointfreeco:main' into dynamic2
Browse files Browse the repository at this point in the history
  • Loading branch information
artemkrachulov authored Jan 30, 2023
2 parents 990bff9 + 98af2ad commit f68c9b9
Show file tree
Hide file tree
Showing 138 changed files with 3,403 additions and 4,556 deletions.
3 changes: 3 additions & 0 deletions ComposableArchitecture.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

222 changes: 119 additions & 103 deletions ComposableArchitecture.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,106 +1,122 @@
{
"object": {
"pins": [
{
"package": "combine-schedulers",
"repositoryURL": "https://github.com/pointfreeco/combine-schedulers",
"state": {
"branch": null,
"revision": "882ac01eb7ef9e36d4467eb4b1151e74fcef85ab",
"version": "0.9.1"
}
},
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser",
"state": {
"branch": null,
"revision": "9f39744e025c7d377987f30b03770805dcb0bcd1",
"version": "1.1.4"
}
},
{
"package": "Benchmark",
"repositoryURL": "https://github.com/google/swift-benchmark",
"state": {
"branch": null,
"revision": "8163295f6fe82356b0bcf8e1ab991645de17d096",
"version": "0.1.2"
}
},
{
"package": "swift-case-paths",
"repositoryURL": "https://github.com/pointfreeco/swift-case-paths",
"state": {
"branch": null,
"revision": "bb436421f57269fbcfe7360735985321585a86e5",
"version": "0.10.1"
}
},
{
"package": "swift-clocks",
"repositoryURL": "https://github.com/pointfreeco/swift-clocks",
"state": {
"branch": null,
"revision": "692ec4f5429a667bdd968c7260dfa2b23adfeffc",
"version": "0.1.4"
}
},
{
"package": "swift-collections",
"repositoryURL": "https://github.com/apple/swift-collections",
"state": {
"branch": null,
"revision": "f504716c27d2e5d4144fa4794b12129301d17729",
"version": "1.0.3"
}
},
{
"package": "swift-custom-dump",
"repositoryURL": "https://github.com/pointfreeco/swift-custom-dump",
"state": {
"branch": null,
"revision": "819d9d370cd721c9d87671e29d947279292e4541",
"version": "0.6.0"
}
},
{
"package": "SwiftDocCPlugin",
"repositoryURL": "https://github.com/apple/swift-docc-plugin",
"state": {
"branch": null,
"revision": "3303b164430d9a7055ba484c8ead67a52f7b74f6",
"version": "1.0.0"
}
},
{
"package": "swift-identified-collections",
"repositoryURL": "https://github.com/pointfreeco/swift-identified-collections",
"state": {
"branch": null,
"revision": "bfb0d43e75a15b6dfac770bf33479e8393884a36",
"version": "0.4.1"
}
},
{
"package": "swiftui-navigation",
"repositoryURL": "https://github.com/pointfreeco/swiftui-navigation",
"state": {
"branch": null,
"revision": "46acf5ecc1cabdb28d7fe03289f6c8b13a023f52",
"version": "0.4.5"
}
},
{
"package": "xctest-dynamic-overlay",
"repositoryURL": "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state": {
"branch": null,
"revision": "16e6409ee82e1b81390bdffbf217b9c08ab32784",
"version": "0.5.0"
}
"pins" : [
{
"identity" : "combine-schedulers",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "882ac01eb7ef9e36d4467eb4b1151e74fcef85ab",
"version" : "0.9.1"
}
]
},
"version": 1
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser",
"state" : {
"revision" : "4ad606ba5d7673ea60679a61ff867cc1ff8c8e86",
"version" : "1.2.1"
}
},
{
"identity" : "swift-benchmark",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/swift-benchmark",
"state" : {
"revision" : "8163295f6fe82356b0bcf8e1ab991645de17d096",
"version" : "0.1.2"
}
},
{
"identity" : "swift-case-paths",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "c3a42e8d1a76ff557cf565ed6d8b0aee0e6e75af",
"version" : "0.11.0"
}
},
{
"identity" : "swift-clocks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-clocks",
"state" : {
"revision" : "20b25ca0dd88ebfb9111ec937814ddc5a8880172",
"version" : "0.2.0"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections",
"state" : {
"revision" : "937e904258d22af6e447a0b72c0bc67583ef64a2",
"version" : "1.0.4"
}
},
{
"identity" : "swift-custom-dump",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-custom-dump",
"state" : {
"revision" : "ead7d30cc224c3642c150b546f4f1080d1c411a8",
"version" : "0.6.1"
}
},
{
"identity" : "swift-dependencies",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-dependencies",
"state" : {
"revision" : "8282b0c59662eb38946afe30eb403663fc2ecf76",
"version" : "0.1.4"
}
},
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-plugin",
"state" : {
"revision" : "10bc670db657d11bdd561e07de30a9041311b2b1",
"version" : "1.1.0"
}
},
{
"identity" : "swift-docc-symbolkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/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" : "fd34c544ad27f3ba6b19142b348005bfa85b6005",
"version" : "0.6.0"
}
},
{
"identity" : "swiftui-navigation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swiftui-navigation",
"state" : {
"revision" : "bf0fb9d53019cbde1a1e0cf290b560a0a0411282",
"version" : "0.6.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "16b23a295fa322eb957af98037f86791449de60f",
"version" : "0.8.1"
}
}
],
"version" : 2
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DependenciesTests"
BuildableName = "DependenciesTests"
BlueprintName = "DependenciesTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ private let readMe = """
Bindable state and actions allow you to safely eliminate the boilerplate caused by needing to \
have a unique action for every UI control. Instead, all UI bindings can be consolidated into a \
single `binding` action that holds onto a `BindingAction` value, and all bindable state can be \
safeguarded with the `BindableState` property wrapper.
safeguarded with the `BindingState` property wrapper.
It is instructive to compare this case study to the "Binding Basics" case study.
"""
Expand All @@ -17,10 +17,10 @@ private let readMe = """

struct BindingForm: ReducerProtocol {
struct State: Equatable {
@BindableState var sliderValue = 5.0
@BindableState var stepCount = 10
@BindableState var text = ""
@BindableState var toggleIsOn = false
@BindingState var sliderValue = 5.0
@BindingState var stepCount = 10
@BindingState var text = ""
@BindingState var toggleIsOn = false
}

enum Action: BindableAction, Equatable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ private let readMe = """

struct FocusDemo: ReducerProtocol {
struct State: Equatable {
@BindableState var focusedField: Field?
@BindableState var password: String = ""
@BindableState var username: String = ""
@BindingState var focusedField: Field?
@BindingState var password: String = ""
@BindingState var username: String = ""

enum Field: String, Hashable {
case username, password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import XCTest
@MainActor
final class AnimationTests: XCTestCase {
func testRainbow() async {
let clock = TestClock()

let store = TestStore(
initialState: Animations.State(),
reducer: Animations()
)

let clock = TestClock()
store.dependencies.continuousClock = clock
) {
$0.continuousClock = clock
}

await store.send(.rainbowButtonTapped)
await store.receive(.setColor(.red)) {
Expand Down Expand Up @@ -59,13 +60,14 @@ final class AnimationTests: XCTestCase {
}

func testReset() async {
let clock = TestClock()

let store = TestStore(
initialState: Animations.State(),
reducer: Animations()
)

let clock = TestClock()
store.dependencies.continuousClock = clock
) {
$0.continuousClock = clock
}

await store.send(.rainbowButtonTapped)
await store.receive(.setColor(.red)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ final class EffectsBasicsTests: XCTestCase {
let store = TestStore(
initialState: EffectsBasics.State(),
reducer: EffectsBasics()
)

store.dependencies.continuousClock = ImmediateClock()
) {
$0.continuousClock = ImmediateClock()
}

await store.send(.incrementButtonTapped) {
$0.count = 1
Expand All @@ -25,10 +25,10 @@ final class EffectsBasicsTests: XCTestCase {
let store = TestStore(
initialState: EffectsBasics.State(),
reducer: EffectsBasics()
)

store.dependencies.factClient.fetch = { "\($0) is a good number Brent" }
store.dependencies.continuousClock = ImmediateClock()
) {
$0.factClient.fetch = { "\($0) is a good number Brent" }
$0.continuousClock = ImmediateClock()
}

await store.send(.incrementButtonTapped) {
$0.count = 1
Expand All @@ -46,9 +46,9 @@ final class EffectsBasicsTests: XCTestCase {
let store = TestStore(
initialState: EffectsBasics.State(),
reducer: EffectsBasics()
)

store.dependencies.continuousClock = ImmediateClock()
) {
$0.continuousClock = ImmediateClock()
}

await store.send(.decrementButtonTapped) {
$0.count = -1
Expand All @@ -62,9 +62,9 @@ final class EffectsBasicsTests: XCTestCase {
let store = TestStore(
initialState: EffectsBasics.State(),
reducer: EffectsBasics()
)

store.dependencies.continuousClock = TestClock()
) {
$0.continuousClock = TestClock()
}

await store.send(.decrementButtonTapped) {
$0.count = -1
Expand Down
Loading

0 comments on commit f68c9b9

Please sign in to comment.