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

Deprecate gather, gatherN, gatherUnordered in favor of parSequence, parSequenceN, parSequenceUnordered #1145

Merged
merged 2 commits into from Mar 23, 2020

Conversation

jozic
Copy link
Contributor

@jozic jozic commented Mar 15, 2020

addresses #1130

@jozic
Copy link
Contributor Author

jozic commented Mar 15, 2020

@Avasil @oleg-py @alexandru
please check this out, if this looks good, i can continue with the rest

@jozic jozic changed the title Deprecate gather, gatherN, gatherUnordered in favor of parTraverse, p… Deprecate gather, gatherN, gatherUnordered in favor of parSequence, p… Mar 15, 2020
@jozic jozic changed the title Deprecate gather, gatherN, gatherUnordered in favor of parSequence, p… Deprecate gather, gatherN, gatherUnordered in favor of parSequence, parSequenceN, parSequenceUnordered Mar 15, 2020
Copy link
Collaborator

@Avasil Avasil left a comment

Thanks @jozic - I think it looks great!

I added one comment about location of depreacted methods and we also have to make it compile / pass mimaReportBinaryIssues check:

  • We have benchmark module for a previous version as well so we have to either keep using gather or temporarily turn off its compilation in CI (at the top of build.sbt named as benchmarksPrev )
  • We need to add filters to MimaFilters for renamed objects with implementations. They are private so it's ok. It can be verified with evalJVM/mimaReportBinaryIssues

@@ -3517,36 +3517,46 @@ object Task extends TaskInstancesLevel1 {
implicit bf: BuildFrom[M[A], B, M[B]]): Task[M[B]] =
TaskSequence.traverse(in, f)(bf)

/** Alias for [[parSequence]] */
@deprecated("Use parSequence", "3.2.0")
def gather[A, M[X] <: Iterable[X]](in: M[Task[A]])(implicit bf: BuildFrom[M[Task[A]], A, M[A]]): Task[M[A]] =
Copy link
Collaborator

@Avasil Avasil Mar 22, 2020

Choose a reason for hiding this comment

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

We should put deprecated methods to TaskDeprecated.Companion to clean normal API

There is also slightly different convention for description with

/**
   * DEPRECATED — please use XXX
   */

@jozic
Copy link
Contributor Author

jozic commented Mar 22, 2020

@Avasil thanks for feedback!
I've moved deprecated methods to TaskDeprecated.Companion and also added renamed classes to the mima filter
I've also tried to revert changes to benchmarks, but current version wasn't compilable due to deprecation errors, so I've disabled benchmarksPrev
CI seems happy now

Please check it out again

@Avasil
Copy link
Collaborator

Avasil commented Mar 22, 2020

@jozic Looks good, we can add the rest 👍

I think we can wait with monix.io docs update until 3.2.0 is released

@jozic
Copy link
Contributor Author

jozic commented Mar 23, 2020

@Avasil I've added second commit with changes for wander and friends
lmk if anything need to be changed

@Avasil Avasil marked this pull request as ready for review Mar 23, 2020
Avasil
Avasil approved these changes Mar 23, 2020
Copy link
Collaborator

@Avasil Avasil left a comment

Awesome, thank you @jozic :)

@Avasil Avasil merged commit a8b3cc4 into monix:master Mar 23, 2020
1 check passed
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

2 participants