Closed awolf-foreflight closed 1 year ago
Hi @awolf-foreflight, a few steps before the step you highlight it was mentioned that the actions need to be made Equatable
:
Maybe this could be improved, but it's not really an issue with the library so I am going to convert this to a discussion where we can further discuss ways to improve this.
Description
The tutorial has an error on line 14. This won't compile for me with Xcode 14.3.1 despite the store defined on line 7 being an instance of TestStore.
You can see the autocompleted doesn't provide the expected receive method. When I paste it in the code from the tutorial the test won't compile
This is a screen grab of the tutorial:
Checklist
main
branch of this package.Expected behavior
Copying and pasting code from a tutorial should compile
Actual behavior
Multiple compiler errors
This screen grab shows if you simply instantiate a test store with
TestStore()
then autocomplete works and the test compilesBut using the
store
constant doesn't work. 🤷♂️The root cause appears to be that the tutorial doesn't tell us to add the following line to the
CounterFeature.swift
file.this fixes the problem
I got lucky and got an error about Action needing to be equatable and remembered the trick the tutorial required to make
State
equatable.But this is a frustrating experience and difficult to resolve.
Steps to reproduce
Copy paste tutorial example code, try to compile, observe compiler error
The Composable Architecture version information
0.55.0
Destination operating system
ios 16.3
Xcode version information
14.3.1
Swift Compiler version information