Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
Blejator90 opened this issue May 11, 2024 · 2 comments · Fixed by #3076
Closed
3 tasks done

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

Blejator90 opened this issue May 11, 2024 · 2 comments · Fixed by #3076
Labels
bug Something isn't working due to a bug in the library.

Comments

@Blejator90
Copy link

Blejator90 commented May 11, 2024

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:

  • Reducer section:

    • Tutorial suggests: let attendee = Attendee(id: uuid()) which does not compile.
    • Example project uses: let attendee = Attendee(id: Attendee.ID(uuid())), which compiles successfully.
  • Test section:

    • Tutorial shows: let attendee = Attendee(id: Attendee.ID(0)), resulting in a compilation error.
    • Example project correction: let attendeeId = Attendee.ID(UUID(0)), compiles without issues.

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

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
@Blejator90 Blejator90 added the bug Something isn't working due to a bug in the library. label May 11, 2024
@Blejator90 Blejator90 changed the title UUID creation not working as described in the SyncUps Tutrial UUID creation not working as described in the SyncUps Tutorial May 11, 2024
@mbrandonw
Copy link
Member

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
Copy link
Author

Blejator90 commented May 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working due to a bug in the library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants