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.8 #2142

Merged
merged 24 commits into from Jul 16, 2020
Merged

Version 1.3.8 #2142

merged 24 commits into from Jul 16, 2020

Conversation

elizarov
Copy link
Contributor

@elizarov elizarov commented Jul 16, 2020

TODO

Changelog

New experimental features

Bug fixes and improvements

h0tk3y and others added 22 commits May 22, 2020 12:28
* Gradle 6.3
* Enable Gradle module metadata in all modules
* Workaround for gradle/gradle#11412
* Fix invalid mutation of a tasks's dependsOn w/Gradle 6.3
* Rename root MPP module and publish the JVM JAR within
* Rename the JVM module: empty suffix -> '-jvm';
* Rename the root MPP module: '-native' -> empty suffix;
* Publish the JVM JAR and POM in the root MPP module, so
  that consumers who can't read Gradle module metadata, such
  as Maven or old Gradle versions, get the JVM resolution
  result from the root MPP module.
* Enable HMPP
* Add jvm attribute to detached configuration
Otherwise variant-aware resolution fails to find compatible variant in
kotlinx-coroutines-core

* Enable HMPP conditionally for Kotlin 1.4.x and not 1.3.7x
* Workaround KT-39037
* Disable PrecompiledDebugProbesTest test in train builds
* Conditionally hack out the Gradle module metadata with Kotlin 1.3.7x
* Conditionally rename Kotlin metadata module to *-metadata with Kotlin 1.4.x
* Conditionally rename the root & JVM modules with Kotlin 1.4.x

Co-authored-by: Dmitry Savvinov <dmitry.savvinov@jetbrains.com>
Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
#2057)

It fixes two problems:
    * NoSuchElementException can be thrown during cancellation sequence (see FirstJvmTest that reproduces this problem with explanation)
    * Cancellation can be accidentally suppressed and flow activity can be prolonged

Fixes #2051
* Prepare for 1.4-M2 Kotlin/JS
* Compatibility with 1.3.70
* Fix check for irTarget
…ule (#2061)

The rule -keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {} is present in kotlinx.coroutines.android/META-INF/proguard/coroutines.pro and should therefore is not needed.
* Improve the docs and guide on flow cancellation
* Remove outdated phrase on "flow infrastructure does not introduce additional cancellation points". They were introduced by #2028
* Add a section on "Flow cancellation check" with examples on `Flow.cancellable()`` operator.
* Add a bit more detail in `flow` and `cancellable` docs with links to `ensureActive()`.
Ignored change in interface ReceiveChannel interface is:
-  public abstract fun receiveOrClosed (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
+  public abstract fun receiveOrClosed-ZYPwvRU (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
This change is planned in 1.4.0 compiler.
* Recognizable toString implementation in default dispatchers
* Fast-path for disabled debug probes
…l signal handler. (#2118)

Otherwise, it may lead to obscure error messages in the console when users are on Windows and are not aware about signals.
Co-authored-by: Thibault SEISEL <thibault.seisel@orange.com>
Also, most flow-truncating operators are refactored via a common internal collectWhile operator that properly uses AbortFlowException and checks for its ownership, so that we don't have to look for bugs in interactions between all those operators (and zip, too, which is also flow-truncating). But `take` operator still users a custom highly-tuned implementation.

Fixes #2065

Co-authored-by: EdwarDDay <4127904+EdwarDDay@users.noreply.github.com>
Co-authored-by: Louis CAD <louis.cognault@gmail.com>
…andard library. (#2139)

foldReduce is not introduced to see how it goes in the standard library first. For the full rationale of renaming, please refer to KT-38060
The race was leading to emitting more items via onNext than requested, the corresponding stress-test was added, too

Fixes #2109
So that is shows as "Dispatchers.Main" and "Dispatchers.Main.immediate".
Also remove hardcoded "Main" name in places of code where it is not needed anymore.
@elizarov elizarov requested a review from qwwdfsad July 16, 2020 17:35
…#2129)

It should not prevent garbage-collection of coroutines that were otherwise lost, which included the following practically-useful cases:
* Synchronous coroutines (iterator/sequence).
* Lazy coroutines that were not started.
* Abandoned coroutines that suspend forever without strong references to them in GlobalScope.

Two kinds of tests cover this functionality:
* A test via FieldWalker ensures that debugger impl does not keep a strong reference. This tests works fast and provides good diagnostics if anything goes wrong, but it is fragile, as futures changes to debugger my introduce static references to running coroutines elsewhere.
* A stress-test that ensures that no OOM indeed happens when you run a lot of such lost coroutines. Longer-running, more stable to code change, but fragile in a difference sense as it may accidentally start passing in the future if lots of memory get allocated for tests.

Fixes #2117
@elizarov elizarov marked this pull request as ready for review July 16, 2020 20:35
@elizarov elizarov merged commit d55d8e8 into master Jul 16, 2020
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