You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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
"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"
72
+
"""
73
+
Using a variadic list is no longer supported. Use an array of identifiers instead. For more \
74
+
on this change, see: https://github.com/pointfreeco/swift-composable-architecture/pull/1041
"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"
375
+
"""
376
+
If you use this method, please open a discussion on GitHub and let us know how: \
state toLocalState:@escaping(Effect<State,Never>)->Effect<LocalState,Never>,
@@ -412,7 +418,10 @@ extension Store {
412
418
@available(
413
419
*, deprecated,
414
420
message:
415
-
"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"
421
+
"""
422
+
If you use this method, please open a discussion on GitHub and let us know how: \
"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"
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', and accessed via key paths to that 'BindableState', like '\\.$value'"
457
+
extensionBindingAction{
458
+
@available(
459
+
*, deprecated,
460
+
message:
461
+
"""
462
+
For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', \
463
+
and accessed via key paths to that 'BindableState', like '\\.$value'
464
+
"""
465
+
)
466
+
publicstaticfunc set<Value:Equatable>(
467
+
_ keyPath:WritableKeyPath<Root,Value>,
468
+
_ value:Value
469
+
)->Self{
470
+
.init(
471
+
keyPath: keyPath,
472
+
set:{$0[keyPath: keyPath]= value },
473
+
value: value,
474
+
valueIsEqualTo:{ $0 as?Value== value }
448
475
)
449
-
publicstaticfunc set<Value:Equatable>(
450
-
_ keyPath:WritableKeyPath<Root,Value>,
451
-
_ value:Value
452
-
)->Self{
453
-
.init(
454
-
keyPath: keyPath,
455
-
set:{$0[keyPath: keyPath]= value },
456
-
value: value,
457
-
valueIsEqualTo:{ $0 as?Value== value }
458
-
)
459
-
}
476
+
}
460
477
461
-
@available(
462
-
*, deprecated,
463
-
message:
464
-
"For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', and accessed via key paths to that 'BindableState', like '\\.$value'"
465
-
)
466
-
publicstaticfunc~=<Value>(
467
-
keyPath:WritableKeyPath<Root,Value>,
468
-
bindingAction:Self
469
-
)->Bool{
470
-
keyPath == bindingAction.keyPath
471
-
}
478
+
@available(
479
+
*, deprecated,
480
+
message:
481
+
"""
482
+
For improved safety, bindable properties must now be wrapped explicitly in 'BindableState', \
483
+
and accessed via key paths to that 'BindableState', like '\\.$value'
484
+
"""
485
+
)
486
+
publicstaticfunc~=<Value>(
487
+
keyPath:WritableKeyPath<Root,Value>,
488
+
bindingAction:Self
489
+
)->Bool{
490
+
keyPath == bindingAction.keyPath
472
491
}
492
+
}
473
493
474
-
extensionReducer{
475
-
@available(
476
-
*, deprecated,
477
-
message:
478
-
"'Reducer.binding()' no longer takes an explicit extract function and instead the reducer's 'Action' type must conform to 'BindableAction'"
479
-
)
494
+
extensionReducer{
495
+
@available(
496
+
*, deprecated,
497
+
message:
498
+
"""
499
+
'Reducer.binding()' no longer takes an explicit extract function and instead the reducer's \
"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'."
514
+
extensionViewStore{
515
+
@available(
516
+
*, deprecated,
517
+
message:
518
+
"""
519
+
For improved safety, bindable properties must now be wrapped explicitly in 'BindableState'. \
520
+
Bindings are now derived via 'ViewStore.binding' with a key path to that 'BindableState' \
521
+
(for example, 'viewStore.binding(\\.$value)'). For dynamic member lookup to be available, \
522
+
the view store's 'Action' type must also conform to 'BindableAction'.
0 commit comments