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 ownership between parent and child stores #2674

Merged
merged 14 commits into from
Dec 21, 2023
Merged

Fix ownership between parent and child stores #2674

merged 14 commits into from
Dec 21, 2023

Conversation

mbrandonw
Copy link
Member

@mbrandonw mbrandonw commented Dec 20, 2023

This is a continuation of our work in #2664.

This PR cleans up a few of the internals of the revamped store scoping, including:

  • It avoids a retain cycle between parent and child store. This retain cycle does not generally matter, as cached stores live as long as the lifetime of the app at this time, but in the future when we more proactively prune invalidated stores, it could prevent stores from being reinitialized.
  • It brackets some debug codes to debug builds only.
  • It cleans up some unused code.

@mbrandonw mbrandonw merged commit aa81d78 into main Dec 21, 2023
4 of 5 checks passed
@mbrandonw mbrandonw deleted the fix-init-tests branch December 21, 2023 23:03
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://github.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://github.com/pointfreeco/swift-composable-architecture/releases/tag/1.6.0)

[Compare
Source](https://github.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://github.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://github.com/finestructure),
[pointfreeco/swift-composable-architecture#2679).
- Infrastructure: Typo fix (thanks
[@&#8203;tomokisun](https://github.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://github.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://github.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://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: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