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

Version 1.3.0-RC #1357

Merged
merged 31 commits into from
Jul 19, 2019
Merged

Version 1.3.0-RC #1357

merged 31 commits into from
Jul 19, 2019

Conversation

qwwdfsad
Copy link
Collaborator

No description provided.

LouisCAD and others added 30 commits June 30, 2019 16:52
* Make sure assertions are absent on native and JS
* Only print full toString for Job in debug mode
Type parameter of awaitClose is not used but produces a warning in
new type inference when used with builder inference as in callbackFlow
as seen in this issue: https://youtrack.jetbrains.com/issue/KT-32097

Using star projection removes the warning and is binary compatible
thanks to generics type erasure.
* Default implementation is "null" reference to time-source which
  avoids the need for interface call in default case.
…f and only if the canceled request has been resumed under a race
Make all reactive builders top-level functions instead of extensions on CoroutineScope and prohibit jobs in their context

Downsides of having lifecycle-managed scoped builders:
  * The lifecycle of semantically cold entity is managed externally by the hot-one.
  * Independent failures in independent triggered computations affect each other
  * Two cancellation sources should be managed, coroutine-related Job parent and disposable/subscription
…s in 'suspend fun main' cases to further improve user experience

Fixes #1328
* All "emitting" operators (onStart, transform, onCompletion) are moved
  to Emitter
* All transformations in Transform.kt are rewritten via (unsafe)
  transforms, but all of
  (safe) transform, onStart and onCompletion operators collectors
  are safe.
* Added migration for startWith and concatWith.
* Consistent docs for all migration functions.
* JvmMultifileClass for Migration.kt so that renamed/deprecated
  functions (when they moved there) continue to resolve.

Fixes #1168
* The corresponding ReceiveChannel methods are deprecated.
* Introduced corresponding extensions with the same semantic and generic
  Any bound.
* Introduce internal ReceiveChannel.[on]receiveOrClosed
  * Using internal inline class ValueOrClosed.
  * To be stabilized and made public in the future when inline classes
    ABI stabilizes.
  * It is related to #330 but does not resolve it yet.
* Includes todos for future public ValueOrClose design.
* Simplify AbstractChannel select implementations.
* AbstractChannel implementation is optimized to avoid code
  duplication in suspension of different receive methods:
  receive, receiveOrNull, receiveOrClosed.
* This is a consuming conversion -- the resulting flow can be collected
  just once and the channel is closed after the first collect.
* The implementation is made efficient via emitAll extension.
* Experimental FlowCollector.emitAll extension is introduced.
* It is based on the (internal) Channel.receiveOrClose
  and ensures that the reference to the last emitted value is
  not retained (does not leak).

Fixes #1340
Fixes #1333
This makes code of EventLoop (including its task queue impl) shared
between JVM and Native making support and further fixes easier.
It it not actually used in JS and DCE should remove it.
There are two levels of protection:

* All delays for longer than Long.MAX_VALUE/2 nanos (~146 years) are
  considered to be "infinite", so adding then to the heap queue is not
  even attempted, thus minimizing a number of cases when we have
  "close to wraparound" times in there. This also works as optimization
  reducing effort, so delay(Long.MAX_VALUE) works faster.
* The invariant for delayed task's in the heap queue is defined so that
  all scheduled tasks are at most Long.MAX_VALUE nanos apart, thus
  always guaranteeing that they can be compared in a stable way despite
  wraparounds in time. The invariant is maintained by keeping
  "last observed nowTime" and making sure that all scheduled tasks
  in the queue are "after" this time.

Fixes #1312
  * Snapshot publication is removed as no longer needed
… coroutine context (to eagerly fail as fatal exceptions are not recoverable anyway), cleanup tests after scopeless reactive
* Promote the bare minimum Flow API to stable for incoming 1.3.0-RC
* Extract SafeFlow for nicer stacktraces
* Demote switchMap and combineLatest to preview features as we may want to rework in #1262 and #1335
* Make unsafeFlow less explicit, return preview status to AbstractFlow
@qwwdfsad qwwdfsad requested a review from elizarov July 19, 2019 13:53
@qwwdfsad qwwdfsad merged commit ef696a0 into master Jul 19, 2019
@qwwdfsad qwwdfsad deleted the version-1.3.0-RC branch September 26, 2019 09:42
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

6 participants