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

CU-fb532c - Clean up Selective api #2312

Merged
merged 8 commits into from Mar 11, 2021
Merged

Conversation

danimontoya
Copy link
Contributor

Fixes https://app.clickup.com/t/fb532c
Remove/deprecate Selective API

@franciscodr
Copy link
Collaborator

Task linked: CU-fb532c Clean up Selective API

@danimontoya danimontoya marked this pull request as ready for review March 9, 2021 15:04
@@ -1,155 +0,0 @@
package arrow.core.extensions.option.selective
Copy link
Member

Choose a reason for hiding this comment

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

All thse files XXXSelective.kt in extensions have to stay until the deprecation cycle has finished in 0.13.0

@@ -43,7 +41,6 @@ object MonadLaws {
M: Monad<F>,
FF: Functor<F>,
AP: Apply<F>,
SL: Selective<F>,
Copy link
Member

Choose a reason for hiding this comment

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

These changes are unnecessary since we keep Selective around until fully deprecated and removed in 0.13.0.

fun <E> Validated<E, Boolean>.orS(f: Validated<E, Boolean>): Validated<E, Boolean> =
ifS(Valid(true), f)

@Deprecated(SelectiveDeprecation)
fun <E> Validated<E, Boolean>.andS(f: Validated<E, Boolean>): Validated<E, Boolean> =
ifS(f, Valid(false))
Copy link
Member

Choose a reason for hiding this comment

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

All these methods didn't exist in 0.11.0 and can therefore be removed.
https://github.com/arrow-kt/arrow-core/blob/0.11.0/arrow-core-data/src/main/kotlin/arrow/core/Validated.kt

fun <A, B> Option<Either<A, B>>.select(f: OptionOf<(A) -> B>): Option<B> =
branch(f.fix(), Some(::identity))

@Deprecated(SelectiveDeprecation)
Copy link
Member

Choose a reason for hiding this comment

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

# Conflicts:
#	arrow-libs/core/arrow-core-data/src/main/kotlin/arrow/core/Option.kt
Copy link
Member

@nomisRev nomisRev left a comment

Choose a reason for hiding this comment

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

Thanks @danimontoya!

Copy link
Member

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

🔥

@nomisRev nomisRev merged commit 7163522 into master Mar 11, 2021
@nomisRev nomisRev deleted the CU-fb532c-cleanup-selective branch March 11, 2021 12:31
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.

None yet

4 participants