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

Merge with parent project #3

Merged
merged 166 commits into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
e8705fe
Remove unused AbstractChannel.describeSendConflated
elizarov Mar 18, 2020
3fdd3fe
Refactor select impl to make its internal state easier to understand
elizarov Mar 19, 2020
5b610bb
Fix publication validator not looking in the local maven repository (…
dkhalanskyjb Mar 27, 2020
9cbad7d
Enable strict explicit mode (#1877)
qwwdfsad Mar 27, 2020
96b41b4
Fix DefaultExecutor not being able to exit (#1876)
dkhalanskyjb Mar 30, 2020
a3384a8
Removed extra non working SharedImmutable annotations (#1892)
Mar 31, 2020
52dcddc
Merge remote-tracking branch 'origin/master' into develop
elizarov Mar 31, 2020
6e66695
Fix leak of subscription reference in closed ArrayBroadcastChannel (#…
elizarov Mar 31, 2020
b2bc70b
Correct JDK version typo (#1903)
MMoskowitz9 Apr 5, 2020
df8316f
Update CoroutineScope docs (#1882)
elizarov Apr 6, 2020
02b403d
BlockHound integration (#1873)
dkhalanskyjb Apr 6, 2020
de29acd
Flow onEmpty (#1904)
qwwdfsad Apr 7, 2020
532368f
Update Kotlin version to 1.3.71 (#1906)
qwwdfsad Apr 7, 2020
2ff0bbb
Full Apache 2.0 license text
elizarov Apr 8, 2020
d75d02a
Make the list of segments more abstract (#1563)
ndkoval Apr 10, 2020
5eaf83c
Fix in gradle for JS IR in case it doesn't exist (#1912)
Apr 13, 2020
a35e5dc
GitHub issue/pr links in IDEA Git log (#1920)
turansky Apr 20, 2020
ae6b2c4
JetBrains Toolbox icon (#1926)
turansky Apr 20, 2020
94970df
Improve docs for CoroutineExceptionHandler (#1886)
elizarov Apr 22, 2020
dc8eeb0
Migrate to androidx.annotation from legacy android.support.annotion (…
elizarov Apr 22, 2020
ac42be9
Add linearizability tests for Mutex and Semaphore and fix them (#1898)
ndkoval Apr 23, 2020
bd7ac85
Merge remote-tracking branch 'origin/master' into develop
qwwdfsad Apr 24, 2020
70a7487
Extract debugger (#1905)
qwwdfsad Apr 24, 2020
64d23a0
Kotlin DSL. Add version extension (#1939)
turansky Apr 24, 2020
3250e47
Integration with RxJava3 (#1950)
qwwdfsad Apr 24, 2020
5073704
Remove unused Gradle wrapper (#1958)
turansky Apr 27, 2020
eb4e7d3
Breaking change: Experimental Flow.onCompletion contract for cause (#…
elizarov Apr 27, 2020
cd5ab49
Setup cancellation eagerly in suspendCancellableCoroutine to properly…
qwwdfsad Apr 27, 2020
515e86a
Add a lincheck test for `remove` in the segment list algorithm (#1964)
ndkoval Apr 28, 2020
5b00e48
Remove experimental status from Flow API (#1963)
qwwdfsad Apr 28, 2020
a8f4b64
Common java version method (#1965)
turansky Apr 28, 2020
76e6440
Gradle 6.3
h0tk3y Apr 17, 2020
52135fb
Fix JS example warnings (#1968)
turansky Apr 28, 2020
d5766f3
Revert "Gradle 6.3"
elizarov Apr 29, 2020
be85455
Fix class cast exception during undispatched resume of cancellable co…
qwwdfsad Apr 29, 2020
8d6e464
Support thread interrupting blocking functions (#1972)
qwwdfsad Apr 29, 2020
0f15812
Kts transition (#1951)
qwwdfsad Apr 29, 2020
9982979
Plugin versions in 'plugins' block (#1977)
turansky May 2, 2020
1beebf1
'reactor_vesion' -> 'reactor_veRsion' (#1976)
turansky May 2, 2020
de38890
Platform util in 'buildSrc' (#1969)
turansky May 2, 2020
18f68ad
Use standard random API (#1988)
turansky May 6, 2020
5ecebe1
Fix logic that determines future removal for scheduled executors (#1995)
elizarov May 7, 2020
134a4bc
Improve docs & code style in runInterruptibe (#1994)
elizarov May 7, 2020
171fcc1
Fix typos in comments to ticker channels (#1987)
vadimsemenov May 3, 2020
9291b00
Additional VCS configuration options
elizarov May 7, 2020
1541886
StateFlow implementation (#1974)
elizarov May 7, 2020
a922194
Version 1.3.6
qwwdfsad May 8, 2020
583ec6e
Merge pull request #2001 from Kotlin/version-1.3.6
qwwdfsad May 8, 2020
32feba8
Added copyright profile settings
elizarov May 12, 2020
3b753d9
Fix typo in doc (their->they) (#2014)
selectAll May 12, 2020
10acaf2
Remove a reference to a missing close method from MutableStateFlow do…
elizarov May 12, 2020
e47cb35
Add project JDK convention (#1984)
turansky May 12, 2020
cfb5af4
IDEA Project code-style settings (#2021)
elizarov May 13, 2020
559023d
Add compileOnly android annotations and suppress lint for agent prema…
qwwdfsad May 14, 2020
4511c23
Restore java configuration for 'benchmarks' (#2027)
turansky May 15, 2020
e470df9
Mutex.withLock() and Semaphore.withPermit() with EXACTLY_ONCE contrac…
ZhouGongZaiShi May 15, 2020
397f10e
Introduce EXACTLY_ONCE contracts to coroutineScope, supervisorScope, …
qwwdfsad May 15, 2020
2c99a10
Include 'javafx' project for JDK 11+ (#2022)
turansky May 15, 2020
5a20585
Flow cancellation (#2028)
qwwdfsad May 18, 2020
7382bb3
Improved Job docs (#2035)
elizarov May 19, 2020
b3f7be2
Version 1.3.7
qwwdfsad May 19, 2020
1eeed50
Merge pull request #2037 from Kotlin/version-1.3.7
qwwdfsad May 19, 2020
17248c8
Fixes for 1.4-M2 & HMPP (#2031)
h0tk3y May 22, 2020
adbbbaa
Properly check identity of caught AbortFlowException in Flow.first op…
qwwdfsad May 27, 2020
1bd4349
Fixed val counter AtomicInteger in shared state example (#2063)
elizarov May 27, 2020
6391089
Adopt Kotlin/JS for 1.4-M2 (#2060)
ilgonmic May 28, 2020
3a8a0ea
Remove keep rules mentioning kotlinx.coroutines.android from core mod…
mkj-gram May 29, 2020
0e93a38
Fix word omission (#2071)
0xbayo Jun 1, 2020
0bf172b
Fix jvm dependency on Android annotations (#2075)
elizarov Jun 2, 2020
41f3755
Make RunInterruptibleStressTest more straightforward, get rid of Disp…
qwwdfsad Jun 2, 2020
f13549a
In all documentation "get the full code here" (#2076)
medavox Jun 2, 2020
cdbdba9
Improve grammar in docs/basics (#2076)
medavox Jun 2, 2020
9bbb669
Improve the docs and guide on flow cancellation (#2043)
elizarov Jun 3, 2020
4b16e1b
Ignore API change in kotlinx-coroutines-core in train build
erokhins Jun 9, 2020
68360e0
Fix missing unbox state in native runBlocking (#2091)
qwwdfsad Jun 16, 2020
ad542c4
Minor improvements of debugging experience (#2093)
qwwdfsad Jun 17, 2020
de61a74
Fixed invalid self-links to index.md in docs
elizarov Jun 26, 2020
ff4b2ce
Do not print error message to the console when we've failed to instal…
qwwdfsad Jul 2, 2020
755d76b
Fix ensureAction to work in the empty context case (#2119)
elizarov Jul 2, 2020
634b907
Merge remote-tracking branch 'origin/master' into develop
elizarov Jul 3, 2020
f4fb204
Fix typos in docs (#2098)
Inego Jun 21, 2020
3744f8e
Merge remote-tracking branch 'origin/master' into develop
elizarov Jul 3, 2020
75dede3
Removed unused NativeThreadLocal declaration
elizarov Jul 8, 2020
5183b62
Replace references to deprecated delayEach operator (#2127)
thibseisel Jul 9, 2020
b42f986
Flow.transformWhile operator (#2066)
elizarov Jul 16, 2020
5e91dc4
Replace scanReduce with runningReduce to be consistent with Kotlin st…
qwwdfsad Jul 16, 2020
ccdc563
Rename 'foo' function to 'simple' in flow docs (#2078)
elizarov Jul 16, 2020
d718970
Fix race in Flow.asPublisher (#2124)
elizarov Jul 16, 2020
64571aa
Merge remote-tracking branch 'origin/master' into develop
elizarov Jul 16, 2020
b7d6518
Consistent toString for MainCoroutineDispatcher implementations (#2131)
elizarov Jul 16, 2020
5705372
Increase timeout in the example to make sure it fails with threads (#…
elizarov Jul 16, 2020
c05de88
Coroutines debugger should keep weak references to running coroutines…
elizarov Jul 16, 2020
d55d8e8
Version 1.3.8
elizarov Jul 16, 2020
e60bcbd
Fix hanging RunInterruptibleStressTest on Windows with JDK 1.6 (#2145)
elizarov Jul 17, 2020
716d21c
Fix docs for CancellableContinuation (#2112)
1zaman Jul 20, 2020
3cc9b94
Add a keep rule for AndroidDispatcherFactory for R8 version > 1.6.0 (…
OscarSpruit Jul 21, 2020
9139c64
Add missing article (#2180)
MasoodFallahpoor Aug 5, 2020
1a6beba
Support context in Flow.asPublisher and similar methods (#2156)
elizarov Aug 10, 2020
abc6cd8
Feat: updated debugging coroutines in the documentation (#2191)
katia-energizer Aug 12, 2020
6f01402
Update api dump for 1.4.0 compiler
erokhins Jul 15, 2020
2d0d9aa
Version 1.3.9
qwwdfsad Aug 13, 2020
807d628
Update flow.md (#2196)
MasoodFallahpoor Aug 14, 2020
a61c6cc
Update typo in flow.md (#2199)
shubham08gupta Aug 15, 2020
6649745
Add missing 'the' (#2200)
jsoendermann Aug 17, 2020
398fee2
Update documentation
qwwdfsad Aug 13, 2020
247b34c
Merge pull request #2203 from Kotlin/version-1.3.9
qwwdfsad Aug 17, 2020
bbc99b9
Remove redundant release step, it has been automated by try.kotlinlan…
qwwdfsad Aug 17, 2020
a34a4fc
Fix some sample outputs not being displayed in flow.md (#2201)
MasoodFallahpoor Aug 18, 2020
0436576
Remove redundant and flaky (due to its nature, not implementation pro…
qwwdfsad Aug 19, 2020
230ade7
Fix sporadic ConcurrentWeakMapTest failures (#2187)
qwwdfsad Aug 20, 2020
1ec50fe
Fix typos in gradle.properties (#2211)
LouisCAD Aug 24, 2020
a8bfc0e
Cherry-picks from native-mt branch to reduce maintenance burden (#2204)
qwwdfsad Aug 24, 2020
3cbf4ad
Kotlin and Slack channel shields (#2205)
turansky Aug 24, 2020
63156a8
Add space staging repository
qwwdfsad Aug 24, 2020
964cd92
Transition to the Gradle kts
turansky May 2, 2020
fcaa6df
Migrate examples to new JS plugin
qwwdfsad Aug 24, 2020
fe2fedc
New Kotlin/JVM & Kotlin/Multiplatform plugins (#2018)
turansky Aug 27, 2020
0cab30b
Contributing Guidelines (#2232)
elizarov Sep 8, 2020
879881e
Fixed CoroutinesScope.ensureActive docs (#2242)
elizarov Sep 11, 2020
2d0686b
Add awaitCancellation (#2225)
LouisCAD Sep 2, 2020
85b1a2b
Support JetBrains cache-redirector service for stable CI builds (#2247)
elizarov Sep 14, 2020
5dd94a3
Add Publisher.awaitSingleOrDefault|Null|Else extensions (#2260)
sdeleuze Sep 22, 2020
5b71210
Lint settings for 1.4 (#2038)
qwwdfsad Sep 30, 2020
f02aadc
Remove parent.start() from CancellableContinuationImpl.kt (#2036)
qwwdfsad Sep 30, 2020
d2ed1d8
Fix wrong Proguard rules (#2273)
dkhalanskyjb Oct 1, 2020
4c28f94
Update exception-handling.md (#2271)
MasoodFallahpoor Oct 1, 2020
3af136f
Kts transition (#2261)
qwwdfsad Oct 5, 2020
3cb61fc
Clarify the env requirements in CONTRIBUTING.md (#2281)
ansman Oct 7, 2020
2554f56
Consistent JDK versions in CONTRIBUTING.md
elizarov Oct 8, 2020
d4c55ce
Clarify documentation for IO dispatcher (#2286)
qwwdfsad Oct 8, 2020
448106a
Provide asFlowable and asObservable by their names in binary instead …
qwwdfsad Oct 8, 2020
7897f70
Pr/2230 (#2287)
qwwdfsad Oct 8, 2020
b97ebfc
Update Flow.sample KDoc example timings, add tests (#2259)
elizarov Oct 8, 2020
20ca97a
Added docs on withTimeout asynchrony and its use with resources (#2252)
elizarov Oct 8, 2020
b82439e
Document problems with building coroutines-using Android projects (#2…
dkhalanskyjb Oct 9, 2020
20341f2
Cancel current Job on RejectedExecutionException (#2012)
elizarov Oct 9, 2020
738f5a2
Refactor mpp/native build, introduce "concurrent" source set, test la…
elizarov Oct 12, 2020
8773a26
Breaking: Get rid of atomic cancellation and provide a replacement (#…
elizarov Oct 12, 2020
030aee4
Fixed FlowOnTest after the merge of branches
elizarov Oct 12, 2020
401c05c
Updated the docs on IDEA debugging (#2244)
koshachy Oct 13, 2020
34c3464
Introduce SharedFlow and sharing operators (#2069)
elizarov Oct 13, 2020
c92cec3
Merge remote-tracking branch 'origin/master' into develop
qwwdfsad Oct 13, 2020
f3a9b60
Version 1.4.0-M1
qwwdfsad Oct 13, 2020
1b34e1c
Merge pull request #2297 from Kotlin/version-1.4.0-M1
qwwdfsad Oct 13, 2020
863258b
Fixed RejectedExecutionTest on JDK1.6
elizarov Oct 13, 2020
3f108cb
Update shared-mutable-state-and-concurrency.md (#2309)
MasoodFallahpoor Oct 16, 2020
eb1b5db
Fix doc references that differ only in case (function vs interface) (…
elizarov Oct 16, 2020
20ad25f
Disable SecurityManager when IDEA is active
qwwdfsad Oct 16, 2020
993c192
Cleanup lazy coroutines that have been cancelled but not yet garbage …
qwwdfsad Oct 19, 2020
e941da2
Remove workaround for KT-42671 that triggers test failures from IDEA …
qwwdfsad Oct 19, 2020
9eaa9c6
Introduce CoroutineContext.job extension (#2312)
qwwdfsad Oct 19, 2020
9587590
Combine and zip rework (#2308)
qwwdfsad Oct 20, 2020
768e92b
Grammar correction on the Contribution.md file (#2321)
bluesky15 Oct 20, 2020
6843648
Release intercepted SafeCollector when onCompletion block is done (#2…
qwwdfsad Oct 22, 2020
3275d22
Propagate exception from stateIn to the caller when the upstream fail…
qwwdfsad Oct 22, 2020
22c4301
Propagate kotlin_snapshot_version to buildSrc and kts files (#2332)
qwwdfsad Oct 23, 2020
8df6f5a
Fix race condition in testUpstreamFailedImmediatelyWithInitialValue
qwwdfsad Oct 23, 2020
ee78090
Fix potential crash in Rx2 and Rx3 asFlow extension (#2333)
qwwdfsad Oct 23, 2020
45ba58e
Fix BlockHound false positives (#2331)
dkhalanskyjb Oct 26, 2020
53f007f
Fix SharedFlow with replay for subscribers working at different speed…
elizarov Oct 26, 2020
92db4e1
Add debounce with selector and kotlin.time (#2336)
elizarov Oct 26, 2020
e16eb9d
Update experimental declarations (#2316)
qwwdfsad Oct 26, 2020
727dd58
Merge remote-tracking branch 'origin/master' into develop
qwwdfsad Oct 26, 2020
f1e35a0
Version 1.4.0
qwwdfsad Oct 26, 2020
00da1ac
Acknowledge external contributors
qwwdfsad Oct 26, 2020
4ea4078
Merge pull request #2337 from Kotlin/version-1.4.0
qwwdfsad Oct 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.idea
**/.idea/*
!/.idea/icon.png
!/.idea/vcs.xml
!/.idea/copyright
!/.idea/codeStyleSettings.xml
!/.idea/codeStyles
*.iml
.gradle
.gradletasknamecache
build
out
target
local.properties
local.properties
8 changes: 8 additions & 0 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/copyright/kotlinx_coroutines.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

114 changes: 114 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,119 @@
# Change log for kotlinx.coroutines

## Version 1.4.0

### Improvements

* `StateFlow`, `SharedFlow` and corresponding operators are promoted to stable API (#2316).
* `Flow.debounce` operator with timeout selector based on each individual element is added (#1216, thanks to @mkano9!).
* `CoroutineContext.job` extension property is introduced (#2159).
* `Flow.combine operator` is reworked:
* Complete fairness is maintained for single-threaded dispatchers.
* Its performance is improved, depending on the use-case, by at least 50% (#2296).
* Quadratic complexity depending on the number of upstream flows is eliminated (#2296).
* `crossinline` and `inline`-heavy internals are removed, fixing sporadic SIGSEGV on Mediatek Android devices (#1683, #1743).
* `Flow.zip` operator performance is improved by 40%.
* Various API has been promoted to stable or its deprecation level has been raised (#2316).

### Bug fixes

* Suspendable `stateIn` operator propagates exception to the caller when upstream fails to produce initial value (#2329).
* Fix `SharedFlow` with replay for subscribers working at different speed (#2325).
* Do not fail debug agent installation when security manager does not provide access to system properties (#2311).
* Cancelled lazy coroutines are properly cleaned up from debug agent output (#2294).
* `BlockHound` false-positives are correctly filtered out (#2302, #2190, #2303).
* Potential crash during a race between cancellation and upstream in `Observable.asFlow` is fixed (#2104, #2299, thanks to @LouisCAD and @drinkthestars).

## Version 1.4.0-M1

### Breaking changes

* The concept of atomic cancellation in channels is removed. All operations in channels
and corresponding `Flow` operators are cancellable in non-atomic way (#1813).
* If `CoroutineDispatcher` throws `RejectedExecutionException`, cancel current `Job` and schedule its execution to `Dispatchers.IO` (#2003).
* `CancellableContinuation.invokeOnCancellation` is invoked if the continuation was cancelled while its resume has been dispatched (#1915).
* `Flow.singleOrNull` operator is aligned with standard library and does not longer throw `IllegalStateException` on multiple values (#2289).

### New experimental features

* `SharedFlow` primitive for managing hot sources of events with support of various subscription mechanisms, replay logs and buffering (#2034).
* `Flow.shareIn` and `Flow.stateIn` operators to transform cold instances of flow to hot `SharedFlow` and `StateFlow` respectively (#2047).

### Other

* Support leak-free closeable resources transfer via `onUndeliveredElement` in channels (#1936).
* Changed ABI in reactive integrations for Java interoperability (#2182).
* Fixed ProGuard rules for `kotlinx-coroutines-core` (#2046, #2266).
* Lint settings were added to `Flow` to avoid accidental capturing of outer `CoroutineScope` for cancellation check (#2038).

### External contributions

* Allow nullable types in `Flow.firstOrNull` and `Flow.singleOrNull` by @ansman (#2229).
* Add `Publisher.awaitSingleOrDefault|Null|Else` extensions by @sdeleuze (#1993).
* `awaitCancellation` top-level function by @LouisCAD (#2213).
* Significant part of our Gradle build scripts were migrated to `.kts` by @turansky.

Thank you for your contributions and participation in the Kotlin community!

## Version 1.3.9

* Support of `CoroutineContext` in `Flow.asPublisher` and similar reactive builders (#2155).
* Kotlin updated to 1.4.0.
* Transition to new HMPP publication scheme for multiplatform usages:
* Artifacts `kotlinx-coroutines-core-common` and `kotlinx-coroutines-core-native` are removed.
* For multiplatform usages, it's enough to [depend directly](README.md#multiplatform) on `kotlinx-coroutines-core` in `commonMain` source-set.
* The same artifact coordinates can be used to depend on platform-specific artifact in platform-specific source-set.

## Version 1.3.8

### New experimental features

* Added `Flow.transformWhile operator` (#2065).
* Replaced `scanReduce` with `runningReduce` to be consistent with the Kotlin standard library (#2139).

### Bug fixes and improvements

* Improve user experience for the upcoming coroutines debugger (#2093, #2118, #2131).
* Debugger no longer retains strong references to the running coroutines (#2129).
* Fixed race in `Flow.asPublisher` (#2109).
* Fixed `ensureActive` to work in the empty context case to fix `IllegalStateException` when using flow from `suspend fun main` (#2044).
* Fixed a problem with `AbortFlowException` in the `Flow.first` operator to avoid erroneous `NoSuchElementException` (#2051).
* Fixed JVM dependency on Android annotations (#2075).
* Removed keep rules mentioning `kotlinx.coroutines.android` from core module (#2061 by @mkj-gram).
* Corrected some docs and examples (#2062, #2071, #2076, #2107, #2098, #2127, #2078, #2135).
* Improved the docs and guide on flow cancellation (#2043).
* Updated Gradle version to `6.3` (it only affects multiplatform artifacts in this release).

## Version 1.3.7

* Fixed problem that triggered Android Lint failure (#2004).
* New `Flow.cancellable()` operator for cooperative cancellation (#2026).
* Emissions from `flow` builder now check cancellation status and are properly cancellable (#2026).
* New `currentCoroutineContext` function to use unambiguously in the contexts with `CoroutineScope` in receiver position (#2026).
* `EXACTLY_ONCE` contract support in coroutine builders.
* Various documentation improvements.

## Version 1.3.6

### Flow

* `StateFlow`, new primitive for state handling (#1973, #1816, #395). The `StateFlow` is designed to eventually replace `ConflatedBroadcastChannel` for state publication scenarios. Please, try it and share your feedback. Note, that Flow-based primitives to publish events will be added later. For events you should continue to either use `BroadcastChannel(1)`, if you put events into the `StateFlow`, protect them from double-processing with flags.
* `Flow.onEmpty` operator is introduced (#1890).
* Behavioural change in `Flow.onCompletion`, it is aligned with `invokeOnCompletion` now and passes `CancellationException` to its cause parameter (#1693).
* A lot of Flow operators have left its experimental status and are promoted to stable API.

### Other

* `runInterruptible` primitive to tie cancellation with thread interruption for blocking calls. Contributed by @jxdabc (#1947).
* Integration module with RxJava3 is introduced. Contributed by @ZacSweers (#1883)
* Integration with [BlockHound](https://github.com/reactor/BlockHound) in `kotlinx-coroutines-debug` module (#1821, #1060).
* Memory leak in ArrayBroadcastChannel is fixed (#1885).
* Behavioural change in `suspendCancellableCoroutine`, cancellation is established before invoking passed block argument (#1671).
* Debug agent internals are moved into `kotlinx-coroutines-core` for better integration with IDEA. It should not affect library users and all the redundant code should be properly eliminated with R8.
* ClassCastException with reusable continuations bug is fixed (#1966).
* More precise scheduler detection for `Executor.asCoroutineDispatcher` (#1992).
* Kotlin updated to 1.3.71.

## Version 1.3.5

* `firstOrNull` operator. Contributed by @bradynpoulsen.
Expand Down
113 changes: 113 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Contributing Guidelines

There are two main ways to contribute to the project — submitting issues and submitting
fixes/changes/improvements via pull requests.

## Submitting issues

Both bug reports and feature requests are welcome.
Submit issues [here](https://github.com/Kotlin/kotlinx.coroutines/issues).

* Search for existing issues to avoid reporting duplicates.
* When submitting a bug report:
* Test it against the most recently released version. It might have been already fixed.
* By default, we assume that your problem reproduces in Kotlin/JVM. Please, mention if the problem is
specific to Kotlin/JS or Kotlin/Native.
* Include the code that reproduces the problem. Provide the complete reproducer code, yet minimize it as much as possible.
* However, don't put off reporting any weird or rarely appearing issues just because you cannot consistently
reproduce them.
* If the bug is in behavior, then explain what behavior you've expected and what you've got.
* When submitting a feature request:
* Explain why you need the feature — what's your use-case, what's your domain.
* Explaining the problem you face is more important than suggesting a solution.
Report your problem even if you don't have any proposed solution.
* If there is an alternative way to do what you need, then show the code of the alternative.

## Submitting PRs

We love PRs. Submit PRs [here](https://github.com/Kotlin/kotlinx.coroutines/pulls).
However, please keep in mind that maintainers will have to support the resulting code of the project,
so do familiarize yourself with the following guidelines.

* All development (both new features and bug fixes) is performed in the `develop` branch.
* The `master` branch always contains sources of the most recently released version.
* Base PRs against the `develop` branch.
* The `develop` branch is pushed to the `master` branch during release.
* Documentation in markdown files can be updated directly in the `master` branch,
unless the documentation is in the source code, and the patch changes line numbers.
* If you fix documentation:
* After fixing/changing code examples in the [`docs`](docs) folder or updating any references in the markdown files
run the [Knit tool](#running-the-knit-tool) and commit the resulting changes as well.
It will not pass the tests otherwise.
* If you plan extensive rewrites/additions to the docs, then please [contact the maintainers](#contacting-maintainers)
to coordinate the work in advance.
* If you make any code changes:
* Follow the [Kotlin Coding Conventions](https://kotlinlang.org/docs/reference/coding-conventions.html).
Use 4 spaces for indentation.
* [Build the project](#building) to make sure it all works and passes the tests.
* If you fix a bug:
* Write the test that reproduces the bug.
* Fixes without tests are accepted only in exceptional circumstances if it can be shown that writing the
corresponding test is too hard or otherwise impractical.
* Follow the style of writing tests that is used in this project:
name test functions as `testXxx`. Don't use backticks in test names.
* If you introduce any new public APIs:
* All new APIs must come with documentation and tests.
* All new APIs are initially released with `@ExperimentalCoroutineApi` annotation and are graduated later.
* [Update the public API dumps](#updating-the-public-api-dump) and commit the resulting changes as well.
It will not pass the tests otherwise.
* If you plan large API additions, then please start by submitting an issue with the proposed API design
to gather community feedback.
* [Contact the maintainers](#contacting-maintainers) to coordinate any big piece of work in advance.
* Comment on the existing issue if you want to work on it. Ensure that the issue not only describes a problem,
but also describes a solution that had received a positive feedback. Propose a solution if there isn't any.
* Steps for contributing new integration modules are explained [here](integration/README.md#Contributing).

## Building

This library is built with Gradle.

* Run `./gradlew build` to build. It also runs all the tests.
* Run `./gradlew <module>:test` to test the module you are looking at to speed
things up during development.
* Run `./gradlew jvmTest` to perform only fast JVM tests of the core multiplatform module.

You can import this project into IDEA, but you have to delegate build actions
to Gradle (in Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle -> Runner)

### Environment requirements

* JDK >= 11 referred to by the `JAVA_HOME` environment variable.
* JDK 1.6 referred to by the `JDK_16` environment variable.
It is OK to have `JDK_16` pointing to a non 1.6 JDK (e.g. `JAVA_HOME`) for external contributions.
* JDK 1.8 referred to by the `JDK_18` environment variable. Only used by nightly stress-tests.
It is OK to have `JDK_18` to a non 1.8 JDK (e.g. `JAVA_HOME`) for external contributions.

For external contributions you can for example add this to your shell startup scripts (e.g. `~/.zshrc`):
```shell
# This assumes JAVA_HOME is set already to a JDK >= 11 version
export JDK_16="$JAVA_HOME"
export JDK_18="$JAVA_HOME"
```

### Running the Knit tool

* Use [Knit](https://github.com/Kotlin/kotlinx-knit/blob/master/README.md) for updates to documentation:
* Run `./gradlew knit` to update example files, links, tables of content.
* Commit updated documents and examples together with other changes.

### Updating the public API dump

* Use [Binary Compatibility Validator](https://github.com/Kotlin/binary-compatibility-validator/blob/master/README.md) for updates to public API:
* Run `./gradlew apiDump` to update API index files.
* Commit updated API indexes together with other changes.

## Releases

* Full release procedure checklist is [here](RELEASE.md).

## Contacting maintainers

* If something cannot be done, not convenient, or does not work &mdash; submit an [issue](#submitting-issues).
* "How to do something" questions &mdash; [StackOverflow](https://stackoverflow.com).
* Discussions and general inquiries &mdash; use `#coroutines` channel in [KotlinLang Slack](https://kotl.in/slack).
Loading