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 deprecated APIs #220

Merged
merged 1 commit into from
May 15, 2017
Merged

Remove deprecated APIs #220

merged 1 commit into from
May 15, 2017

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Apr 25, 2017

Closes #191.

/// Returns the result of applying `transform` to `Success`es’ values, or re-wrapping `Failure`’s errors.
///
/// This is a synonym for `flatMap`.
@available(*, deprecated, renamed: "ResultProtocol.flatMap(self:_:)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we mark these as unavailable as well?

Copy link
Member Author

@ikesyo ikesyo Apr 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately no. The operator definitions must be remained to do that. However, we actually want to remove the operators to close #191.

@mdiep
Copy link
Contributor

mdiep commented Apr 25, 2017

I suppose we should look into removing ResultProtocol and doing a 4.0 release?

@Thomvis
Copy link
Member

Thomvis commented Apr 25, 2017

@mdiep I proposed adding the ResultProtocol (a long time ago) to be able to do https://github.com/Thomvis/BrightFutures/blob/master/Sources/BrightFutures/AsyncType%2BResultType.swift#L10. But that no longer requires a protocol in Swift 3.1, right?

@mdiep
Copy link
Contributor

mdiep commented Apr 25, 2017

But that no longer requires a protocol in Swift 3.1, right?

Correct

@ikesyo
Copy link
Member Author

ikesyo commented Apr 25, 2017

@Thomvis @mdiep I think for that purpose Parameterized extensions is needed since Result itself is generic, which is not implemented yet in Swift 3.1.

import Result

public extension<T, E> AsyncType where Value == Result<T, E> {
    public var value: T? { ... }
    public var error: E? { ... }
}

@ikesyo
Copy link
Member Author

ikesyo commented May 15, 2017

@mdiep @Thomvis Do you have further concerns? I'd like to have Result 4.0 with these changes for the forthcoming ReactiveSwift 2.0.

@mdiep mdiep merged commit 65d0c81 into master May 15, 2017
@mdiep mdiep deleted the remove-deprecated-apis branch May 15, 2017 11:36
@ikesyo ikesyo modified the milestone: 4.0 May 16, 2017
@andersio andersio mentioned this pull request May 29, 2017
@andersio
Copy link
Contributor

The protocol can be reduced to return the concrete type like OptionalProtocol in RAS, and have all methods moved to the concrete type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants