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

[2.0.0] API improvements and other fixes #620

Closed
21 of 22 tasks
arkivanov opened this issue Jun 11, 2021 · 6 comments
Closed
21 of 22 tasks

[2.0.0] API improvements and other fixes #620

arkivanov opened this issue Jun 11, 2021 · 6 comments
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@arkivanov
Copy link
Contributor

arkivanov commented Jun 11, 2021

There are some APIs that can be improved/simplified. This issue is to collect all the cases. This is also a good place to raise and discuss any proposals or concerns.

  • flatMap - add default value for the maxConcurrency argument, remove flatMap variants without the maxConcurrency argument
  • flatMap with resultSelector - reorder arguments in the following way: resultSelector, maxConcurrency, mapper
  • observableInterval - put startDelayMillis after periodMillis and add default value startDelayMillis: Long = periodMillis, remove another observableInterval variant
  • Observable.replay - add default for bufferSize argument, remove the variant without arguments
  • Completable.asMaybe and Completable.asObservable - remove the generic parameter and make the return generic type Nothing
  • doOnAfterSuccess - rename action argument to consumer
  • remove all deprecated code
  • repeat(count: Int = -1) - the argument name should be times, for consistency with retry and RxJava. The type should be Long, and the default value should be Long.MAX_VALUE.
  • repeat with value 0 should return empty Observable, repeat with value 1 should subscribe only once, and so on. For consistency with RxJava.
  • retry(times: Int) - the argument type should be Long, and the default value should be Long.MAX_VALUE.
  • Observable.scan(getSeed, accumulate) and Observable.scan(accumulate), - the accumulate argument should be renamed to accumulator for consistency with RxJava.
  • Observable.throttle - should accept a Scheduler for timings instead of using Clock implicitly, for better testing on the client side.
  • Review all ExperimentalReaktiveApi, perhaps we can stabilise something.
  • collect should have a mutable collection supplier argument, accumulator function should return Unit.
  • Convert all millis durations to the new Duration API, if it becomes stable
  • Wait for Multiple Receivers to become stable and extract all subscribeXyz extensions from DisposableScope, and also T.scope(dispose: (T) -> Unit) (removed, context receivers will become stable no earlier than Kotlin 2.0)
  • Stabilize the Plugins API
  • Remove the old memory model support, optimize for the new memory model
  • All limit arguments in Observable.buffer operators should be of type Int
  • Remove iosArm32 and linuxArm32Hfp targets, as they are deprecated since Kotlin 1.8.20 and will be removed in Kotlin 1.9.20 (see the blog post)
  • Remove asRxJavaSingleSource, etc.
  • Update readme
@arkivanov
Copy link
Contributor Author

arkivanov commented Oct 14, 2021

Created a new branch: version-2.0, all PRs for this task should go there.

@arkivanov arkivanov added good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed labels Oct 16, 2021
@arkivanov arkivanov changed the title [2.0.0] Collect API improvements and other fixes [2.0.0] API improvements and other fixes Oct 16, 2021
@plusmobileapps
Copy link

With the Duration API becoming stable in 1.6, is that something that could be added to the reaktive API to improve functions like the observableInterval()?

@arkivanov
Copy link
Contributor Author

arkivanov commented Nov 27, 2021

@plusmobileapps yes, we have this in the task list for v2. I will investigate and provide updates here.

@ghost
Copy link

ghost commented Feb 11, 2022

Is for 1.6 (#655) threadLocal still required?

@arkivanov
Copy link
Contributor Author

@galdp Yes it is. threadLocal is useful for as long as the Kotlin/Native strict memory model is used. If you opt-in to the new relaxed memory model, then you can avoid using threadLocal. Also as a side note, it is not quite related to the version of coroutines.

@arkivanov
Copy link
Contributor Author

We should also remove iosArm32 and linuxArm32Hfp targets, as they are deprecated since Kotlin 1.8.20 and will be removed in Kotlin 1.9.20 (see the blog post). Added to the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants