Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some old deprecated code. #629

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions Sources/ComposableArchitecture/Internal/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,64 +141,3 @@ extension Reducer {
self.optional()
}
}

// NB: Deprecated after 0.1.4:

extension Reducer {
@available(*, unavailable, renamed: "debug(_:environment:)")
public func debug(
prefix: String,
environment toDebugEnvironment: @escaping (Environment) -> DebugEnvironment = { _ in
DebugEnvironment()
}
) -> Reducer {
self.debug(prefix, state: { $0 }, action: .self, environment: toDebugEnvironment)
}

@available(*, unavailable, renamed: "debugActions(_:environment:)")
public func debugActions(
prefix: String,
environment toDebugEnvironment: @escaping (Environment) -> DebugEnvironment = { _ in
DebugEnvironment()
}
) -> Reducer {
self.debug(prefix, state: { _ in () }, action: .self, environment: toDebugEnvironment)
}

@available(*, unavailable, renamed: "debug(_:state:action:environment:)")
public func debug<LocalState, LocalAction>(
prefix: String,
state toLocalState: @escaping (State) -> LocalState,
action toLocalAction: CasePath<Action, LocalAction>,
environment toDebugEnvironment: @escaping (Environment) -> DebugEnvironment = { _ in
DebugEnvironment()
}
) -> Reducer {
self.debug(prefix, state: toLocalState, action: toLocalAction, environment: toDebugEnvironment)
}
}

extension WithViewStore {
@available(*, unavailable, renamed: "debug(_:)")
public func debug(prefix: String) -> Self {
self.debug(prefix)
}
}

// NB: Deprecated after 0.1.3:

extension Effect {
@available(*, unavailable, renamed: "run")
public static func async(
_ work: @escaping (Effect.Subscriber) -> Cancellable
) -> Self {
self.run(work)
}
}

extension Effect where Failure == Swift.Error {
@available(*, unavailable, renamed: "catching")
public static func sync(_ work: @escaping () throws -> Output) -> Self {
self.catching(work)
}
}