Skip to content

Commit 32f967c

Browse files
authored
Deprecate 'Effect' for 'EffectTask' (#1788)
* Deprecate 'Effect' for 'EffectTask' This is to allow reclaiming 'Effect' at a later time without the 'Failure' generic in the near future. * wip
1 parent ea9cc86 commit 32f967c

File tree

1 file changed

+8
-45
lines changed

1 file changed

+8
-45
lines changed

Sources/ComposableArchitecture/Effect.swift

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -609,57 +609,20 @@ extension EffectPublisher {
609609
}
610610

611611
@available(
612-
iOS,
613-
deprecated: 9999.0,
612+
*,
614613
message:
615614
"""
616-
'Effect' has been deprecated in favor of 'EffectTask' when `Failure == Never`, or
617-
`EffectPublisher<Output, Failure>` in general.
615+
'Effect' has been deprecated in favor of 'EffectTask' when 'Failure == Never', or 'EffectPublisher<Output, Failure>' in general.
618616
619-
You are encouraged to use `EffectTask<Action>` to model the ouput of your reducers, and to Swift
620-
concurrency to model failable streams of values.
617+
You are encouraged to use 'EffectTask<Action>' to model the output of your reducers, and to use Swift concurrency to model failable streams of values.
621618
622-
See the migration roadmap for more information: https://github.com/pointfreeco/swift-composable-architecture/discussions/1477
623-
"""
624-
)
625-
@available(
626-
macOS,
627-
deprecated: 9999.0,
628-
message:
629-
"""
630-
'Effect' has been deprecated in favor of 'EffectTask' when `Failure == Never`, or
631-
`EffectPublisher<Output, Failure>` in general.
632-
633-
You are encouraged to use `EffectTask<Action>` to model the ouput of your reducers, and to Swift
634-
concurrency to model failable streams of values.
619+
To find and replace instances of 'Effect<Action, Never>' to 'EffectTask<Action, Never>' in your codebase, use the following regular expression:
635620
636-
See the migration roadmap for more information: https://github.com/pointfreeco/swift-composable-architecture/discussions/1477
637-
"""
638-
)
639-
@available(
640-
tvOS,
641-
deprecated: 9999.0,
642-
message:
643-
"""
644-
'Effect' has been deprecated in favor of 'EffectTask' when `Failure == Never`, or
645-
`EffectPublisher<Output, Failure>` in general.
646-
647-
You are encouraged to use `EffectTask<Action>` to model the ouput of your reducers, and to Swift
648-
concurrency to model failable streams of values.
621+
Find:
622+
Effect<([^,]+), Never>
649623
650-
See the migration roadmap for more information: https://github.com/pointfreeco/swift-composable-architecture/discussions/1477
651-
"""
652-
)
653-
@available(
654-
watchOS,
655-
deprecated: 9999.0,
656-
message:
657-
"""
658-
'Effect' has been deprecated in favor of 'EffectTask' when `Failure == Never`, or
659-
`EffectPublisher<Output, Failure>` in general.
660-
661-
You are encouraged to use `EffectTask<Action>` to model the ouput of your reducers, and to Swift
662-
concurrency to model failable streams of values.
624+
Replace:
625+
EffectTask<$1>
663626
664627
See the migration roadmap for more information: https://github.com/pointfreeco/swift-composable-architecture/discussions/1477
665628
"""

0 commit comments

Comments
 (0)