Releases: pointfreeco/swift-composable-architecture
0.44.1
What's Changed
- Fixed: Bumped swift-clocks to 0.1.4 to address platform compatibility issues (#1561).
- Fixed:
Reducer
availability was not correctly deprecated in the previous release. This is now fixed (thanks @konomae, #1550). - Infrastructure: Update GitHub bug report template to ask if bug is reproducible in vanilla SwiftUI (#1555; thanks @gohanlon for finesse #1562).
Full Changelog: 0.44.0...0.44.1
0.44.0
What's Changed
-
Added: Support for Swift 5.7's
Clock
protocol as a dependency via swift-clocks (#1547). -
Fixed: First access of a dependency vended from
DependencyKey
is now cached (thanks @tgrapperon, #1510). This means that a dependency vended from a computed property, when stateful, is now maintained over time.If you are using the
Dependencies
module outside of the Composable Architecture, make sure your tests fully resetDependencyValues
when you first control them. For example:func testMyFeature() async throws { try await DependencyValues.withValues { values in values = DependencyValues() // reset "values" values.context = .test // default "values" for testing // further mutate "values" for this test } operation: { // make assertions } }
-
Infrastructure: Improve the layout of
Web Socket
case study (thanks @Jager-yoo, #1529); updatedXCTUnimplemented
calls tounimplemented
(#1530); removed unnecessary conformance to Sendable Protocol (thanks @inwoodev; #1535); add a few missing tests (#1539); remove redundant error type in ReusableFavoritingTests.swift (thanks @Jager-yoo, #1538)
New Contributors
Full Changelog: 0.43.0...0.44.0
0.43.0
What's Changed
- Requirement Change: Swift 5.6 is now required as of the release of the
ReducerProtocol
(#1491); we'd love to support Swift 5.5 still, but need help from the community: #1494. - Deprecation/Rename: The
Reducer
type alias is now hard-deprecated to be renamed toAnyReducer
to help call out reducers that should be migrated (#1478). TheReducerProtocol
will be renamed toReducer
in the future and this hard deprecation makes room for it. - Deprecation/Rename: The
Effect
type has been renamed to a soft-deprecatedEffectPublisher
type, both generic overAction
andFailure
, while a temporaryEffectTask
type alias has been introduced as a replacement that is only generic overAction
(#1471). This rename is in preparation for breaking changes in a forthcoming 1.0 release, where theEffectTask
will becomeEffect
, and will only be generic overAction
. - Change: Some interfaces that previously required escaping closures no longer require them (#1493; thanks @tgrapperon , #1513).
- Bug fix:
ReducerProtocol.transformDependency
is now properly fused with upstream calls toReducerProtocol.dependency
andReducerProtocol.transformDependency
(#1495). - Bug fix:
ViewStore.yield(while:)
is now performed on the main actor (#1517). - Infrastructure: Documentation fixes (thanks @luoxiu, #1470; @qmoya, #1473; @Jager-yoo, #1475, #1490; @gohanlon, #1482; @GREENOVER, #1483; @yimajo, #1484, #1485; @roeybiran, #1479; @tgrapperon, #1509; @ts, #1504; @sillygoose, #1507; #1523); demo fixes (thanks @tgrapperon, #1492; @Jager-yoo, #1503); new benchmark for view stores (#1518).
New Contributors
- @luoxiu made their first contribution in #1470
- @qmoya made their first contribution in #1473
- @gohanlon made their first contribution in #1482
- @GREENOVER made their first contribution in #1483
- @roeybiran made their first contribution in #1479
- @ts made their first contribution in #1504
- @sillygoose made their first contribution in #1507
Full Changelog: 0.42.0...0.43.0
0.42.0
- Added:
ViewStore.init(_:observe:)
has been added, to make observable view state explicit and help avoid accidentally observing too much state, which can commonly lead to performance issues (#1448). - Added: The
Dependencies
library can now be built on Linux (#1466). - Fixed: Chaining onto a generic reducer in a builder context with
ifLet
,ifCaseLet
, orforEach
should no longer lead to incorrect deprecation warnings in Swift 5.7 (#1467). - Fixed:
ReducerProtocol._printChanges(_:)
is now compatible with passing static members (like.customDump
and.actionLabels
) directly (#1469). - Infrastructure: Online documentation is now generated using swift-docc-plugin (#1463).
- Infrastructure: Documentation fixes (thanks @Berhtulf, via #1468).
New Contributors
Full Changelog: 0.41.2...0.41.3
0.41.2
- Fixed: Xcode's SPM integration does not allow for unsafe build flags to be configured, even when empty, for version-based releases. We've removed the empty build flag settings to fix this.
0.41.0
What's Changed
- Update example to set badge to the unread count by @hyperspacemark in #1391
- Fix the CaseStudies (UIKit) by @Czajnikowski in #1392
- Fix warnings introduced in Xcode 14.1 by @stephencelis in #1388
- Clean up the recursive case study. by @mbrandonw in #1403
- Todos demo: fix sorting filtered todos by @stephencelis in #1404
- Fix task cancellation leak by @mbrandonw in #1418
- Check in
Package.resolved
by @stephencelis in #1427 - Fix Performance.md brackets by @ddanilyuk in #1446
- ReducerProtocol by @mbrandonw in #1283
New Contributors
- @hyperspacemark made their first contribution in #1391
- @Czajnikowski made their first contribution in #1392
- @ddanilyuk made their first contribution in #1446
Full Changelog: 0.40.2...0.41.0
0.40.2
What's Changed
- Fixed: Re-entrant actions from store publisher subscriptions no longer run with the previous state (thanks @diederich, #1360).
- Fixed: The test store is now slightly more forgiving when it comes to Swift's async runtime. If you are having issues with async effects and the test store, let us know and we'll do our best to accommodate!
- Fixed: The SPM package no longer publicly vends its internal schemes.
0.40.1
- Fixed: Removed the
@StateObject
shim added in 0.40.0 to avoid a release build regression in some applications. We'll investigate on bringing it back in the future!
0.40.0
This release brings many performance improvements to the library. See our blog post for information about those changes.
- Added:
WithViewStore(_:observe:…)
, a new initializer that makes state observation explicit. We hope these initializers will help users avoid performance pitfalls and identify areas of their application where performance can be improved. The existing initializers have been soft-deprecated and will surface warnings in a future release. - Performance:
Effect
performance has been improved, especially with regard to merging effects (a common operation that occurs when reducers are combined), and async effects (which previously often incurred overhead from Combine). - Performance:
Store.scope
performance has been improved for nested scopes, which no longer incur a penalty for each layer of scoping (thanks @iampatbrown). - Performance:
WithViewStore
now uses a state object under the hood, which should tie the lifecycle of a view store to a view (thanks @tgrapperon). - Performance:
ForEachStore
performance has been improved for state updates in which element state has changed but no elements were added, removed, or moved (thanks @tgrapperon). - Fix:
Effect.run
'sSend
closure is now explicitly@MainActor
. - Fix: Long-living effects no longer accumulate
Task
values in memory for each action sent back into the store, saving memory over time. - Fix: macOS 11 compilation with the Xcode 14 release candidate.
- Fix: Actions that re-enter the store at the end of processing are now processed immediately.
- Infrastructure: README fixes (thanks @Jager-yoo).
- Infrastructure: Added benchmarks for effects, store scoping.
- Infrastructure: Fixed Todos demo's incrementing UUID helper (thanks @pitt500).
- Infrastructure: Fixed Voice Memos AV settings (thanks @entaku0818).
0.39.1
-
Fixed: Pinned Combine Schedulers to 0.7.3, which removes an errant
@_exported import Foundation
.Note: This update addresses a breaking change introduced to Combine Schedulers (see the release notes for more). As a consequence, you may need to add explicit
import Foundation
s to your code base after updating to this version. -
Changed: Updated
Global
/Local
generics to more relativeParent
/Child
, or more domain-specific names. -
Infrastructure: Added Spanish language translation of the README (thanks @pitt500).
-
Infrastructure: README and documentation improvements (thanks @ole, @SevioCorrea, @kalupas226)
-
Infrastructure: Demo cleanup.
-
Infrastructure: Made test classes
final
(thanks @Jager-yoo).