1.0 Preview #1905
Replies: 5 comments 26 replies
-
Super excited about this! Following up regarding a question I asked previously. I don't see any changes in Package.swift on the We're on Swift 5.7, but minimum deployment target is still just 14.4, so no structured concurrency support in Foundation/UIKit/etc. We're planning on bumping that to 15.(5/6?) soonish, but it would help our planning in this regard to know what the plans are here. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I just migrated my app RemafoX to the Mostly, the migration went smoothly, although I still have a couple of warnings to fix – thanks to great migration documentation! But maybe it's worth noting that I wasn't really happy with how the files were structured with the new Reducer protocol style in your videos and in sample code within the library. I used a slightly different (in my opinion "improved") approach in my app. Would love to hear your thoughts on the ideas that I shared in the article with code examples and my rationale. Quick summary of my style:
More details in the article. What do you think? Any comments, suggestions or thoughts? |
Beta Was this translation helpful? Give feedback.
-
Hello folks, quick question. How "production-ready" is By that I mean that As always, many thanks for the awesome work you guys are doing. |
Beta Was this translation helpful? Give feedback.
-
@stephencelis @mbrandonw The latest changes to the |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is the right place to ask this, but given the impending 1.0 merge (#2318), the observability changes (as teased here) probably won't be part of 1.0, right? |
Beta Was this translation helpful? Give feedback.
-
Hey everyone,
We are very excited to officially share a preview of what 1.0 will bring to the library. We want to be clear upfront that there are no episode or library spoilers in this post, and we are not yet announcing a beta for the navigation tools even though we have started that series. That beta will come in a few weeks.
The 1.0 of the library is something we outlined 4 months ago, and we are now officially starting the process. In a nutshell, 1.0 does not add any actual new features to the library but instead finally cleans up cruft that has accumulated over the years, such as removing most of the 1,100 lines of deprecations and finally renaming
ReducerProtocol
toReducer
.We want to reiterate: 1.0 of the Composable Architecture is not a grand rethinking of the library or a feature-rich release. It is merely a breaking change to get rid of tools that have been long deprecated (some of them have been deprecated for years) and to give other tools their proper names.
So then, what is the 1.0 “preview”? It is a branch that you can target today if you want to get a head start on preparing for 1.0.
prerelease/1.0
The branch we are releasing is
prerelease/1.0
. It is a mostly backwards-compatible version of the library that we will keep up-to-date with the latest release frommain
, but it makes a few important breaking changes:For reducers:
Reducer
now refers to the reducer protocol, not the struct that is generic over state, action and environment.ReducerProtocol = Reducer
has been added.So, this change is only a breaking change if you are still using the old
Reducer
type alias that refers to theAnyReducer
struct. If you are on theReducerProtocol
, which has been out for 4 months, then you should be good to go. Or, if you have updated your uses ofReducer
toAnyReducer
, you should only have deprecation warnings.For effects:
Effect
type now has one single generic forOutput
. TheFailure
generic has been removed.EffectTask = Effect
has been added.So, this change is only a breaking change if you still refer to the old
Effect
type alias. If you are using theEffectTask
type, which has been suggested for over 4 months, then you should be good to go.Even though there are some breaking changes, the fixes are usually quite simple. For example:
If you are still using the old
Reducer
struct type alias, you can simply rename it toAnyReducer
. E.g:If you are using the
Effect
type with two generics, you can simply rename them toEffectPublisher
. Or, better yet, if theEffect
type with two generics has a failure type ofNever
, you can simply rename it toEffectTask
and remove the failure generic entirely. E.g.:How should I target prerelease/1.0?
If your project has already prepared for the two breaking changes mentioned above, you may benefit from targeting the
prerelease/1.0
branch. That is:Reducer
type, and have either migrated all of your project’s reducers to take advantage of theReducerProtocol
, or you have at the very least renamed all instances ofReducer
toAnyReducer
.Effect
type, and have renamed all instances toEffectTask
orEffectPublisher
(ideally preferringEffectTask
when the failure type isNever
).By targeting
prerelease/1.0
you will get a hard-deprecated view of all APIs that have been soft-deprecated over the past months. If you have no deprecations, you are in good shape for 1.0. If you have deprecations, this means you can begin to incrementally chip away at them to prepare for 1.0’s release in the coming months.Future branches and releases
In the near future, as we get closer to the official 1.0 release, we may introduce additional branches that you can target to help you update your codebase to be 1.0 compliant. For example, we will have a branch to track all forthcoming “0.x” releases, which will include all of the new navigation tools, but will also be 100% backwards-compatible with the library today.
What about navigation?
The navigation tools that we have just begun covering are coming soon, but not right now. We will be opening a public beta in the coming weeks just as we did with async/await effects and the
Reducer
protocol. This will give you a chance to play around with the tools before their final release and provide feedback.Our plan is for the navigation beta to work both with
main
, which means it will be 100% backwards compatible with your project today, and also work withprerelease/1.0
. There will be more information on that soon!Try it today and give feedback!
Please give the
prerelease/1.0
branch a spin and let us know what your feedback is. Consider the branch a “beta”: it may have mistakes, deprecations may behave in strange ways, etc. If you encounter any issues, let us know!We are excited to finally bring the Composable Architecture to 1.0, though, and we have more big announcements coming soon.
Beta Was this translation helpful? Give feedback.
All reactions