pointfreeco / episode-code-samples

💾 Point-Free episode code.
https://www.pointfree.co
MIT License
957 stars 295 forks source link

Please fix the error Episode #76 ~ #106

Closed sylar-Jeon closed 2 years ago

sylar-Jeon commented 2 years ago

Your PrimeTime example is not compile.

image

.../PrimeTime/Counter/Counter.swift:21:12: error: cannot convert value of type '(inout Int, CounterAction) -> ()' to expected argument type '(inout Int, CounterAction) -> Effect' (aka '(inout Int, CounterAction) -> () -> ()') pullback(counterReducer, value: \CounterViewState.count, action: \CounterViewAction.counter), ^ .../PrimeTime/Counter/Counter.swift:22:12: error: cannot convert value of type '(inout PrimeModalState, PrimeModalAction) -> ()' (aka '(inout (count: Int, favoritePrimes: Array), PrimeModalAction) -> ()') to expected argument type '(inout PrimeModalState, PrimeModalAction) -> Effect' (aka '(inout (count: Int, favoritePrimes: Array), PrimeModalAction) -> () -> ()') pullback(primeModalReducer, value: .self, action: .primeModal) ^

Xcode Version 13.1 (13A1030d)

Also you should check all episode. There are many episode examples that cannot be built.

stephencelis commented 2 years ago

Hi @sylar-Jeon,

Because of how often Swift and Apple's frameworks change, it isn't possible for us to update all code samples to build in the latest Xcode every release.

You should definitely be able to get each code sample to build by using the version of Xcode that we used at the time the episode was released. You can use the following web site to figure out which version of Xcode that was:

https://xcodereleases.com

We still encourage folks to try to get old code samples to build in the latest Xcode if possible. It can be frustrating, but also rewarding, and an exercise that can help in real-world maintenance of code bases over time.

sylar-Jeon commented 2 years ago

OK. Thank you for your immediate feedback. I can fix it.