Skip to content

Commit 67eb94f

Browse files
authored
0.x mainline: Hard deprecate more soft-deprecated APIs (#2376)
A few of the deprecated APIs removed in 1.0 were only soft-deprecated, which could make migrating a little more difficult. Let's ensure these APIs are deprecated on a 0.59.0 release to make upgrading a little less annoying.
1 parent 43495f6 commit 67eb94f

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

Sources/ComposableArchitecture/SwiftUI/Binding.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,7 @@ extension ViewStore where ViewAction: BindableAction, ViewAction.State == ViewSt
318318
)
319319
}
320320

321-
@available(iOS, deprecated: 9999, message: "Use 'viewStore.$value' instead.")
322-
@available(macOS, deprecated: 9999, message: "Use 'viewStore.$value' instead.")
323-
@available(tvOS, deprecated: 9999, message: "Use 'viewStore.$value' instead.")
324-
@available(watchOS, deprecated: 9999, message: "Use 'viewStore.$value' instead.")
321+
@available(*, deprecated, message: "Use 'viewStore.$value' instead.")
325322
public func binding<Value: Equatable>(
326323
_ keyPath: WritableKeyPath<ViewState, BindingState<Value>>,
327324
fileID: StaticString = #fileID,

Sources/ComposableArchitecture/SwiftUI/SwitchStore.swift

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,23 +1191,8 @@ extension SwitchStore {
11911191
}
11921192

11931193
@available(
1194-
iOS,
1195-
deprecated: 9999,
1196-
message: "Use the 'SwitchStore.init' that can 'switch' over a given 'state' instead."
1197-
)
1198-
@available(
1199-
macOS,
1200-
deprecated: 9999,
1201-
message: "Use the 'SwitchStore.init' that can 'switch' over a given 'state' instead."
1202-
)
1203-
@available(
1204-
tvOS,
1205-
deprecated: 9999,
1206-
message: "Use the 'SwitchStore.init' that can 'switch' over a given 'state' instead."
1207-
)
1208-
@available(
1209-
watchOS,
1210-
deprecated: 9999,
1194+
*,
1195+
deprecated,
12111196
message: "Use the 'SwitchStore.init' that can 'switch' over a given 'state' instead."
12121197
)
12131198
public struct _ExhaustivityCheckView<State, Action>: View {

0 commit comments

Comments
 (0)