Skip to content

Commit 418e321

Browse files
authored
Clean up deprecation formatting (#1207)
* Clean up deprecation formatting Didn't realize multiline worked here, but should make it easier to read without word wrap * Update Sources/ComposableArchitecture/Internal/Deprecations.swift * Update Sources/ComposableArchitecture/Internal/Deprecations.swift
1 parent f818421 commit 418e321

File tree

1 file changed

+36
-8
lines changed

1 file changed

+36
-8
lines changed

Sources/ComposableArchitecture/Internal/Deprecations.swift

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ extension Effect {
6363
*,
6464
deprecated,
6565
message:
66-
"Using a variadic list is no longer supported. Use an array of identifiers instead. For more on this change, see: https://github.com/pointfreeco/swift-composable-architecture/pull/1041"
66+
"""
67+
Using a variadic list is no longer supported. Use an array of identifiers instead. For more \
68+
on this change, see: https://github.com/pointfreeco/swift-composable-architecture/pull/1041
69+
"""
6770
)
6871
@_disfavoredOverload
6972
public static func cancel(ids: AnyHashable...) -> Self {
@@ -356,7 +359,10 @@ extension Store {
356359
@available(
357360
*, deprecated,
358361
message:
359-
"If you use this method, please open a discussion on GitHub and let us know how: https://github.com/pointfreeco/swift-composable-architecture/discussions/new"
362+
"""
363+
If you use this method, please open a discussion on GitHub and let us know how: \
364+
https://github.com/pointfreeco/swift-composable-architecture/discussions/new
365+
"""
360366
)
361367
public func publisherScope<P: Publisher, LocalState, LocalAction>(
362368
state toLocalState: @escaping (AnyPublisher<State, Never>) -> P,
@@ -396,7 +402,10 @@ extension Store {
396402
@available(
397403
*, deprecated,
398404
message:
399-
"If you use this method, please open a discussion on GitHub and let us know how: https://github.com/pointfreeco/swift-composable-architecture/discussions/new"
405+
"""
406+
If you use this method, please open a discussion on GitHub and let us know how: \
407+
https://github.com/pointfreeco/swift-composable-architecture/discussions/new
408+
"""
400409
)
401410
public func publisherScope<P: Publisher, LocalState>(
402411
state toLocalState: @escaping (AnyPublisher<State, Never>) -> P
@@ -410,7 +419,12 @@ extension ViewStore where Action: BindableAction, Action.State == State {
410419
@available(
411420
*, deprecated,
412421
message:
413-
"Dynamic member lookup is no longer supported for bindable state. Instead of dot-chaining on the view store, e.g. 'viewStore.$value', invoke the 'binding' method on view store with a key path to the value, e.g. 'viewStore.binding(\\.$value)'. For more on this change, see: https://github.com/pointfreeco/swift-composable-architecture/pull/810"
422+
"""
423+
Dynamic member lookup is no longer supported for bindable state. Instead of dot-chaining on \
424+
the view store, e.g. 'viewStore.$value', invoke the 'binding' method on view store with a \
425+
key path to the value, e.g. 'viewStore.binding(\\.$value)'. For more on this change, see: \
426+
https://github.com/pointfreeco/swift-composable-architecture/pull/810
427+
"""
414428
)
415429
public subscript<Value: Equatable>(
416430
dynamicMember keyPath: WritableKeyPath<State, BindableState<Value>>
@@ -428,7 +442,10 @@ extension BindingAction {
428442
@available(
429443
*, deprecated,
430444
message:
431-
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', and accessed via key paths to that 'BindableState', like '\\.$value'"
445+
"""
446+
For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', \
447+
and accessed via key paths to that 'BindableState', like '\\.$value'
448+
"""
432449
)
433450
public static func set<Value: Equatable>(
434451
_ keyPath: WritableKeyPath<Root, Value>,
@@ -445,7 +462,10 @@ extension BindingAction {
445462
@available(
446463
*, deprecated,
447464
message:
448-
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', and accessed via key paths to that 'BindableState', like '\\.$value'"
465+
"""
466+
For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', \
467+
and accessed via key paths to that 'BindableState', like '\\.$value'
468+
"""
449469
)
450470
public static func ~= <Value>(
451471
keyPath: WritableKeyPath<Root, Value>,
@@ -459,7 +479,10 @@ extension Reducer {
459479
@available(
460480
*, deprecated,
461481
message:
462-
"'Reducer.binding()' no longer takes an explicit extract function and instead the reducer's 'Action' type must conform to 'BindableAction'"
482+
"""
483+
'Reducer.binding()' no longer takes an explicit extract function and instead the reducer's \
484+
'Action' type must conform to 'BindableAction'
485+
"""
463486
)
464487
public func binding(action toBindingAction: @escaping (Action) -> BindingAction<State>?) -> Self {
465488
Self { state, action, environment in
@@ -473,7 +496,12 @@ extension ViewStore {
473496
@available(
474497
*, deprecated,
475498
message:
476-
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState'. Bindings are now derived via 'ViewStore.binding' with a key path to that 'BindableState' (for example, 'viewStore.binding(\\.$value)'). For dynamic member lookup to be available, the view store's 'Action' type must also conform to 'BindableAction'."
499+
"""
500+
For improved safety, bindable properties must now be wrapped explicitly in 'BindableState'. \
501+
Bindings are now derived via 'ViewStore.binding' with a key path to that 'BindableState' \
502+
(for example, 'viewStore.binding(\\.$value)'). For dynamic member lookup to be available, \
503+
the view store's 'Action' type must also conform to 'BindableAction'.
504+
"""
477505
)
478506
public func binding<LocalState: Equatable>(
479507
keyPath: WritableKeyPath<State, LocalState>,

0 commit comments

Comments
 (0)