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

[FIX] Updated Swift compiler version to 5.7.1 to follow Apple's policy #2549

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.7
// swift-tools-version:5.7.1

import PackageDescription

Expand Down
6 changes: 2 additions & 4 deletions Sources/ComposableArchitecture/Internal/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ public typealias EffectTask = Effect
@available(*, unavailable, renamed: "Reducer")
public typealias ReducerProtocol = Reducer

#if swift(>=5.7.1)
@available(*, unavailable, renamed: "ReducerOf")
public typealias ReducerProtocolOf<R: Reducer> = Reducer<R.State, R.Action>
#endif
@available(*, unavailable, renamed: "ReducerOf")
public typealias ReducerProtocolOf<R: Reducer> = Reducer<R.State, R.Action>
40 changes: 18 additions & 22 deletions Sources/ComposableArchitecture/Reducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,25 +247,21 @@ extension Reducer where Body: Reducer, Body.State == State, Body.Action == Actio
}
}

// NB: This is available starting from Swift 5.7.1 due to the following bug:
// https://github.com/apple/swift/issues/60550
#if swift(>=5.7.1)
/// A convenience for constraining a ``Reducer`` conformance.
///
/// This allows you to specify the `body` of a ``Reducer`` conformance like so:
///
/// ```swift
/// var body: some ReducerOf<Self> {
/// // ...
/// }
/// ```
///
/// …instead of the more verbose:
///
/// ```swift
/// var body: some Reducer<State, Action> {
/// // ...
/// }
/// ```
public typealias ReducerOf<R: Reducer> = Reducer<R.State, R.Action>
#endif
/// A convenience for constraining a ``Reducer`` conformance.
///
/// This allows you to specify the `body` of a ``Reducer`` conformance like so:
///
/// ```swift
/// var body: some ReducerOf<Self> {
/// // ...
/// }
/// ```
///
/// …instead of the more verbose:
///
/// ```swift
/// var body: some Reducer<State, Action> {
/// // ...
/// }
/// ```
public typealias ReducerOf<R: Reducer> = Reducer<R.State, R.Action>