Skip to content

Commit 7764e43

Browse files
committed
Version 0.30.0
1 parent 54617b7 commit 7764e43

File tree

9 files changed

+56
-10
lines changed

9 files changed

+56
-10
lines changed

CHANGES.md

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

3+
## Version 0.30.0
4+
5+
* **[Major]** Further improvements in exception handling — no failure exception is lost.
6+
* `async` and async-like builders cancel parent on failure (it affects `CompletableDeferred`, and all reactive integration builders).
7+
* This makes parallel decomposition exception-safe and reliable without having to rember about `awaitAll` (see #552).
8+
* `Job()` wih parent now also cancels parent on failure consistently with other scopes.
9+
* All coroutine builders and `Job` implementations propagate failure to the parent unless it is a `CancellationException`.
10+
* Note, "scoping" builders don't "cancel the parent" verbatim, but rethrow the corresponding exception to the caller for handling.
11+
* `SupervisorJob()` and `supervisorScope { ... }` are introduced, allowing for a flexible implementation of custom exception-handling policies, see a [new section in the guide on supervision](docs/exception-handling.md#supervision).
12+
* Got rid of `awaitAll` in documentation and rewrote `currentScope` section (see #624).
13+
* **[Major]** Coroutine scheduler is used for `Dispatchers.Default` by default instead of deprecated `CommonPool`.
14+
* "`DefaultDispatcher`" is used as a public name of the default impl (you'll see it thread names and in the guide).
15+
* `-Dkotlinx.coroutines.scheduler=off` can be used to switch back to `CommonPool` for a time being (until deprecated CommonPool is removed).
16+
* Make `CoroutineStart.ATOMIC` experimental as it covers important use-case with resource cleanup in finally block (see #627).
17+
* Restored binary compatibility of `Executor.asCoroutineDispatcher` (see #629).
18+
* Fixed OOM in thread-pool dispatchers (see #571).
19+
* Check for cancellation when starting coroutine with `Dispatchers.Unconfined` (see #621).
20+
* A bunch of various performance optimizations and docs fixes, including contributions from @AlexanderPrendota, @PaulWoitaschek.
21+
322
## Version 0.27.0
423

524
* **[Major]** Public API revision. All public API was reviewed and marked as preparation to `1.0` release:

COMPATIBILITY.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Compatibility policy for kotlinx.coroutines
2+
3+
All `kotlinx.coroutines` API comes into five flavors: stable, experimental, obsolete, internal and deprecated.
4+
* **Deprecated** API is marked with `@Deprecated` and will be removed in `1.0.0` release.
5+
* **Internal** API is marked with `@InternalCoroutinesApi`. It is intended to be used only by `kotlinx.coroutines` machinery and can (will) be broken without a warning. If you are using internal API, please tell us what problem you are trying to solve, so we can provide a stable alternative.
6+
* **Experimental** API is marked with `ExperimentalCoroutinesApi`. Such API may have (known) design issues or we are unsure about its semantics.
7+
Roughly speaking, there is a chance that those declarations will be deprecated in the near future or the semantics of their behavior may change in the way that may break some code. In that case, proper migration aid
8+
will be provided for next several releases alongside with a stable alternative.
9+
* **Obsolete** API is marked with `@ObsoleteCoroutinesApi`. This API is known to have some serious issues, so it will be replaced with a better alternative.
10+
In the sense of migration and deprecation, it is equal to experimental.
11+
* **Stable** API is public API without any annotations. This API is proven to be stable and it is not going to change. If at some point it will be discovered that such API has unfixable design flaws,
12+
it will be gradually deprecated with proper replacement and migration aid, but won't be removed for at least a year.
13+
14+
## Migration to 1.0.0 version with Kotlin 1.3
15+
16+
The main difference between Kotlin 1.2 and 1.3 is that coroutines are now
17+
stable public API, and thus `kotlinx.coroutines` is leaving its "experimental" status. For that reason, future releases of `kotlinx.coroutines` will be available only for Kotlin 1.3.
18+
Version `1.0.0` (starting with its release candidate build) will have all its deprecated declarations removed and `kotlinx.coroutines.experimental` package will be renamed to `kotlinx.coroutines` without functional changes.
19+
In order to migrate `kotlinx.coroutines` to `1.0.0`, follow these steps:
20+
21+
1. Update `kotlinx.coroutines` to `0.30.0` version.
22+
2. Inspect compiler warnings about deprecated API and migrate it to a proposed alternative. Most of deprecated API has a corresponding replacement which can be applied from IDEA with quickfix.
23+
3. Update Kotlin version to `1.3.0` or to the latest `1.3.0-rc` and `kotlinx.coroutines` to version `0.30.0-eap13`. Then just get rid of `experimental` suffix in all imports.
24+
4. Update `kotlinx.coroutines` to version `1.0.0` or to the corresponding release candidate of it).
25+

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
[![official JetBrains project](http://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)](http://www.apache.org/licenses/LICENSE-2.0)
5-
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=0.27.0) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/0.27.0)
5+
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=0.30.0) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/0.30.0)
66

77
Library support for Kotlin coroutines with [multiplatform](#multiplatform) support.
88
This is a companion version for Kotlin 1.2.70 release.
99

10+
**NOTE**: This is the latest experimental release. See [COMPATIBILITY.md](COMPATIBILITY.md) for details on migration.
11+
1012
```kotlin
1113
GlobalScope.launch {
1214
delay(1000)
@@ -63,7 +65,7 @@ Add dependencies (you can also add other modules that you need):
6365
<dependency>
6466
<groupId>org.jetbrains.kotlinx</groupId>
6567
<artifactId>kotlinx-coroutines-core</artifactId>
66-
<version>0.27.0</version>
68+
<version>0.30.0</version>
6769
</dependency>
6870
```
6971

@@ -80,7 +82,7 @@ And make sure that you use the latest Kotlin version:
8082
Add dependencies (you can also add other modules that you need):
8183

8284
```groovy
83-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.27.0'
85+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.30.0'
8486
```
8587

8688
And make sure that you use the latest Kotlin version:
@@ -113,7 +115,7 @@ Add [`kotlinx-coroutines-android`](ui/kotlinx-coroutines-android)
113115
module as dependency when using `kotlinx.coroutines` on Android:
114116

115117
```groovy
116-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.27.0'
118+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.30.0'
117119
```
118120
This gives you access to Android [Dispatchers.Main](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-android/kotlinx.coroutines.experimental.android/kotlinx.coroutines.experimental.-dispatchers/index.html)
119121
coroutine dispatcher and also makes sure that in case of crashed coroutine with unhandled exception this

RELEASE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To release new `<version>` of `kotlinx-coroutines`:
99
`git pull`
1010

1111
3. Make sure the `master` branch is fully merged into `develop`:
12-
`git merge master`
12+
`git merge origin/master`
1313

1414
4. Search & replace `<old-version>` with `<version>` across the project files. Should replace in:
1515
* [`README.md`](README.md)

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Kotlin
2-
version=0.27.0-SNAPSHOT
2+
version=0.30.0-SNAPSHOT
33
group=org.jetbrains.kotlinx
44
kotlin_version=1.2.70
55
kotlin_native_version=0.8.2

native/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ repositories {
4242
}
4343
4444
dependencies {
45-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:0.27.0'
45+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-native:0.30.0'
4646
}
4747
4848
sourceSets {

ui/coroutines-guide-ui.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Add dependencies on `kotlinx-coroutines-android` module to the `dependencies { .
161161
`app/build.gradle` file:
162162

163163
```groovy
164-
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.27.0"
164+
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.30.0"
165165
```
166166

167167
Coroutines are experimental feature in Kotlin.

ui/kotlinx-coroutines-android/animation-app/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ org.gradle.jvmargs=-Xmx1536m
1919
kotlin.coroutines=enable
2020

2121
kotlin_version=1.2.70
22-
coroutines_version=0.27.0
22+
coroutines_version=0.30.0
2323

ui/kotlinx-coroutines-android/example-app/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ org.gradle.jvmargs=-Xmx1536m
1919
kotlin.coroutines=enable
2020

2121
kotlin_version=1.2.70
22-
coroutines_version=0.27.0
22+
coroutines_version=0.30.0
2323

0 commit comments

Comments
 (0)