Skip to content
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

The Composable Architecture 1.0 #2318

Merged
merged 564 commits into from
Jul 30, 2023
Merged

The Composable Architecture 1.0 #2318

merged 564 commits into from
Jul 30, 2023

Conversation

stephencelis
Copy link
Member

1.0 is almost here!

This PR stages a final bit of work off the prerelease/1.0 branch that we introduced as a preview almost 6 months ago.

This work takes things one step further by fully removing the deprecated APIs that have remained in the library for a long time for backwards compatibility. We're taking 1.0 as an opportunity to shed this surface area, which should hopefully result in a leaner binary with better compilation times (especially since many of the deprecated APIs are overloads that could slow down the compiler).

If you've been targeting prerelease/1.0, try pointing things to release/1.0 to make sure you're in good shape for the final release!

@freak4pc
Copy link
Contributor

freak4pc commented Jul 24, 2023

Exciting times!! So awesome seeing this long-awaited 1.0 🤩

On my small-medium project the only changes I had to do was this:

Store(
    initialState: Tasks.State(),
-   reducer: Tasks()
+   reducer: { Tasks() }
)

Gotta say I'm not entirely sure why, I was sure it should work without the closure 🤔

@stephencelis
Copy link
Member Author

@freak4pc The non-builder initializer was soft-deprecated awhile ago, but we just added hard deprecations recently. It should also read nicely as a trailing closure:

Store(initialState: Tasks.State()) {
  Tasks()
}

@akashsoni01
Copy link
Contributor

Congrats on the huge milestone.

Just a general question are we still depending on Apple's combine framework in 1.0 ?

@Iikeli
Copy link
Contributor

Iikeli commented Jul 26, 2023

Congrats on the milestone! Looking forward to updating to 1.0 when it is fully available!

@mbrandonw
Copy link
Member

Just a general question are we still depending on Apple's combine framework in 1.0 ?

Hi @akashsoni01, yes the library still depends on Combine because it is still largely a SwiftUI framework and Combine is necessary for SwiftUI. We do have plans for future work to disentangle the library from Combine, but that won't be done for 1.0.

@akashsoni01
Copy link
Contributor

Just a general question are we still depending on Apple's combine framework in 1.0 ?

Hi @akashsoni01, yes the library still depends on Combine because it is still largely a SwiftUI framework and Combine is necessary for SwiftUI. We do have plans for future work to disentangle the library from Combine, but that won't be done for 1.0.

ok NP, Thanks

