Skip to content

Commit 7223897

Browse files
authored
Merge pull request #2412 from Kotlin/version-1.4.2
Version 1.4.2
2 parents e88e58d + b221094 commit 7223897

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+561
-216
lines changed

CHANGES.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change log for kotlinx.coroutines
22

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

517
This is a patch release with an important fix to the `SharedFlow` implementation.

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
44
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
5-
[![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)
5+
[![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)
66
[![Kotlin](https://img.shields.io/badge/kotlin-1.4.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
77
[![Slack channel](https://img.shields.io/badge/chat-slack-green.svg?logo=slack)](https://kotlinlang.slack.com/messages/coroutines/)
88

@@ -86,7 +86,7 @@ Add dependencies (you can also add other modules that you need):
8686
<dependency>
8787
<groupId>org.jetbrains.kotlinx</groupId>
8888
<artifactId>kotlinx-coroutines-core</artifactId>
89-
<version>1.4.1</version>
89+
<version>1.4.2</version>
9090
</dependency>
9191
```
9292

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

105105
```groovy
106106
dependencies {
107-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1'
107+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
108108
}
109109
```
110110

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

131131
```groovy
132132
dependencies {
133-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1")
133+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")
134134
}
135135
```
136136

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

165165
```groovy
166-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1'
166+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
167167
```
168168

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

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

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

198198
### Native
199199

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

204204
Only single-threaded code (JS-style) on Kotlin/Native is currently supported.

build.gradle

+13
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ buildscript {
3333
throw new IllegalArgumentException("'kotlin_snapshot_version' should be defined when building with snapshot compiler")
3434
}
3535
}
36+
// These three flags are enabled in train builds for JVM IR compiler testing
37+
ext.jvm_ir_enabled = rootProject.properties['enable_jvm_ir'] != null
38+
ext.jvm_ir_api_check_enabled = rootProject.properties['enable_jvm_ir_api_check'] != null
39+
ext.native_targets_enabled = rootProject.properties['disable_native_targets'] == null
3640

3741
// Determine if any project dependency is using a snapshot version
3842
ext.using_snapshot_version = build_snapshot_train
@@ -323,3 +327,12 @@ knit {
323327
}
324328

325329
knitPrepare.dependsOn getTasksByName("dokka", true)
330+
331+
// Disable binary compatibility check for JVM IR compiler output by default
332+
if (jvm_ir_enabled) {
333+
subprojects { project ->
334+
configure(tasks.matching { it.name == "apiCheck" }) {
335+
enabled = enabled && jvm_ir_api_check_enabled
336+
}
337+
}
338+
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
# Kotlin
6-
version=1.4.1-SNAPSHOT
6+
version=1.4.2-SNAPSHOT
77
group=org.jetbrains.kotlinx
88
kotlin_version=1.4.0
99

gradle/compile-jvm-multiplatform.gradle

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ sourceCompatibility = 1.6
66
targetCompatibility = 1.6
77

88
kotlin {
9-
targets {
10-
fromPreset(presets.jvm, 'jvm')
9+
jvm {
10+
if (rootProject.ext.jvm_ir_enabled) {
11+
compilations.all {
12+
kotlinOptions.useIR = true
13+
}
14+
}
1115
}
1216
sourceSets {
1317
jvmTest.dependencies {

gradle/compile-jvm.gradle

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ apply plugin: 'org.jetbrains.kotlin.jvm'
99
sourceCompatibility = 1.6
1010
targetCompatibility = 1.6
1111

12+
if (rootProject.ext.jvm_ir_enabled) {
13+
kotlin.target.compilations.all {
14+
kotlinOptions.useIR = true
15+
}
16+
}
17+
1218
dependencies {
1319
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
1420
// Workaround to make addSuppressed work in tests

0 commit comments

Comments
 (0)