From 17c0cba2ef93f9322707f2c84e6b5680cd05baf0 Mon Sep 17 00:00:00 2001 From: Jaesung Date: Wed, 8 Nov 2023 03:35:06 +0900 Subject: [PATCH] [FIX] Modified Swift compiler version to 5.7.1 to follow Apple's policy (#2549) --- Package.swift | 2 +- .../Internal/Deprecations.swift | 6 +-- Sources/ComposableArchitecture/Reducer.swift | 40 +++++++++---------- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/Package.swift b/Package.swift index 08b6d1ac55cc..6bc2a52712e8 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:5.7.1 import PackageDescription diff --git a/Sources/ComposableArchitecture/Internal/Deprecations.swift b/Sources/ComposableArchitecture/Internal/Deprecations.swift index 0224b24958f9..0c252da7a482 100644 --- a/Sources/ComposableArchitecture/Internal/Deprecations.swift +++ b/Sources/ComposableArchitecture/Internal/Deprecations.swift @@ -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 = Reducer -#endif +@available(*, unavailable, renamed: "ReducerOf") +public typealias ReducerProtocolOf = Reducer diff --git a/Sources/ComposableArchitecture/Reducer.swift b/Sources/ComposableArchitecture/Reducer.swift index 63aeffa57e83..59423c5e461e 100644 --- a/Sources/ComposableArchitecture/Reducer.swift +++ b/Sources/ComposableArchitecture/Reducer.swift @@ -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 { - /// // ... - /// } - /// ``` - /// - /// …instead of the more verbose: - /// - /// ```swift - /// var body: some Reducer { - /// // ... - /// } - /// ``` - public typealias ReducerOf = Reducer -#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 { +/// // ... +/// } +/// ``` +/// +/// …instead of the more verbose: +/// +/// ```swift +/// var body: some Reducer { +/// // ... +/// } +/// ``` +public typealias ReducerOf = Reducer