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

Simple SyncUp tutorial fixes #3141

Merged
merged 22 commits into from
Jun 5, 2024

Conversation

dafurman
Copy link
Contributor

@dafurman dafurman commented Jun 5, 2024

Breaking out simpler fixes from #3139. I'll readd the same comments I used there here, in case the extra context helps a bit.

@dafurman dafurman changed the title Simply SyncUp tutorial fixes Simple SyncUp tutorial fixes Jun 5, 2024
@@ -16,6 +16,8 @@
Go back to the SyncUpsList.swift file, and start by applying the [`@Shared`](<doc:Shared>)
property wrapper to the `syncUps` field.

> Note: Our changes will not compile until step 3.
Copy link
Contributor Author

@dafurman dafurman Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion to throw this in, because often when I go through enough steps in a tutorial without code compiling, I end up wondering if I missed something in a step, which distracts from the tutorial itself.

However, if you don't want this change, you can revert 9d93448 where this is added

@@ -184,7 +184,8 @@
}

@Step {
Use the ``ComposableArchitecture/Reducer/ifLet(_:action:then:fileID:line:)-42kki`` operator
Add support for the `.alert` case, and
Copy link
Contributor Author

@dafurman dafurman Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the step also makes this change in the diff from
EditingAndDeletingSyncUp-02-code-0003.swift


to
EditingAndDeletingSyncUp-02-code-0004.swift

@@ -37,7 +37,7 @@
}

Next we add a case to the `Action` enum for each action the user can perform in the view.
Currently there are 3 buttons, and so we will have an action for each.
Currently there are 2 buttons, and so we will have an action for each.
Copy link
Contributor Author

@dafurman dafurman Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From this, which today just covers the two actions - delete and edit.

Add an action for each of the buttons in the UI, including tapping the "Delete" button,
and the "Edit" button.

inside the `edit` case of the destination should change. We can use the special
``ComposableArchitecture/PresentationState/subscript(case:)-7uqte`` defined on
`$destination` to modify the data in a particular case.
inside the `edit` case of the destination should change.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -23,6 +23,31 @@ struct MeetingView: View {
}
}

