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

Fix SwiftUI warning #2688

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Fix SwiftUI warning #2688

merged 1 commit into from
Jan 2, 2024

Conversation

stephencelis
Copy link
Member

I noticed this when taking SyncUps for a spin on main. When I was editing an attendee and added a new one while the current attendee autocompleted, I'd get a warning in the ViewStore's sink where objectWillChange was getting pinged during a render.

I'm pretty sure we should be dropping the first value from the sink to prevent objectWillChange from being pinged when the ViewStore is being initialized in the view.

I noticed this when taking SyncUps for a spin. When I was editing an
attendee and added a new one while the current attendee autocompleted,
I'd get a warning in the `ViewStore`'s `sink` where `objectWillChange`
was getting pinged during a render.

I'm pretty sure we should be dropping the first value from the `sink` to
prevent `objectWillChange` from being pinged when the `ViewStore` is
being initialized in the view.
@mbrandonw mbrandonw merged commit 1884ec5 into main Jan 2, 2024
5 checks passed
@mbrandonw mbrandonw deleted the fix-warning branch January 2, 2024 19:04
cgrindel-self-hosted-renovate bot added a commit to cgrindel/rules_swift_package_manager that referenced this pull request Jan 9, 2024
…ure to from: "1.6.0" (#842)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[pointfreeco/swift-composable-architecture](https://togithub.com/pointfreeco/swift-composable-architecture)
| minor | `from: "1.5.6"` -> `from: "1.6.0"` |

---

### Release Notes

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

###
[`v1.6.0`](https://togithub.com/pointfreeco/swift-composable-architecture/releases/tag/1.6.0)

[Compare
Source](https://togithub.com/pointfreeco/swift-composable-architecture/compare/1.5.6...1.6.0)

#### What's Changed

- Added: `TestStore.receive(\.action, payload)` for asserting against
the payload of an action without requiring the action itself be
`Equatable`
([pointfreeco/swift-composable-architecture#2669;
[pointfreeco/swift-composable-architecture#2691)
- Fixed: It was possible for `ViewStore`s to ping their
`objectWillChange` publisher during a body computation, triggering a
SwiftUI warning. This has been fixed
([pointfreeco/swift-composable-architecture#2688).
- Fixed: `@Reducer` macro no longer automatically applies
`@CasePathable` macro to enums with explicit conformance (thanks
[@&#8203;scogeo](https://togithub.com/scogeo),
[pointfreeco/swift-composable-architecture#2685).
- Fixed: The `prepareDependencies` closure is now only performed a
single time when creating a store, not every single time an action is
received
([pointfreeco/swift-composable-architecture#2695).
- Fixed: A retain cycle in `PresentationModifier` has been fixed
([pointfreeco/swift-composable-architecture#2697).
- Performance: Clean up parent/child store invalidation checks
([pointfreeco/swift-composable-architecture#2674).
- Infrastructure: Fix package build in 5.7 for SPI
([pointfreeco/swift-composable-architecture#2675;
thanks [@&#8203;finestructure](https://togithub.com/finestructure),
[pointfreeco/swift-composable-architecture#2679).
- Infrastructure: Typo fix (thanks
[@&#8203;tomokisun](https://togithub.com/tomokisun),
[pointfreeco/swift-composable-architecture#2678).
- Infrastructure: Add documentation around new store scoping
characteristics
([pointfreeco/swift-composable-architecture#2676).
- Infrastructure: Prevent unnecessary tutorial diffs (thanks
[@&#8203;bricklife](https://togithub.com/bricklife),
[pointfreeco/swift-composable-architecture#2692).
- Infrastructure: Tutorial fixes
([pointfreeco/swift-composable-architecture#2693).
- Infrastructure : Clean up shared state case study
([pointfreeco/swift-composable-architecture#2696).

#### New Contributors

- [@&#8203;bricklife](https://togithub.com/bricklife) made their first
contribution in
[pointfreeco/swift-composable-architecture#2692

**Full Changelog**:
pointfreeco/swift-composable-architecture@1.5.6...1.6.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://togithub.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://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM2LjEwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

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.

None yet

2 participants