Base automatically changed from prerelease/1.0 to main July 28, 2023 00:35
@stephencelis stephencelis marked this pull request as ready for review July 28, 2023 00:55
@stephencelis stephencelis merged commit 195284b into main Jul 30, 2023
5 checks passed
@stephencelis stephencelis deleted the release/1.0 branch July 30, 2023 21:58
@stephencelis stephencelis restored the release/1.0 branch July 30, 2023 21:58
cgrindel-self-hosted-renovate bot added a commit to cgrindel/rules_swift_package_manager that referenced this pull request Aug 24, 2023
…ure to v1 (#530)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[pointfreeco/swift-composable-architecture](https://togithub.com/pointfreeco/swift-composable-architecture)
| major | `from: "0.58.2"` -> `from: "1.2.0"` |

---

### Release Notes

<details>
<summary>pointfreeco/swift-composable-architecture
(pointfreeco/swift-composable-architecture)</summary>

###
[`v1.2.0`](https://togithub.com/pointfreeco/swift-composable-architecture/releases/tag/1.2.0)

[Compare
Source](https://togithub.com/pointfreeco/swift-composable-architecture/compare/1.1.0...1.2.0)

#### What's Changed

- Added: Legacy alert and action sheet presentation APIs for iOS 13
support
([pointfreeco/swift-composable-architecture#2379).
The `alert(store:)` and `confirmationDialog(store:)` view modifiers are
iOS 15+, but we now have `legacyAlert(store:)` and `actionSheet(store:)`
for iOS 13+.
- Added: `TestStore.bindings` for testing bindable view state
([pointfreeco/swift-composable-architecture#2394).
- Fixed: Addressed a potential threading issue in `Store.send`
([pointfreeco/swift-composable-architecture#2382).
- Fixed: Worked around a Catalina runtime crash due to unavailable macOS
symbols (thanks [@&#8203;jaredh159](https://togithub.com/jaredh159),
[pointfreeco/swift-composable-architecture#2385).
- Infrastructure: Docs fixes (thanks
[@&#8203;nickkohrn](https://togithub.com/nickkohrn),
[pointfreeco/swift-composable-architecture#2383;
[@&#8203;jaesung-0o0](https://togithub.com/jaesung-0o0),
[pointfreeco/swift-composable-architecture#2389).
- Infrastructure: Added README section for companion libraries
([pointfreeco/swift-composable-architecture#2395).
- Infrastructure: Fixed stack case study
([pointfreeco/swift-composable-architecture#2397)

#### New Contributors

- [@&#8203;jaredh159](https://togithub.com/jaredh159) made their first
contribution in
[pointfreeco/swift-composable-architecture#2385

**Full Changelog**:
pointfreeco/swift-composable-architecture@1.1.0...1.2.0

###
[`v1.1.0`](https://togithub.com/pointfreeco/swift-composable-architecture/releases/tag/1.1.0)

[Compare
Source](https://togithub.com/pointfreeco/swift-composable-architecture/compare/1.0.0...1.1.0)

#### What's Changed

- Added: An overload of `Reducer.onChange(of:)` that takes a
configurable `removeDuplicates` closure for the equality check (thanks
[@&#8203;ohitsdaniel](https://togithub.com/ohitsdaniel),
[pointfreeco/swift-composable-architecture#2338).
- Added: `Effect.debounce` and `Effect.throttle`, for debouncing and
throttling effects on a scheduler
([pointfreeco/swift-composable-architecture#2372,
[pointfreeco/swift-composable-architecture#2368).
This functionality existed in past releases but was removed from 1.0
alongside other deprecated Combine code. Because there is no modern
replacement for `Effect.throttle` we have brought this functionality
back to 1.1.
- Fixed: XCTest failures emitted when test stores initialize state
(*e.g.* if `Reducer.State.init` accesses a dependency that hasn't been
overridden) are now shown in the test that creates the store rather than
hidden in application code
([pointfreeco/swift-composable-architecture#2352).
- Fixed: Suppressed a warning that previously emitted when instantiating
a test store state with `.init()` instead of `Feature.State()`
([pointfreeco/swift-composable-architecture#2347).
- Fixed: Child features presented by *grandparent* features are now
properly dismissed when the child calls `@Dependency(\.dismiss)`
([pointfreeco/swift-composable-architecture#2373).
- Infrastructure: Documentation updates and fixes
([pointfreeco/swift-composable-architecture#2336;
thanks [@&#8203;jayrhynas](https://togithub.com/jayrhynas),
[pointfreeco/swift-composable-architecture#2342;
thanks [@&#8203;Atimca](https://togithub.com/Atimca),
[pointfreeco/swift-composable-architecture#2350;
[pointfreeco/swift-composable-architecture#2353;
thanks [@&#8203;hmhv](https://togithub.com/hmhv),
[pointfreeco/swift-composable-architecture#2355;
thanks [@&#8203;Ryu0118](https://togithub.com/Ryu0118),
[pointfreeco/swift-composable-architecture#2358,
[pointfreeco/swift-composable-architecture#2367;
thanks [@&#8203;yimajo](https://togithub.com/yimajo),
[pointfreeco/swift-composable-architecture#2357;
thanks [@&#8203;ValseLee](https://togithub.com/ValseLee),
[pointfreeco/swift-composable-architecture#2369,
[pointfreeco/swift-composable-architecture#2370).

#### New Contributors

- [@&#8203;jayrhynas](https://togithub.com/jayrhynas) made their first
contribution in
[pointfreeco/swift-composable-architecture#2342
- [@&#8203;Atimca](https://togithub.com/Atimca) made their first
contribution in
[pointfreeco/swift-composable-architecture#2350
- [@&#8203;ValseLee](https://togithub.com/ValseLee) made their first
contribution in
[pointfreeco/swift-composable-architecture#2369

**Full Changelog**:
pointfreeco/swift-composable-architecture@1.0.0...1.1.0

###
[`v1.0.0`](https://togithub.com/pointfreeco/swift-composable-architecture/releases/tag/1.0.0)

[Compare
Source](https://togithub.com/pointfreeco/swift-composable-architecture/compare/0.59.0...1.0.0)

#### What's Changed

- The Composable Architecture 1.0
([pointfreeco/swift-composable-architecture#2318).
Fully removes all deprecated APIs from the 0.x series.

**Full Changelog**:
pointfreeco/swift-composable-architecture@0.58.0...1.0.0

###
[`v0.59.0`](https://togithub.com/pointfreeco/swift-composable-architecture/releases/tag/0.59.0)

[Compare
Source](https://togithub.com/pointfreeco/swift-composable-architecture/compare/0.58.2...0.59.0)

#### What's Changed

- Added: back-ported legacy alert and action sheet APIs for those using
iOS 13 alerts and action sheets in their apps
([pointfreeco/swift-composable-architecture#2379).
- Fixed: Addressed a potential threading issue in `Store.send`
([pointfreeco/swift-composable-architecture#2382).
- Fixed: Un-deprecated `debounce` and `throttle` overloads restored in
1.1.0 (thanks [@&#8203;pyrtsa](https://togithub.com/pyrtsa),
[pointfreeco/swift-composable-architecture#2392).

**Full Changelog**:
pointfreeco/swift-composable-architecture@0.58.2...0.59.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:eyJjcmVhdGVkSW5WZXIiOiIzNi41Mi4xIiwidXBkYXRlZEluVmVyIjoiMzYuNTIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
@mbrandonw mbrandonw deleted the release/1.0 branch October 17, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet