Skip to content

Version 1.4.2 #2412

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

Merged
merged 16 commits into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change log for kotlinx.coroutines

## Version 1.4.2

* Fixed `StackOverflowError` in `Job.toString` when `Job` is observed in its intermediate state (#2371).
* Improved liveness and latency of `Dispatchers.Default` and `Dispatchers.IO` in low-loaded mode (#2381).
* Improved performance of consecutive `Channel.cancel` invocations (#2384).
* `SharingStarted` is now `fun` interface (#2397).
* Additional lint settings for `SharedFlow` to catch programmatic errors early (#2376).
* Fixed bug when mutex and semaphore were not released during cancellation (#2390, thanks to @Tilps for reproducing).
* Some corner cases in cancellation propagation between coroutines and listenable futures are repaired (#1442, thanks to @vadimsemenov).
* Fixed unconditional cast to `CoroutineStackFrame` in exception recovery that triggered failures of instrumented code (#2386).
* Platform-specific dependencies are removed from `kotlinx-coroutines-javafx` (#2360).

## Version 1.4.1

This is a patch release with an important fix to the `SharedFlow` implementation.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.4.1) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.4.1)
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=1.4.2) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/1.4.2)
[![Kotlin](https://img.shields.io/badge/kotlin-1.4.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Slack channel](https://img.shields.io/badge/chat-slack-green.svg?logo=slack)](https://kotlinlang.slack.com/messages/coroutines/)

Expand Down Expand Up @@ -86,7 +86,7 @@ Add dependencies (you can also add other modules that you need):
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
<version>1.4.1</version>
<version>1.4.2</version>
</dependency>
```

Expand All @@ -104,7 +104,7 @@ Add dependencies (you can also add other modules that you need):

```groovy
dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
}
```

Expand All @@ -130,7 +130,7 @@ Add dependencies (you can also add other modules that you need):

```groovy
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
}
```

Expand All @@ -152,7 +152,7 @@ In common code that should get compiled for different platforms, you can add dep
```groovy
commonMain {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
}
}
```
Expand All @@ -163,7 +163,7 @@ Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
module as dependency when using `kotlinx.coroutines` on Android:

```groovy
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
```

This gives you access to Android [Dispatchers.Main]
Expand All @@ -190,15 +190,15 @@ packagingOptions {
### JS

[Kotlin/JS](https://kotlinlang.org/docs/reference/js-overview.html) version of `kotlinx.coroutines` is published as
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.4.1/jar)
[`kotlinx-coroutines-core-js`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-js/1.4.2/jar)
(follow the link to get the dependency declaration snippet).

You can also use [`kotlinx-coroutines-core`](https://www.npmjs.com/package/kotlinx-coroutines-core) package via NPM.

### Native

[Kotlin/Native](https://kotlinlang.org/docs/reference/native-overview.html) version of `kotlinx.coroutines` is published as
[`kotlinx-coroutines-core-native`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.4.1/jar)
[`kotlinx-coroutines-core-native`](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-native/1.4.2/jar)
(follow the link to get the dependency declaration snippet).

Only single-threaded code (JS-style) on Kotlin/Native is currently supported.
Expand Down
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ buildscript {
throw new IllegalArgumentException("'kotlin_snapshot_version' should be defined when building with snapshot compiler")
}
}
// These three flags are enabled in train builds for JVM IR compiler testing
ext.jvm_ir_enabled = rootProject.properties['enable_jvm_ir'] != null
ext.jvm_ir_api_check_enabled = rootProject.properties['enable_jvm_ir_api_check'] != null
ext.native_targets_enabled = rootProject.properties['disable_native_targets'] == null

// Determine if any project dependency is using a snapshot version
ext.using_snapshot_version = build_snapshot_train
Expand Down Expand Up @@ -323,3 +327,12 @@ knit {
}

knitPrepare.dependsOn getTasksByName("dokka", true)

// Disable binary compatibility check for JVM IR compiler output by default
if (jvm_ir_enabled) {
subprojects { project ->
configure(tasks.matching { it.name == "apiCheck" }) {
enabled = enabled && jvm_ir_api_check_enabled
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# Kotlin
version=1.4.1-SNAPSHOT
version=1.4.2-SNAPSHOT
group=org.jetbrains.kotlinx
kotlin_version=1.4.0

Expand Down
8 changes: 6 additions & 2 deletions gradle/compile-jvm-multiplatform.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ sourceCompatibility = 1.6
targetCompatibility = 1.6

kotlin {
targets {
fromPreset(presets.jvm, 'jvm')
jvm {
if (rootProject.ext.jvm_ir_enabled) {
compilations.all {
kotlinOptions.useIR = true
}
}
}
sourceSets {
jvmTest.dependencies {
Expand Down
6 changes: 6 additions & 0 deletions gradle/compile-jvm.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ apply plugin: 'org.jetbrains.kotlin.jvm'
sourceCompatibility = 1.6
targetCompatibility = 1.6

if (rootProject.ext.jvm_ir_enabled) {
kotlin.target.compilations.all {
kotlinOptions.useIR = true
}
}

dependencies {
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
// Workaround to make addSuppressed work in tests
Expand Down
Loading