episode-code-samples icon indicating copy to clipboard operation
episode-code-samples copied to clipboard

[0245-tca-tour-pt3] Test case `testAddStandup` crash

Open SunsetWan opened this issue 9 months ago • 4 comments

Steps to reproduce it

  1. Open Standups project at git commit id f8a3513fac4e0949d729650c8b7c956c72e65f51
  2. Run test case testAddStandup from test suite StandupsListTests
  3. Crash!

Screenshots

Image Image

Try to fix

I make this change to make the test case pass. It turns out that index 0 of $0.standups is valid. So I am confused about this crash 🧐 .

Image

SunsetWan avatar Mar 17 '25 15:03 SunsetWan

Environment

  • Xcode 16.2 (16C5032a)
  • macOS 15.3.1 (24D70)
  • Swift: swift-driver version 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)

SunsetWan avatar Mar 17 '25 15:03 SunsetWan

I'm facing the same crash. Looks like it is due to a change in the dependencies of TCA 1.0.0. In the video they are using swift-identified-collections 0.7.1 but if you take a look at the Package.swift file of version 1.0.0 it is pointing to "1.0.0" or greater. The workaround I found was to downgrade TCA from 1.0.0 to the previous version 0.59.0, which brings swift-identified-collections 0.8.0 and makes the tests pass. But we still need to know what is the change in swift-identified-collections that is causing this issue.

david6p2 avatar Jun 13 '25 02:06 david6p2

@david6p2 0.59.0 is a pretty old release. Can you point the app to as latest release as possible to see if the issue still persists?

DominikGrodl avatar Jun 13 '25 05:06 DominikGrodl

@DominikGrodl I just tried with TCA 1.20.2 and the error persists. The problem is with TCA importing swift-identified-collections 1.1.1

david6p2 avatar Jun 13 '25 18:06 david6p2