Skip to content

Commit 706e393

Browse files
committed
Dokka fixes
* Provide module with Kotlin 1.3 API because Kotlin 1.2 from Dokka can't read classes marked as "from the future" * Add runConfiguration dokkaStubs which is included only during dokka task with some classpath magic for Kotlin 1.3 * Add package.list for slf4j * Fix unresolved types/links in documentation * Suppress all internal/inherited API
1 parent b6eca2a commit 706e393

File tree

33 files changed

+178
-39
lines changed

33 files changed

+178
-39
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ configure(subprojects.findAll { !sourceless.contains(it.name) }) {
103103

104104
// --------------- Configure sub-projects that are part of the library ---------------
105105

106-
def internal = sourceless + ['benchmarks', 'knit', 'js-stub', 'binary-compatibility-validator']
106+
def internal = sourceless + ['benchmarks', 'knit', 'js-stub', 'stdlib-stubs', 'binary-compatibility-validator']
107107

108108
// Reconfigure source sets to avoid long "src/main/kotlin/fqn"
109109
configure(subprojects.findAll { !it.name.contains(sourceless) && it.name != "benchmarks" }) {

common/kotlinx-coroutines-core-common/src/CoroutineContext.common.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ package kotlinx.coroutines
66

77
import kotlin.coroutines.*
88

9+
/**
10+
* Creates context for the new coroutine. It installs [Dispatchers.Default] when no other dispatcher nor
11+
* [ContinuationInterceptor] is specified, and adds optional support for debugging facilities (when turned on).
12+
*/
913
public expect fun CoroutineScope.newCoroutineContext(context: CoroutineContext): CoroutineContext
1014

1115
internal expect fun createDefaultDispatcher(): CoroutineDispatcher

common/kotlinx-coroutines-core-common/src/CoroutineDispatcher.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public abstract class CoroutineDispatcher :
103103
)
104104
public operator fun plus(other: CoroutineDispatcher) = other
105105

106-
// for nicer debugging
106+
/** @suppress for nicer debugging */
107107
override fun toString(): String = "$classSimpleName@$hexAddress"
108108
}
109109

common/kotlinx-coroutines-core-common/src/CoroutineScope.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ import kotlin.coroutines.*
5858
* ```
5959
*/
6060
public interface CoroutineScope {
61-
6261
/**
6362
* Context of this scope.
6463
*/

common/kotlinx-coroutines-core-common/src/Delay.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import kotlin.coroutines.*
1616
*
1717
* @suppress **This an internal API and should not be used from general code.**
1818
*/
19-
@InternalCoroutinesApi // todo: Remove references from other docs
19+
@InternalCoroutinesApi
2020
public interface Delay {
2121
/**
2222
* Delays coroutine for a given time without blocking a thread and resumes it after a specified time.
@@ -65,9 +65,7 @@ public interface Delay {
6565
*
6666
* Note, that delay can be used in [select] invocation with [onTimeout][SelectBuilder.onTimeout] clause.
6767
*
68-
* This function delegates to [Delay.scheduleResumeAfterDelay] if the context [CoroutineDispatcher]
69-
* implements [Delay] interface, otherwise it resumes using a built-in single-threaded scheduled executor service.
70-
*
68+
* Implementation note: how exactly time is tracked is an implementation detail of [CoroutineDispatcher] in the context.
7169
* @param timeMillis time in milliseconds.
7270
*/
7371
public suspend fun delay(timeMillis: Long) {

common/kotlinx-coroutines-core-common/src/Exceptions.common.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
package kotlinx.coroutines
66

7+
/**
8+
* @suppress **This an internal API and should not be used from general code.**
9+
*/
710
@InternalCoroutinesApi
811
public expect class CompletionHandlerException(message: String, cause: Throwable) : RuntimeException
912

common/kotlinx-coroutines-core-common/src/NonCancellable.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55

66
package kotlinx.coroutines
77

8-
import kotlinx.coroutines.NonCancellable.isActive
98
import kotlinx.coroutines.selects.*
109
import kotlin.coroutines.*
1110

1211
/**
13-
* A non-cancelable job that is always [active][isActive]. It is designed for [withContext] function
12+
* A non-cancelable job that is always [active][Job.isActive]. It is designed for [withContext] function
1413
* to prevent cancellation of code blocks that need to be executed without cancellation.
1514
*
1615
* Use it like this:
@@ -26,7 +25,7 @@ public object NonCancellable : AbstractCoroutineContextElement(Job), Job {
2625
* @suppress **This an internal API and should not be used from general code.**
2726
*/
2827
@InternalCoroutinesApi
29-
override val isActive: Boolean get() = true
28+
override val isActive: Boolean get() = true
3029

3130
/**
3231
* Always returns `false`.

common/kotlinx-coroutines-core-common/src/Runnable.common.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
package kotlinx.coroutines
66

7+
/** @suppress */
78
public expect interface Runnable {
89
public fun run()
910
}

common/kotlinx-coroutines-core-common/src/Timeout.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import kotlin.coroutines.intrinsics.*
2020
* The sibling function that does not throw exception on timeout is [withTimeoutOrNull].
2121
* Note, that timeout action can be specified for [select] invocation with [onTimeout][SelectBuilder.onTimeout] clause.
2222
*
23-
* This function delegates to [Delay.invokeOnTimeout] if the context [CoroutineDispatcher]
24-
* implements [Delay] interface, otherwise it tracks time using a built-in single-threaded scheduled executor service.
23+
* Implementation note: how exactly time is tracked is an implementation detail of [CoroutineDispatcher] in the context.
2524
*
2625
* @param timeMillis timeout time in milliseconds.
2726
*/
@@ -42,8 +41,7 @@ public suspend fun <T> withTimeout(timeMillis: Long, block: suspend CoroutineSco
4241
* The sibling function that throws exception on timeout is [withTimeout].
4342
* Note, that timeout action can be specified for [select] invocation with [onTimeout][SelectBuilder.onTimeout] clause.
4443
*
45-
* This function delegates to [Delay.invokeOnTimeout] if the context [CoroutineDispatcher]
46-
* implements [Delay] interface, otherwise it tracks time using a built-in single-threaded scheduled executor service.
44+
* Implementation note: how exactly time is tracked is an implementation detail of [CoroutineDispatcher] in the context.
4745
*
4846
* @param timeMillis timeout time in milliseconds.
4947
*/

common/kotlinx-coroutines-core-common/src/channels/Channel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public interface ChannelIterator<out E> {
342342
* while previously sent elements **are lost**.
343343
* Sender to this channel never suspends and [offer] always returns `true`.
344344
*
345-
* * When `capacity` is positive, but less than [UNLIMITED] -- it creates [ArrayChannel].
345+
* * When `capacity` is positive, but less than [UNLIMITED] -- it creates array-based channel with given capacity.
346346
* This channel has an array buffer of a fixed `capacity`.
347347
* Sender suspends only when buffer is fully and receiver suspends only when buffer is empty.
348348
*/

0 commit comments

Comments
 (0)