Skip to content

Commit 2918fcf

Browse files
authored
Hard-deprecate @Reducer(state: .equatable) (#3794)
These have been soft-deprecated for a long time in favor of folks using explicit extensions, but people seem to still be reaching for these APIs. Let's finally hard-deprecate them.
1 parent 149fdf9 commit 2918fcf

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Sources/ComposableArchitecture/Macros.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ public macro Reducer() =
3939
@attached(memberAttribute)
4040
@attached(extension, conformances: Reducer, CaseReducer)
4141
#if compiler(>=6)
42-
@available(iOS, deprecated: 9999, message: "Define your conformance via extension, instead.")@available(
43-
macOS, deprecated: 9999, message: "Define your conformance via extension, instead."
44-
)@available(tvOS, deprecated: 9999, message: "Define your conformance via extension, instead.")@available(
45-
watchOS, deprecated: 9999, message: "Define your conformance via extension, instead."
46-
)
42+
@available(*, deprecated, message: "Define your conformance using an extension, instead")
4743
#endif
4844
public macro Reducer(state: _SynthesizedConformance..., action: _SynthesizedConformance...) =
4945
#externalMacro(
@@ -56,11 +52,7 @@ public macro Reducer(state: _SynthesizedConformance..., action: _SynthesizedConf
5652
/// See <doc:Reducers#Synthesizing-protocol-conformances-on-State-and-Action> for more information.
5753
@_documentation(visibility: public)
5854
#if compiler(>=6)
59-
@available(iOS, deprecated: 9999, message: "Define your conformance via extension, instead.")@available(
60-
macOS, deprecated: 9999, message: "Define your conformance via extension, instead."
61-
)@available(tvOS, deprecated: 9999, message: "Define your conformance via extension, instead.")@available(
62-
watchOS, deprecated: 9999, message: "Define your conformance via extension, instead."
63-
)
55+
@available(*, deprecated, message: "Define your conformance using an extension, instead")
6456
#endif
6557
public struct _SynthesizedConformance: Sendable {}
6658

0 commit comments

Comments
 (0)