Skip to content

Releases: pointfreeco/swift-composable-architecture

0.44.1

24 Oct 23:58
ed3a380
Compare
Choose a tag to compare

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

24 Oct 05:57
Compare
Choose a tag to compare

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 reset DependencyValues 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); updated XCTUnimplemented calls to unimplemented (#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

18 Oct 04:00
5bd450a
Compare
Choose a tag to compare

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 to AnyReducer to help call out reducers that should be migrated (#1478). The ReducerProtocol will be renamed to Reducer in the future and this hard deprecation makes room for it.
  • Deprecation/Rename: The Effect type has been renamed to a soft-deprecated EffectPublisher type, both generic over Action and Failure, while a temporary EffectTask type alias has been introduced as a replacement that is only generic over Action (#1471). This rename is in preparation for breaking changes in a forthcoming 1.0 release, where the EffectTask will become Effect, and will only be generic over Action.
  • 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 to ReducerProtocol.dependency and ReducerProtocol.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

Full Changelog: 0.42.0...0.43.0

0.42.0

12 Oct 00:08
Compare
Choose a tag to compare
  • 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, or forEach 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

10 Oct 16:09
4228ff4
Compare
Choose a tag to compare
  • 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

10 Oct 15:42
b8294b8
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.40.2...0.41.0

0.40.2

13 Sep 04:42
9ea8c76
Compare
Choose a tag to compare

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

08 Sep 23:21
cbe013b
Compare
Choose a tag to compare
  • 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

08 Sep 15:50
5b78fbc
Compare
Choose a tag to compare

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's Send 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

25 Aug 16:05
a518935
Compare
Choose a tag to compare
  • 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 Foundations to your code base after updating to this version.

  • Changed: Updated Global/Local generics to more relative Parent/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).