pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
12.07k stars 1.41k forks source link

UUID creation not working as described in the SyncUps Tutorial #3073

Closed Blejator90 closed 3 months ago

Blejator90 commented 3 months ago

Description

Description

In the 'New sync-up form' section, step 5 from the Testing the Sync-Up Form tutorial, there's a discrepancy between the code in the tutorial and the example project regarding the Attendee object instantiation using Tagged. EDIT: The same UUID creation discrepancy persists in subsequent sections.

Issues:

Checklist

Expected behavior

The tutorial code should allow for the successful creation of an Attendee object using the provided syntax, ensuring consistency with the example project and compiling without errors.

Actual behavior

The code snippet from the tutorial let attendee = Attendee(id: uuid()) fails to compile. The tutorial's approach does not match the working example in the repository, which uses let attendee = Attendee(id: Attendee.ID(uuid())).

Steps to reproduce

No response

The Composable Architecture version information

1.10.3

Destination operating system

iOS 17.4

Xcode version information

Version 15.3 (15E204a)

Swift Compiler version information

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
mbrandonw commented 3 months ago

Hi @Blejator90, we should update the tutorial to be clearer, but the tagged discussion was just a side quest, and the rest of the tutorial assumes that we are not using tagged to keep things simple.

Blejator90 commented 3 months ago

Hi @mbrandonw, that makes sense.

I noticed a similar issue in the tutorial for Editing and Deleting a Sync-Up, specifically in section 2 about deleting a sync-up. The tutorial instructs deleting the syncup inline and references an alternative (if it bothers the reader): sending a delegate action. Although step 13 does mention calling this delegate action, it's not illustrated in the examples. Subsequent sections also assume that the reader implemented the delegate action, which was not shown.