-
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
Observable Architecture #2593
Merged
Merged
Observable Architecture #2593
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
0xcefaedfe
reviewed
Nov 27, 2023
Sources/ComposableArchitecture/Documentation.docc/Articles/MigratingTo1.6.md
Outdated
Show resolved
Hide resolved
While it would be nice for the `@PresentationState` property wrapper to "just work" with TCA's upcoming observable tools, sadly that does not seem to be the case. Adding observation directly to `@PresentationState`, as we have done with the beta so far, can break existing projects due to the additional observation. This primarily manifests itself in projects that present navigation stacks, where the `@PresentationState` observation can cause the navigation hierarchy to recompute and trigger SwiftUI bugs. The best we've come up with so far is introducing a brand new macro that automatically wraps a property with `@PresentationState` _and_ instruments it with observation. We're open to other ideas, and we do have future plans to eliminate the need for a property wrapper or macro at all, but till then this offers a non-breaking upgrade path!
This reverts commit f221ed0.
* Add `@Presents` macro for observable presentation While it would be nice for the `@PresentationState` property wrapper to "just work" with TCA's upcoming observable tools, sadly that does not seem to be the case. Adding observation directly to `@PresentationState`, as we have done with the beta so far, can break existing projects due to the additional observation. This primarily manifests itself in projects that present navigation stacks, where the `@PresentationState` observation can cause the navigation hierarchy to recompute and trigger SwiftUI bugs. The best we've come up with so far is introducing a brand new macro that automatically wraps a property with `@PresentationState` _and_ instruments it with observation. We're open to other ideas, and we do have future plans to eliminate the need for a property wrapper or macro at all, but till then this offers a non-breaking upgrade path! * wip
Co-authored-by: Kabir Oberai <[email protected]>
cgrindel-self-hosted-renovate bot
referenced
this pull request
in cgrindel/rules_swift_package_manager
Jan 29, 2024
…ure to from: "1.7.0" (#882) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [pointfreeco/swift-composable-architecture](https://togithub.com/pointfreeco/swift-composable-architecture) | minor | `from: "1.6.0"` -> `from: "1.7.0"` | --- ### Release Notes <details> <summary>pointfreeco/swift-composable-architecture (pointfreeco/swift-composable-architecture)</summary> ### [`v1.7.0`](https://togithub.com/pointfreeco/swift-composable-architecture/releases/tag/1.7.0) [Compare Source](https://togithub.com/pointfreeco/swift-composable-architecture/compare/1.6.0...1.7.0) #### What's Changed - Added: Observation support ([https://github.com/pointfreeco/swift-composable-architecture/pull/2593](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2593)), which both streamlines and soft-deprecates many concepts in the Composable Architecture. See the [1.7 migration guide](https://pointfreeco.github.io/swift-composable-architecture/main/documentation/composablearchitecture/migratingto1.7) for more information on how to apply these updates to your applications. - Infrastructure: Add CI for Swift 5.7.1 ([https://github.com/pointfreeco/swift-composable-architecture/pull/2701](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2701)). - Infrastructure: Add docs for testing `StackAction`'s case path subscript (thanks [@​lukeredpath](https://togithub.com/lukeredpath), [https://github.com/pointfreeco/swift-composable-architecture/pull/2704](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2704)). - Infrastructure: Fixed examples CI ([https://github.com/pointfreeco/swift-composable-architecture/pull/2715](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2715)). - Infrastructure: Fixed `TestStore.assert` docs ([https://github.com/pointfreeco/swift-composable-architecture/pull/2720](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2720)). - Infrastructure: Use `XCTExpectFailure` from `XCTestDynamicOverlay` ([https://github.com/pointfreeco/swift-composable-architecture/pull/2721](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2721)). - Infrastructure: Documentation typo fix (thanks [@​JonCox](https://togithub.com/JonCox), [https://github.com/pointfreeco/swift-composable-architecture/pull/2723](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2723)). - Infrastructure: Fixed concurrency docs (thanks [@​hmhv](https://togithub.com/hmhv), [https://github.com/pointfreeco/swift-composable-architecture/pull/2726](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2726)). - Infrastructure: Fixed composing features tutorial (thanks [@​bricklife](https://togithub.com/bricklife), [https://github.com/pointfreeco/swift-composable-architecture/pull/2698](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2698); thanks [@​Kyome22](https://togithub.com/Kyome22), [https://github.com/pointfreeco/swift-composable-architecture/pull/2727](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2727)). - Infrastructure: Fixed 1.7 migration guide (thanks [@​Ryu0118](https://togithub.com/Ryu0118), [https://github.com/pointfreeco/swift-composable-architecture/pull/2731](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2731)). #### New Contributors - [@​JonCox](https://togithub.com/JonCox) made their first contribution in [https://github.com/pointfreeco/swift-composable-architecture/pull/2723](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2723) - [@​Kyome22](https://togithub.com/Kyome22) made their first contribution in [https://github.com/pointfreeco/swift-composable-architecture/pull/2727](https://togithub.com/pointfreeco/swift-composable-architecture/pull/2727) **Full Changelog**: pointfreeco/swift-composable-architecture@1.6.0...1.7.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
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.
This PR introduces Observation tools to the Composable Architecture.
Discussion with more details: #2594