-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 Store leak when async effect is in flight #2643
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A [Slack conversation](https://pointfreecommunity.slack.com/archives/C04KQQ7NXHV/p1702049135565039) pointed to a potential leak of the `Store` when it was executing an effect. This PR allows cancellation to properly propagate during deinitialization, and ensures that async effects don't strongly capture the store.
mbrandonw
reviewed
Dec 11, 2023
Also fixes #2508! |
mbrandonw
reviewed
Dec 11, 2023
mbrandonw
approved these changes
Dec 11, 2023
cgrindel-self-hosted-renovate bot
referenced
this pull request
in cgrindel/rules_swift_package_manager
Dec 12, 2023
…ure to from: "1.5.4" (#799) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [pointfreeco/swift-composable-architecture](https://togithub.com/pointfreeco/swift-composable-architecture) | patch | `from: "1.5.3"` -> `from: "1.5.4"` | --- ### Release Notes <details> <summary>pointfreeco/swift-composable-architecture (pointfreeco/swift-composable-architecture)</summary> ### [`v1.5.4`](https://togithub.com/pointfreeco/swift-composable-architecture/releases/tag/1.5.4) [Compare Source](https://togithub.com/pointfreeco/swift-composable-architecture/compare/1.5.3...1.5.4) #### What's Changed - Fixed: Archives should no longer fail due to `BindableAction` symbols (thanks [@​rhysm94](https://togithub.com/rhysm94), [https://github.com/pointfreeco/swift-composable-architecture/pull/2641](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2641)). - Fixed: Stores no longer leak for the duration of an async effect. Instead, they will automatically cancel their in-flight effects when they deinitialize ([https://github.com/pointfreeco/swift-composable-architecture/pull/2643](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2643)). - Infrastructure: Improve docs for sharing logic in parent and child features ([https://github.com/pointfreeco/swift-composable-architecture/pull/2638](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2638)). - Infrastructure: Update test cases to use case key paths (thanks [@​yimajo](https://togithub.com/yimajo), [https://github.com/pointfreeco/swift-composable-architecture/pull/2637](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2637)). - Infrastructure: Fix tutorial code diffs ([https://github.com/pointfreeco/swift-composable-architecture/pull/2642](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2642)). **Full Changelog**: pointfreeco/swift-composable-architecture@1.5.3...1.5.4 </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>
stephencelis
added a commit
that referenced
this pull request
Dec 12, 2023
This reverts commit b86012c.
stephencelis
added a commit
that referenced
this pull request
Dec 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A Slack conversation pointed to a potential leak of the
Store
when it was executing an effect. This PR allows cancellation to properly propagate during deinitialization, and ensures that async effects don't strongly capture the store.