Improved the published jar files (#3842, #4599).
Various documentation improvements, including complete rewrites of structured concurrency and error handling-related KDoc (#4433, #4596).
Breaking changes and deprecations
Moved Promise-related functions from JS and Wasm/JS to the new web target. On Wasm/JS, this is a breaking change. Before the change, Promise on Wasm/JS could work with arbitrary Kotlin types, but now, only JsAny subtypes are accepted (#4563).
Changed handling of coroutine exceptions that can't be propagated on JS and Wasm/JS. Before, exceptions were logged, but now, they are reported to the JS runtime (#4451, #4631).
Deprecated using CoroutineDispatcher as the coroutine context key; now, ContinuationInterceptor has to be used instead (#4333).
Advanced the deprecation levels on kotlinx-coroutines-test APIs (#4604).
Added lint functions that mark passing a Job to coroutine builders as deprecated (#4435).
Bug fixes and improvements
Added a callsInPlace(EXACTLY_ONCE) contract to runBlocking in code shared between JVM and Native (#4368).
Added a callsInPlace(EXACTLY_ONCE) contract to suspendCancellableCoroutine (#4574).
Fixed exceptions in user-supplied Thread.UncaughtExceptionHandler instances causing the internal coroutines machinery to fail (#4516).
Fixed CoroutineDispatcher.asScheduler in the RxJava integration not cancelling outstanding work when a Worker gets cancelled, which led to memory leaks in some scenarios (#4615).
Fixed SharedFlow entering an invalid state when a subscriber and an emitter are cancelled simultaneously (#4583).
Fixed an R8 optimization leading to shareIn/stateIn coroutines getting garbage-collected (#4646). Thanks, @solevic!
Small additions
Added CompletableDeferred.asDeferred for obtaining a read-only Deferred view (#4408).
Added SharedFlow.asFlow for obtaining a Flow view with hidden hot flow semantics (#4530). Thanks, @g000sha256!
Added a StateFlow.collectLatest overload returning Nothing to assist with finding unreachable code (#4454).
Added ReceiveChannel.consumeTo for consuming a ReceiveChannel into a MutableCollection (#4520).
Added a StateFlow<T>.onSubscription overload returning a StateFlow<T>, similar to SharedFlow<T>.onSubscription returning SharedFlow<T> (#4275). Thanks, @xit0c!
Added terminal Flow operators for collecting a Flow to a Map (#1541).
Fixed the kotlinx-coroutines-debug JAR file including the module-info.class file twice, resulting in failures in various tooling (#4314). Thanks, @RyuNen344!
Fixed Flow.stateIn hanging when the scope is cancelled in advance or the flow is empty (#4322). Thanks, @francescotescari!
Improved handling of dispatcher failures in .limitedParallelism (#4330) and during flow collection (#4272).
Fixed runBlocking failing to run its coroutine to completion in some cases if its JVM thread got interrupted (#4399).
Small tweaks, fixes, and documentation improvements.
Introduced Flow.any, Flow.all, and Flow.none (#4212). Thanks, @CLOVIS-AI!
Reorganized kotlinx-coroutines-debug and kotlinx-coroutines-core code to avoid a split package between the two artifacts (#4247). Note that directly referencing kotlinx.coroutines.debug.AgentPremain must now be replaced with kotlinx.coroutines.debug.internal.AgentPremain. Thanks, @sellmair!
No longer shade byte-buddy in kotlinx-coroutines-debug, reducing the artifact size and simplifying the build configuration of client code. Thanks, @sellmair!
Fixed NullPointerException when using Java-deserialized kotlinx-coroutines-core exceptions (#4291). Thanks, @AlexRiedler!
Properly report exceptions thrown by CoroutineDispatcher.dispatch instead of raising internal errors (#4091). Thanks, @zuevmaxim!
Fixed a bug that delayed scheduling of a Dispatchers.Default or Dispatchers.IO task after a yield() in rare scenarios (#4248).
Fixed a bug that prevented the main() coroutine on Wasm/WASI from executing after a delay() call in some scenarios (#4239).
Fixed scheduling of runBlocking tasks on Kotlin/Native that arrive after the runBlocking block was exited (#4245).
Fixed some terminal Flow operators sometimes resuming without taking cancellation into account (#4254). Thanks, @jxdabc!
Fixed a bug on the JVM that caused coroutine-bound ThreadLocal values not to get cleaned when using non-CoroutineDispatcher continuation interceptors (#4296).
Small tweaks, fixes, and documentation improvements.
Configuration
📅Schedule: (UTC)
Branch creation
"every weekday,every weekend"
Automerge
"every weekend"
🚦Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕Ignore: Close this PR and you won't be reminded about this update again.
If you want to rebase/retry this PR, check this box
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [org.jetbrains.kotlinx:kotlinx-coroutines-test](https://github.com/Kotlin/kotlinx.coroutines) | dependencies | minor | `1.9.0` → `1.11.0` |
---
### Release Notes
<details>
<summary>Kotlin/kotlinx.coroutines (org.jetbrains.kotlinx:kotlinx-coroutines-test)</summary>
### [`v1.11.0`](https://github.com/Kotlin/kotlinx.coroutines/blob/HEAD/CHANGES.md#Version-1110)
[Compare Source](https://github.com/Kotlin/kotlinx.coroutines/compare/1.10.2...1.11.0)
##### Various
- Kotlin was updated to 2.2.20 ([#​4545](https://github.com/Kotlin/kotlinx.coroutines/issues/4545)).
- Improved the published jar files ([#​3842](https://github.com/Kotlin/kotlinx.coroutines/issues/3842), [#​4599](https://github.com/Kotlin/kotlinx.coroutines/issues/4599)).
- Various documentation improvements, including complete rewrites of structured concurrency and error handling-related KDoc ([#​4433](https://github.com/Kotlin/kotlinx.coroutines/issues/4433), [#​4596](https://github.com/Kotlin/kotlinx.coroutines/issues/4596)).
##### Breaking changes and deprecations
- Moved `Promise`-related functions from JS and Wasm/JS to the new `web` target. On Wasm/JS, this is a breaking change. Before the change, `Promise` on Wasm/JS could work with arbitrary Kotlin types, but now, only `JsAny` subtypes are accepted ([#​4563](https://github.com/Kotlin/kotlinx.coroutines/issues/4563)).
- Changed handling of coroutine exceptions that can't be propagated on JS and Wasm/JS. Before, exceptions were logged, but now, they are reported to the JS runtime ([#​4451](https://github.com/Kotlin/kotlinx.coroutines/issues/4451), [#​4631](https://github.com/Kotlin/kotlinx.coroutines/issues/4631)).
- Deprecated using `CoroutineDispatcher` as the coroutine context key; now, `ContinuationInterceptor` has to be used instead ([#​4333](https://github.com/Kotlin/kotlinx.coroutines/issues/4333)).
- Advanced the deprecation levels on `kotlinx-coroutines-test` APIs ([#​4604](https://github.com/Kotlin/kotlinx.coroutines/issues/4604)).
- Added lint functions that mark passing a `Job` to coroutine builders as deprecated ([#​4435](https://github.com/Kotlin/kotlinx.coroutines/issues/4435)).
##### Bug fixes and improvements
- Added a `callsInPlace(EXACTLY_ONCE)` contract to `runBlocking` in code shared between JVM and Native ([#​4368](https://github.com/Kotlin/kotlinx.coroutines/issues/4368)).
- Added a `callsInPlace(EXACTLY_ONCE)` contract to `suspendCancellableCoroutine` ([#​4574](https://github.com/Kotlin/kotlinx.coroutines/issues/4574)).
- Fixed `flowOn` incorrectly handling `ThreadContextElement` updates ([#​4403](https://github.com/Kotlin/kotlinx.coroutines/issues/4403)).
- Fixed exceptions in user-supplied `Thread.UncaughtExceptionHandler` instances causing the internal coroutines machinery to fail ([#​4516](https://github.com/Kotlin/kotlinx.coroutines/issues/4516)).
- Fixed `CoroutineDispatcher.asScheduler` in the RxJava integration not cancelling outstanding work when a `Worker` gets cancelled, which led to memory leaks in some scenarios ([#​4615](https://github.com/Kotlin/kotlinx.coroutines/issues/4615)).
- Fixed `SharedFlow` entering an invalid state when a subscriber and an emitter are cancelled simultaneously ([#​4583](https://github.com/Kotlin/kotlinx.coroutines/issues/4583)).
- Fixed an R8 optimization leading to `shareIn`/`stateIn` coroutines getting garbage-collected ([#​4646](https://github.com/Kotlin/kotlinx.coroutines/issues/4646)). Thanks, [@​solevic](https://github.com/solevic)!
##### Small additions
- Added `CompletableDeferred.asDeferred` for obtaining a read-only `Deferred` view ([#​4408](https://github.com/Kotlin/kotlinx.coroutines/issues/4408)).
- Added `SharedFlow.asFlow` for obtaining a `Flow` view with hidden hot flow semantics ([#​4530](https://github.com/Kotlin/kotlinx.coroutines/issues/4530)). Thanks, [@​g000sha256](https://github.com/g000sha256)!
- Added a `StateFlow.collectLatest` overload returning `Nothing` to assist with finding unreachable code ([#​4454](https://github.com/Kotlin/kotlinx.coroutines/issues/4454)).
- Added `ReceiveChannel.consumeTo` for consuming a `ReceiveChannel` into a `MutableCollection` ([#​4520](https://github.com/Kotlin/kotlinx.coroutines/issues/4520)).
- Added a `StateFlow<T>.onSubscription` overload returning a `StateFlow<T>`, similar to `SharedFlow<T>.onSubscription` returning `SharedFlow<T>` ([#​4275](https://github.com/Kotlin/kotlinx.coroutines/issues/4275)). Thanks, [@​xit0c](https://github.com/xit0c)!
- Added terminal `Flow` operators for collecting a `Flow` to a `Map` ([#​1541](https://github.com/Kotlin/kotlinx.coroutines/issues/1541)).
##### Changelog relative to version 1.11.0
No changes, only the version is increased.
### [`v1.10.2`](https://github.com/Kotlin/kotlinx.coroutines/blob/HEAD/CHANGES.md#Version-1102)
[Compare Source](https://github.com/Kotlin/kotlinx.coroutines/compare/1.10.1...1.10.2)
- Fixed the `kotlinx-coroutines-debug` JAR file including the `module-info.class` file twice, resulting in failures in various tooling ([#​4314](https://github.com/Kotlin/kotlinx.coroutines/issues/4314)). Thanks, [@​RyuNen344](https://github.com/RyuNen344)!
- Fixed `Flow.stateIn` hanging when the scope is cancelled in advance or the flow is empty ([#​4322](https://github.com/Kotlin/kotlinx.coroutines/issues/4322)). Thanks, [@​francescotescari](https://github.com/francescotescari)!
- Improved handling of dispatcher failures in `.limitedParallelism` ([#​4330](https://github.com/Kotlin/kotlinx.coroutines/issues/4330)) and during flow collection ([#​4272](https://github.com/Kotlin/kotlinx.coroutines/issues/4272)).
- Fixed `runBlocking` failing to run its coroutine to completion in some cases if its JVM thread got interrupted ([#​4399](https://github.com/Kotlin/kotlinx.coroutines/issues/4399)).
- Small tweaks, fixes, and documentation improvements.
### [`v1.10.1`](https://github.com/Kotlin/kotlinx.coroutines/blob/HEAD/CHANGES.md#Version-1101)
[Compare Source](https://github.com/Kotlin/kotlinx.coroutines/compare/1.10.0...1.10.1)
- Fixed binary incompatibility introduced for non-JVM targets in [#​4261](https://github.com/Kotlin/kotlinx.coroutines/issues/4261) ([#​4309](https://github.com/Kotlin/kotlinx.coroutines/issues/4309)).
### [`v1.10.0`](https://github.com/Kotlin/kotlinx.coroutines/blob/HEAD/CHANGES.md#Version-1100)
[Compare Source](https://github.com/Kotlin/kotlinx.coroutines/compare/1.9.0...1.10.0)
- Kotlin was updated to 2.1.0 ([#​4284](https://github.com/Kotlin/kotlinx.coroutines/issues/4284)).
- Introduced `Flow.any`, `Flow.all`, and `Flow.none` ([#​4212](https://github.com/Kotlin/kotlinx.coroutines/issues/4212)). Thanks, [@​CLOVIS-AI](https://github.com/CLOVIS-AI)!
- Reorganized `kotlinx-coroutines-debug` and `kotlinx-coroutines-core` code to avoid a split package between the two artifacts ([#​4247](https://github.com/Kotlin/kotlinx.coroutines/issues/4247)). Note that directly referencing `kotlinx.coroutines.debug.AgentPremain` must now be replaced with `kotlinx.coroutines.debug.internal.AgentPremain`. Thanks, [@​sellmair](https://github.com/sellmair)!
- No longer shade byte-buddy in `kotlinx-coroutines-debug`, reducing the artifact size and simplifying the build configuration of client code. Thanks, [@​sellmair](https://github.com/sellmair)!
- Fixed `NullPointerException` when using Java-deserialized `kotlinx-coroutines-core` exceptions ([#​4291](https://github.com/Kotlin/kotlinx.coroutines/issues/4291)). Thanks, [@​AlexRiedler](https://github.com/AlexRiedler)!
- Properly report exceptions thrown by `CoroutineDispatcher.dispatch` instead of raising internal errors ([#​4091](https://github.com/Kotlin/kotlinx.coroutines/issues/4091)). Thanks, [@​zuevmaxim](https://github.com/zuevmaxim)!
- Fixed a bug that delayed scheduling of a `Dispatchers.Default` or `Dispatchers.IO` task after a `yield()` in rare scenarios ([#​4248](https://github.com/Kotlin/kotlinx.coroutines/issues/4248)).
- Fixed a bug that prevented the `main()` coroutine on Wasm/WASI from executing after a `delay()` call in some scenarios ([#​4239](https://github.com/Kotlin/kotlinx.coroutines/issues/4239)).
- Fixed scheduling of `runBlocking` tasks on Kotlin/Native that arrive after the `runBlocking` block was exited ([#​4245](https://github.com/Kotlin/kotlinx.coroutines/issues/4245)).
- Fixed some terminal `Flow` operators sometimes resuming without taking cancellation into account ([#​4254](https://github.com/Kotlin/kotlinx.coroutines/issues/4254)). Thanks, [@​jxdabc](https://github.com/jxdabc)!
- Fixed a bug on the JVM that caused coroutine-bound `ThreadLocal` values not to get cleaned when using non-`CoroutineDispatcher` continuation interceptors ([#​4296](https://github.com/Kotlin/kotlinx.coroutines/issues/4296)).
- Small tweaks, fixes, and documentation improvements.
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- "every weekday,every weekend"
- Automerge
- "every weekend"
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNzkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI3OS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJib3QiLCJyZW5vdmF0ZSJdfQ==-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
1.9.0→1.11.0Release Notes
Kotlin/kotlinx.coroutines (org.jetbrains.kotlinx:kotlinx-coroutines-test)
v1.11.0Compare Source
Various
Breaking changes and deprecations
Promise-related functions from JS and Wasm/JS to the newwebtarget. On Wasm/JS, this is a breaking change. Before the change,Promiseon Wasm/JS could work with arbitrary Kotlin types, but now, onlyJsAnysubtypes are accepted (#4563).CoroutineDispatcheras the coroutine context key; now,ContinuationInterceptorhas to be used instead (#4333).kotlinx-coroutines-testAPIs (#4604).Jobto coroutine builders as deprecated (#4435).Bug fixes and improvements
callsInPlace(EXACTLY_ONCE)contract torunBlockingin code shared between JVM and Native (#4368).callsInPlace(EXACTLY_ONCE)contract tosuspendCancellableCoroutine(#4574).flowOnincorrectly handlingThreadContextElementupdates (#4403).Thread.UncaughtExceptionHandlerinstances causing the internal coroutines machinery to fail (#4516).CoroutineDispatcher.asSchedulerin the RxJava integration not cancelling outstanding work when aWorkergets cancelled, which led to memory leaks in some scenarios (#4615).SharedFlowentering an invalid state when a subscriber and an emitter are cancelled simultaneously (#4583).shareIn/stateIncoroutines getting garbage-collected (#4646). Thanks, @solevic!Small additions
CompletableDeferred.asDeferredfor obtaining a read-onlyDeferredview (#4408).SharedFlow.asFlowfor obtaining aFlowview with hidden hot flow semantics (#4530). Thanks, @g000sha256!StateFlow.collectLatestoverload returningNothingto assist with finding unreachable code (#4454).ReceiveChannel.consumeTofor consuming aReceiveChannelinto aMutableCollection(#4520).StateFlow<T>.onSubscriptionoverload returning aStateFlow<T>, similar toSharedFlow<T>.onSubscriptionreturningSharedFlow<T>(#4275). Thanks, @xit0c!Flowoperators for collecting aFlowto aMap(#1541).Changelog relative to version 1.11.0
No changes, only the version is increased.
v1.10.2Compare Source
kotlinx-coroutines-debugJAR file including themodule-info.classfile twice, resulting in failures in various tooling (#4314). Thanks, @RyuNen344!Flow.stateInhanging when the scope is cancelled in advance or the flow is empty (#4322). Thanks, @francescotescari!.limitedParallelism(#4330) and during flow collection (#4272).runBlockingfailing to run its coroutine to completion in some cases if its JVM thread got interrupted (#4399).v1.10.1Compare Source
v1.10.0Compare Source
Flow.any,Flow.all, andFlow.none(#4212). Thanks, @CLOVIS-AI!kotlinx-coroutines-debugandkotlinx-coroutines-corecode to avoid a split package between the two artifacts (#4247). Note that directly referencingkotlinx.coroutines.debug.AgentPremainmust now be replaced withkotlinx.coroutines.debug.internal.AgentPremain. Thanks, @sellmair!kotlinx-coroutines-debug, reducing the artifact size and simplifying the build configuration of client code. Thanks, @sellmair!NullPointerExceptionwhen using Java-deserializedkotlinx-coroutines-coreexceptions (#4291). Thanks, @AlexRiedler!CoroutineDispatcher.dispatchinstead of raising internal errors (#4091). Thanks, @zuevmaxim!Dispatchers.DefaultorDispatchers.IOtask after ayield()in rare scenarios (#4248).main()coroutine on Wasm/WASI from executing after adelay()call in some scenarios (#4239).runBlockingtasks on Kotlin/Native that arrive after therunBlockingblock was exited (#4245).Flowoperators sometimes resuming without taking cancellation into account (#4254). Thanks, @jxdabc!ThreadLocalvalues not to get cleaned when using non-CoroutineDispatchercontinuation interceptors (#4296).Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.