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.4.0-M1 #2297

Merged
merged 30 commits into from Oct 13, 2020
Merged

Version 1.4.0-M1 #2297

merged 30 commits into from Oct 13, 2020

Conversation

qwwdfsad
Copy link
Member

No description provided.

qwwdfsad and others added 29 commits August 17, 2020 14:52
* Immediate dispatcher on JS, test added
* Style fixes
Non-deprecated 'jmhJar' configuration (#2032) (+9 squashed commits)
Squashed commits:
[8d07d36] Use new Kotlin/JS plugin (#1983)
* Use new Kotlin/JS plugin
* Support legacy DCE mode for 1.4-M2
[d224640] Add Dokka configuration method
[56e1c9b] Dokka plugin in 'buildSrc'
[dfdd202] Remove unused repositories
[4cf1d02] Kotlin DSL - 'javafx'
[d8f7d50] Avoid task name duplication
[f06a56b] Avoid task name duplication
[a09df3d] Separate 'UnpackAar' action
[fd5bf6b] Separate 'RunR8' task
    * General cleanup and TODOs

Co-authored with: ilya.goncharov@jetbrains.com
On CI set CACHE_REDIRECTOR=true environment property.
This commit adds awaitSingle variants similar to awaitFirst ones, but
always emitting the value during onComplete().

Fixes #1993
It seems to be the legacy from times when CC was a Job, in order to observe behaviour change, a specific example should be accurately made
* Kotlin DSL - 'reactive:reactor'
* Kotlin DSL - 'reactive:jdk9'
* Kotlin DSL - 'kotlinx-coroutines-slf4j'
* Kotlin DSL - 'kotlinx-coroutines-guava'
* Plugin repo management in 'pluginManagement' block
* Remove redundant stdlib dependencies (#2253)

Co-authored-by: Victor Turansky <victor.turansky@gmail.com>
#2285)

* Provide asFlowable and asObservable by their names in binary instead of 'from' function to prevent naming clash for Java users.
* Do not provide @jvmoverloads for convenience of Java interop
* Deprecate ReceiveChannel.asObservable by the way

Fixes #2182
* Allow nullable types in Flow.firstOrNull
* Allow nullable types in Flow.singleOrNull
* Align Flow.single and Flow.singleOrNull with Kotlin standard library

Fixes #2229
Fixes #2289

Co-authored-by: Nicklas Ansman Giertz <nicklas@ansman.se>
* All Flow.debounce/sample KDoc example code snippets are automatically tested with Knit.
* Flow.sample timings are made larger, so that they produce an expected output when run under the real time, too.

Fixes #2243
This is a tricky gotcha that needs additional explanation. There are two examples added, one showing the bad code and explaining why it does not work, and the other showing the correct way to write it.

Fixes #2233
)

Added instructions to work around #2023 
Also, the answer to #2274 is now documented.

Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
When the Executor that was used with Executor.asCoroutineDispatcher() extension rejects the submitted task, it means that it had reached its capacity and so the executing current Job should be canceled to terminate it as soon as possible. This way RejectedExecutionException works as a rate-limiter just like it serves this purpose in executor-based Java code.

Fixes #2003
…uncher (#2074)

New source sets:
* "concurrent" source set is shared between "jvm" and "native"
* "native" source set is subdivided into "nativeDarwin" (Apple) and "nativeOther" (Linux, etc)

Native tests are launched in two variants:
* A default "test" task runs tests with memory leak checker from "mainNoExit" entry point.
* A special "backgroundTest" task runs tests in a background worker from "mainBackground" entry point.

Other build improvement:
* Modernize old-style IDEA-active hacks to kts helper.
* Extract versions of JS test runner dependencies.
* Remove redundant google repo reference from android tests.
…1937)

This is a problematic for Android when Main dispatcher is cancelled on destroyed activity.
Atomic nature of channels is designed to prevent loss of elements,
which is really not an issue for a typical application, but creates problem when used with channels.

* Internal suspendAtomicCancellableCoroutine -> suspendCancellableCoroutine
* Internal suspendAtomicCancellableCoroutineReusable -> suspendCancellableCoroutineReusable
* Remove atomic cancellation from docs
* Ensures that flowOn does not resume downstream after cancellation.
* MODE_ATOMIC_DEFAULT renamed into MODE_ATOMIC
* Introduced MODE_CANCELLABLE_REUSABLE to track suspendCancellableCoroutineReusable
* Better documentation for MODE_XXX constants.
* Added stress test for proper handling of MODE_CANCELLABLE_REUSABLE
  and fixed test for #1123 bug with job.join (working in MODE_CANCELLABLE) that was not
  properly failing in the absence of the proper code in CancellableContinuationImpl.getResult
* Added test for Flow.combine that should be fixed
* Support extended invokeOnCancellation contract
* Introduced internal tryResumeAtomic
* Channel onUnderliveredElement is introduced as a replacement.

Fixes #1265
Fixes #1813
Fixes #1915
Fixes #1936

Co-authored-by: Louis CAD <louis.cognault@gmail.com>
Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
* Introduce SharedFlow and sharing operators

Summary of changes:
* SharedFlow, MutableSharedFlow and its constructor.
* StateFlow implements SharedFlow.
* SharedFlow.onSubscription operator, clarified docs in other onXxx operators.
* BufferOverflow strategy in kotlinx.coroutines.channels package.
* shareIn and stateIn operators and SharingStarted strategies for them.
* SharedFlow.flowOn error lint (up from StateFlow).
* Precise cancellable() operator fusion.
* Precise distinctUntilChanged() operator fusion.
* StateFlow.compareAndSet function.
* asStateFlow and asSharedFlow read-only view functions.
* Consistently clarified docs on cold vs hot flows.
* Future deprecation notice for BroadcastChannel, ConflatedBroadcastChannel, broadcast, and broadcastIn.
* Channel(...) constructor function has onBufferOverflow parameter.
* buffer(...) operator has onBufferOverflow parameter.
* shareIn/stateIn buffer and overflow strategy are configured via upstream buffer operators.
* shareIn/stateIn fuse with upstream flowOn for more efficient execution.
* conflate() is implemented as buffer(onBufferOverflow=KEEP_LATEST), non-suspending strategies are reasonably supported with 0 and default capacities.
* Added reactive operator migration hints.
* WhileSubscribed with kotlin.time.Duration params

Fixes #2034
Fixes #2047

Co-authored-by: Ibraheem Zaman <1zaman@users.noreply.github.com>
Co-authored-by: Thomas Vos <thomasjsvos@gmail.com>
Co-authored-by: Travis Wyatt <travis.i.wyatt@gmail.com>
Copy link
Contributor

@elizarov elizarov left a comment

Choose a reason for hiding this comment

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

Some suggested text improvements

CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
@qwwdfsad qwwdfsad merged commit 1b34e1c into master Oct 13, 2020
@qwwdfsad qwwdfsad deleted the version-1.4.0-M1 branch October 27, 2020 14: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

7 participants