extension SyncUp {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding SyncUp.mock while we're making the MeetingView, which gets used later on in the tutorial

@dafurman dafurman marked this pull request as ready for review June 5, 2024 04:31
Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much! Gonna apply a few suggestions below and merge 😄

…ildingSyncUps/06-SyncUpDetail/EditingAndDeletingSyncUp.tutorial
…ildingSyncUps/05-PersistingSyncUps/PersistingSyncUps.tutorial
…ildingSyncUps/07-SyncUpDetailNavigation/MeetingNavigation-01-code-0003.swift
@stephencelis stephencelis merged commit 63a0795 into pointfreeco:main Jun 5, 2024
@dafurman dafurman deleted the simpleSyncUpTutorialFixes branch June 5, 2024 21:48
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/rules_swift_package_manager Jul 2, 2024
…ure to from: "1.11.2" (#1137)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[pointfreeco/swift-composable-architecture](https://github.com/pointfreeco/swift-composable-architecture)
| minor | `from: "1.10.4"` -> `from: "1.11.2"` |

---

### Release Notes

<details>
<summary>pointfreeco/swift-composable-architecture
(pointfreeco/swift-composable-architecture)</summary>

###
[`v1.11.2`](https://github.com/pointfreeco/swift-composable-architecture/releases/tag/1.11.2)

[Compare
Source](https://github.com/pointfreeco/swift-composable-architecture/compare/1.11.1...1.11.2)

#### What's Changed

- Fixed: Avoid potential sendability warnings in Swift 6 mode
([https://github.com/pointfreeco/swift-composable-architecture/pull/3167](https://github.com/pointfreeco/swift-composable-architecture/pull/3167)).
- Fixed: `PersistenceKeyDefault` no longer uses the loaded value as an
initial value (thanks
[@&#8203;fdzsergio](https://github.com/fdzsergio),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3174](https://github.com/pointfreeco/swift-composable-architecture/pull/3174)).
- Fixed: Address a potential deadlock by isolating `Shared.withLock` to
the main actor
([https://github.com/pointfreeco/swift-composable-architecture/pull/3178](https://github.com/pointfreeco/swift-composable-architecture/pull/3178)).
- Fixed: Disfavor `Shared`'s optional dynamic member lookup
([https://github.com/pointfreeco/swift-composable-architecture/pull/3170](https://github.com/pointfreeco/swift-composable-architecture/pull/3170)).
Note that this fix may be source breaking. See the [migration
guide](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.11)
for more details.
- Fixed: Don't over-observe app storage mutations
([https://github.com/pointfreeco/swift-composable-architecture/pull/3186](https://github.com/pointfreeco/swift-composable-architecture/pull/3186)).
- Fixed: `$shared.elements` is now stable based on identity, and
restricted to identified arrays
([https://github.com/pointfreeco/swift-composable-architecture/pull/3187](https://github.com/pointfreeco/swift-composable-architecture/pull/3187)).
- Infrastructure: Drop Swift <5.9 support
([https://github.com/pointfreeco/swift-composable-architecture/pull/3185](https://github.com/pointfreeco/swift-composable-architecture/pull/3185)).
Xcode 15 has been required for app submission since April, so we can
keep our Swift support in line with Apple's.
- Infrastructure: 1.11 migration guide fixes (thanks
[@&#8203;larryonoff](https://github.com/larryonoff),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3184](https://github.com/pointfreeco/swift-composable-architecture/pull/3184));
tutorial typo fixes (thanks
[@&#8203;meltsplit](https://github.com/meltsplit),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3161](https://github.com/pointfreeco/swift-composable-architecture/pull/3161)).

#### New Contributors

- [@&#8203;meltsplit](https://github.com/meltsplit) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3161](https://github.com/pointfreeco/swift-composable-architecture/pull/3161)
- [@&#8203;fdzsergio](https://github.com/fdzsergio) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3174](https://github.com/pointfreeco/swift-composable-architecture/pull/3174)

**Full Changelog**:
pointfreeco/swift-composable-architecture@1.11.1...1.11.2

###
[`v1.11.1`](https://github.com/pointfreeco/swift-composable-architecture/releases/tag/1.11.1)

[Compare
Source](https://github.com/pointfreeco/swift-composable-architecture/compare/1.11.0...1.11.1)

#### What's Changed

- Fixed: Support swift-syntax from 600.0.0-latest
([https://github.com/pointfreeco/swift-composable-architecture/pull/3160](https://github.com/pointfreeco/swift-composable-architecture/pull/3160)).
- Fixed: `Shared.withLock` now pass values by continuation
([https://github.com/pointfreeco/swift-composable-architecture/pull/3154](https://github.com/pointfreeco/swift-composable-architecture/pull/3154)).
- Infrastructure: Clean up DocC and link to new migration guide in
README
([https://github.com/pointfreeco/swift-composable-architecture/pull/3153](https://github.com/pointfreeco/swift-composable-architecture/pull/3153));
SyncUp tutorial fixes (thanks
[@&#8203;dafurman](https://github.com/dafurman),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3139](https://github.com/pointfreeco/swift-composable-architecture/pull/3139);
thanks [@&#8203;RuiAAPeres](https://github.com/RuiAAPeres),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3159](https://github.com/pointfreeco/swift-composable-architecture/pull/3159));
note Swift bug in documentation
([https://github.com/pointfreeco/swift-composable-architecture/pull/3157](https://github.com/pointfreeco/swift-composable-architecture/pull/3157)).

#### New Contributors

- [@&#8203;RuiAAPeres](https://github.com/RuiAAPeres) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3159](https://github.com/pointfreeco/swift-composable-architecture/pull/3159)

**Full Changelog**:
pointfreeco/swift-composable-architecture@1.11.0...1.11.1

###
[`v1.11.0`](https://github.com/pointfreeco/swift-composable-architecture/releases/tag/1.11.0)

[Compare
Source](https://github.com/pointfreeco/swift-composable-architecture/compare/1.10.4...1.11.0)

#### What's Changed

- Added: `Shared.withLock`, for mutating shared state from asynchronous
contexts
([https://github.com/pointfreeco/swift-composable-architecture/pull/3136](https://github.com/pointfreeco/swift-composable-architecture/pull/3136)).
Direct mutations from asynchronous contexts is marked unavailable and
will be an error in Swift 6.
- Added: `SharedReader.constant`
([https://github.com/pointfreeco/swift-composable-architecture/pull/3127](https://github.com/pointfreeco/swift-composable-architecture/pull/3127)).
- Added: `$store.scope` will now emit a warning when a dismiss action
doesn't `nil` out a child feature, suggesting a `Reducer.ifLet` (or
parent integration) is missing
([https://github.com/pointfreeco/swift-composable-architecture/pull/3089](https://github.com/pointfreeco/swift-composable-architecture/pull/3089)).
- Deprecated: `Shared`'s optional dynamic member lookup overload has
been deprecated in favor of a `Binding.init` that unwraps optional
values
([https://github.com/pointfreeco/swift-composable-architecture/pull/3145](https://github.com/pointfreeco/swift-composable-architecture/pull/3145)).
- Fixed: Avoid crash when using `.appStorage` with a `URL` value (thanks
[@&#8203;pwszebor](https://github.com/pwszebor),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3098](https://github.com/pointfreeco/swift-composable-architecture/pull/3098)).
- Fixed: Worked around a build failure when integrating with Tuist
([https://github.com/pointfreeco/swift-composable-architecture/pull/3140](https://github.com/pointfreeco/swift-composable-architecture/pull/3140)).
- Infrastructure: Tutorial fixes
([https://github.com/pointfreeco/swift-composable-architecture/pull/3076](https://github.com/pointfreeco/swift-composable-architecture/pull/3076);
thanks [@&#8203;MartinMoizard](https://github.com/MartinMoizard),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3078](https://github.com/pointfreeco/swift-composable-architecture/pull/3078);
[https://github.com/pointfreeco/swift-composable-architecture/pull/3072](https://github.com/pointfreeco/swift-composable-architecture/pull/3072);
thanks [@&#8203;hmhv](https://github.com/hmhv),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3091](https://github.com/pointfreeco/swift-composable-architecture/pull/3091);
thanks [@&#8203;gibachan](https://github.com/gibachan),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3099](https://github.com/pointfreeco/swift-composable-architecture/pull/3099);
thanks [@&#8203;btr-better](https://github.com/btr-better),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3107](https://github.com/pointfreeco/swift-composable-architecture/pull/3107);
thanks [@&#8203;woxtu](https://github.com/woxtu),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3119](https://github.com/pointfreeco/swift-composable-architecture/pull/3119),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3123](https://github.com/pointfreeco/swift-composable-architecture/pull/3123);
[https://github.com/pointfreeco/swift-composable-architecture/pull/3135](https://github.com/pointfreeco/swift-composable-architecture/pull/3135);
[https://github.com/pointfreeco/swift-composable-architecture/pull/3141](https://github.com/pointfreeco/swift-composable-architecture/pull/3141);
[https://github.com/pointfreeco/swift-composable-architecture/pull/3148](https://github.com/pointfreeco/swift-composable-architecture/pull/3148));
DocC fixes
([https://github.com/pointfreeco/swift-composable-architecture/pull/3085](https://github.com/pointfreeco/swift-composable-architecture/pull/3085);
[https://github.com/pointfreeco/swift-composable-architecture/pull/3087](https://github.com/pointfreeco/swift-composable-architecture/pull/3087);
thanks [@&#8203;JOyo246](https://github.com/JOyo246),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3092](https://github.com/pointfreeco/swift-composable-architecture/pull/3092);
thanks [@&#8203;leeari95](https://github.com/leeari95),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3110](https://github.com/pointfreeco/swift-composable-architecture/pull/3110);
[https://github.com/pointfreeco/swift-composable-architecture/pull/3138](https://github.com/pointfreeco/swift-composable-architecture/pull/3138));
README fixes (thanks [@&#8203;Matt54](https://github.com/Matt54),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3129](https://github.com/pointfreeco/swift-composable-architecture/pull/3129));
expose some navigation APIs with `@_spi(Internal)` (thanks
[@&#8203;Alex293](https://github.com/Alex293),
[https://github.com/pointfreeco/swift-composable-architecture/pull/3097](https://github.com/pointfreeco/swift-composable-architecture/pull/3097)).

#### New Contributors

- [@&#8203;MartinMoizard](https://github.com/MartinMoizard) made their
first contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3078](https://github.com/pointfreeco/swift-composable-architecture/pull/3078)
- [@&#8203;JOyo246](https://github.com/JOyo246) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3092](https://github.com/pointfreeco/swift-composable-architecture/pull/3092)
- [@&#8203;pwszebor](https://github.com/pwszebor) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3098](https://github.com/pointfreeco/swift-composable-architecture/pull/3098)
- [@&#8203;Alex293](https://github.com/Alex293) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3097](https://github.com/pointfreeco/swift-composable-architecture/pull/3097)
- [@&#8203;gibachan](https://github.com/gibachan) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3099](https://github.com/pointfreeco/swift-composable-architecture/pull/3099)
- [@&#8203;leeari95](https://github.com/leeari95) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3110](https://github.com/pointfreeco/swift-composable-architecture/pull/3110)
- [@&#8203;btr-better](https://github.com/btr-better) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3107](https://github.com/pointfreeco/swift-composable-architecture/pull/3107)
- [@&#8203;Matt54](https://github.com/Matt54) made their first
contribution in
[https://github.com/pointfreeco/swift-composable-architecture/pull/3129](https://github.com/pointfreeco/swift-composable-architecture/pull/3129)

**Full Changelog**:
pointfreeco/swift-composable-architecture@1.10.4...1.11.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants