Skip to content

Commit c3f29fb

Browse files
qwwdfsadpablobaxter
authored andcommitted
Adjust deprecations in reactive integrations
* Remove all deprecated inline methods * Promote ERROR to HIDDEN where applicable * Promote WARNING to ERROR where applicable
1 parent 814898c commit c3f29fb

23 files changed

+141
-177
lines changed

kotlinx-coroutines-core/api/kotlinx-coroutines-core.api

+5
Original file line numberDiff line numberDiff line change
@@ -674,13 +674,15 @@ public final class kotlinx/coroutines/channels/ChannelsKt {
674674
public static final synthetic fun count (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
675675
public static final synthetic fun distinct (Lkotlinx/coroutines/channels/ReceiveChannel;)Lkotlinx/coroutines/channels/ReceiveChannel;
676676
public static final fun distinctBy (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;
677+
public static synthetic fun distinctBy$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
677678
public static final synthetic fun drop (Lkotlinx/coroutines/channels/ReceiveChannel;ILkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/channels/ReceiveChannel;
678679
public static synthetic fun drop$default (Lkotlinx/coroutines/channels/ReceiveChannel;ILkotlin/coroutines/CoroutineContext;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
679680
public static final synthetic fun dropWhile (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;
680681
public static synthetic fun dropWhile$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
681682
public static final synthetic fun elementAt (Lkotlinx/coroutines/channels/ReceiveChannel;ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
682683
public static final synthetic fun elementAtOrNull (Lkotlinx/coroutines/channels/ReceiveChannel;ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
683684
public static final fun filter (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;
685+
public static synthetic fun filter$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
684686
public static final synthetic fun filterIndexed (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/channels/ReceiveChannel;
685687
public static synthetic fun filterIndexed$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
686688
public static final synthetic fun filterNot (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;
@@ -697,7 +699,9 @@ public final class kotlinx/coroutines/channels/ChannelsKt {
697699
public static final synthetic fun lastIndexOf (Lkotlinx/coroutines/channels/ReceiveChannel;Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
698700
public static final synthetic fun lastOrNull (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
699701
public static final fun map (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;
702+
public static synthetic fun map$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
700703
public static final fun mapIndexed (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/channels/ReceiveChannel;
704+
public static synthetic fun mapIndexed$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
701705
public static final synthetic fun mapIndexedNotNull (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/channels/ReceiveChannel;
702706
public static synthetic fun mapIndexedNotNull$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
703707
public static final synthetic fun mapNotNull (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;
@@ -727,6 +731,7 @@ public final class kotlinx/coroutines/channels/ChannelsKt {
727731
public static synthetic fun withIndex$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
728732
public static final synthetic fun zip (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlinx/coroutines/channels/ReceiveChannel;)Lkotlinx/coroutines/channels/ReceiveChannel;
729733
public static final fun zip (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;
734+
public static synthetic fun zip$default (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
730735
}
731736

732737
public final class kotlinx/coroutines/channels/ClosedReceiveChannelException : java/util/NoSuchElementException {

reactive/kotlinx-coroutines-reactive/api/kotlinx-coroutines-reactive.api

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ public final class kotlinx/coroutines/reactive/AwaitKt {
1212

1313
public final class kotlinx/coroutines/reactive/ChannelKt {
1414
public static final fun collect (Lorg/reactivestreams/Publisher;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
15-
public static final fun consumeEach (Lorg/reactivestreams/Publisher;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
1615
public static final fun openSubscription (Lorg/reactivestreams/Publisher;I)Lkotlinx/coroutines/channels/ReceiveChannel;
1716
public static synthetic fun openSubscription$default (Lorg/reactivestreams/Publisher;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
17+
public static final fun toChannel (Lorg/reactivestreams/Publisher;I)Lkotlinx/coroutines/channels/ReceiveChannel;
1818
}
1919

2020
public abstract interface class kotlinx/coroutines/reactive/ContextInjector {
@@ -27,9 +27,9 @@ public final class kotlinx/coroutines/reactive/ConvertKt {
2727
}
2828

2929
public final class kotlinx/coroutines/reactive/FlowKt {
30-
public static final fun asFlow (Lorg/reactivestreams/Publisher;)Lkotlinx/coroutines/flow/Flow;
31-
public static final fun asFlow (Lorg/reactivestreams/Publisher;I)Lkotlinx/coroutines/flow/Flow;
32-
public static final fun asPublisher (Lkotlinx/coroutines/flow/Flow;)Lorg/reactivestreams/Publisher;
30+
public static final synthetic fun asFlow (Lorg/reactivestreams/Publisher;)Lkotlinx/coroutines/flow/Flow;
31+
public static final synthetic fun asFlow (Lorg/reactivestreams/Publisher;I)Lkotlinx/coroutines/flow/Flow;
32+
public static final synthetic fun asPublisher (Lkotlinx/coroutines/flow/Flow;)Lorg/reactivestreams/Publisher;
3333
}
3434

3535
public final class kotlinx/coroutines/reactive/FlowSubscription : kotlinx/coroutines/AbstractCoroutine, org/reactivestreams/Subscription {
@@ -42,7 +42,7 @@ public final class kotlinx/coroutines/reactive/FlowSubscription : kotlinx/corout
4242

4343
public final class kotlinx/coroutines/reactive/PublishKt {
4444
public static final fun publish (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lorg/reactivestreams/Publisher;
45-
public static final fun publish (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lorg/reactivestreams/Publisher;
45+
public static final synthetic fun publish (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lorg/reactivestreams/Publisher;
4646
public static synthetic fun publish$default (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lorg/reactivestreams/Publisher;
4747
public static synthetic fun publish$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lorg/reactivestreams/Publisher;
4848
public static final fun publishInternal (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;)Lorg/reactivestreams/Publisher;

reactive/kotlinx-coroutines-reactive/src/Channel.kt

+9-7
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,26 @@ import org.reactivestreams.*
2626
*/
2727
@Deprecated(
2828
message = "Transforming publisher to channel is deprecated, use asFlow() instead",
29-
level = DeprecationLevel.WARNING) // Will be error in 1.4
29+
level = DeprecationLevel.ERROR) // Will be error in 1.4
3030
public fun <T> Publisher<T>.openSubscription(request: Int = 1): ReceiveChannel<T> {
3131
val channel = SubscriptionChannel<T>(request)
3232
subscribe(channel)
3333
return channel
3434
}
3535

36-
// Will be promoted to error in 1.3.0, removed in 1.4.0
37-
@Deprecated(message = "Use collect instead", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("this.collect(action)"))
38-
public suspend inline fun <T> Publisher<T>.consumeEach(action: (T) -> Unit): Unit =
39-
openSubscription().consumeEach(action)
40-
4136
/**
4237
* Subscribes to this [Publisher] and performs the specified action for each received element.
4338
* Cancels subscription if any exception happens during collect.
4439
*/
4540
public suspend inline fun <T> Publisher<T>.collect(action: (T) -> Unit): Unit =
46-
openSubscription().consumeEach(action)
41+
toChannel().consumeEach(action)
42+
43+
@PublishedApi
44+
internal fun <T> Publisher<T>.toChannel(request: Int = 1): ReceiveChannel<T> {
45+
val channel = SubscriptionChannel<T>(request)
46+
subscribe(channel)
47+
return channel
48+
}
4749

4850
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "SubscriberImplementation")
4951
private class SubscriptionChannel<T>(

reactive/kotlinx-coroutines-reactive/src/Convert.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import kotlin.coroutines.*
1616
* @param context -- the coroutine context from which the resulting observable is going to be signalled
1717
*/
1818
@Deprecated(message = "Deprecated in the favour of consumeAsFlow()",
19-
level = DeprecationLevel.WARNING, // Error in 1.4
20-
replaceWith = ReplaceWith("this.consumeAsFlow().asPublisher()"))
19+
level = DeprecationLevel.ERROR, // Error in 1.4
20+
replaceWith = ReplaceWith("this.consumeAsFlow().asPublisher(context)", imports = ["kotlinx.coroutines.flow.consumeAsFlow"]))
2121
public fun <T> ReceiveChannel<T>.asPublisher(context: CoroutineContext = EmptyCoroutineContext): Publisher<T> = publish(context) {
2222
for (t in this@asPublisher)
2323
send(t)

reactive/kotlinx-coroutines-reactive/src/Migration.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ import org.reactivestreams.*
1414
// Binary compatibility with Spring 5.2 RC
1515
@Deprecated(
1616
message = "Replaced in favor of ReactiveFlow extension, please import kotlinx.coroutines.reactive.* instead of kotlinx.coroutines.reactive.FlowKt",
17-
level = DeprecationLevel.ERROR
17+
level = DeprecationLevel.HIDDEN
1818
)
1919
@JvmName("asFlow")
2020
public fun <T : Any> Publisher<T>.asFlowDeprecated(): Flow<T> = asFlow()
2121

2222
// Binary compatibility with Spring 5.2 RC
2323
@Deprecated(
2424
message = "Replaced in favor of ReactiveFlow extension, please import kotlinx.coroutines.reactive.* instead of kotlinx.coroutines.reactive.FlowKt",
25-
level = DeprecationLevel.ERROR
25+
level = DeprecationLevel.HIDDEN
2626
)
2727
@JvmName("asPublisher")
2828
public fun <T : Any> Flow<T>.asPublisherDeprecated(): Publisher<T> = asPublisher()
2929

3030
@FlowPreview
3131
@Deprecated(
3232
message = "batchSize parameter is deprecated, use .buffer() instead to control the backpressure",
33-
level = DeprecationLevel.ERROR,
33+
level = DeprecationLevel.HIDDEN,
3434
replaceWith = ReplaceWith("asFlow().buffer(batchSize)", imports = ["kotlinx.coroutines.flow.*"])
3535
)
3636
public fun <T : Any> Publisher<T>.asFlow(batchSize: Int): Flow<T> = asFlow().buffer(batchSize)

reactive/kotlinx-coroutines-reactive/src/Publish.kt

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/*
22
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
*/
4-
5-
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
6-
74
package kotlinx.coroutines.reactive
85

96
import kotlinx.atomicfu.*
@@ -43,17 +40,6 @@ public fun <T> publish(
4340
return publishInternal(GlobalScope, context, DEFAULT_HANDLER, block)
4441
}
4542

46-
@Deprecated(
47-
message = "CoroutineScope.publish is deprecated in favour of top-level publish",
48-
level = DeprecationLevel.ERROR,
49-
replaceWith = ReplaceWith("publish(context, block)")
50-
) // Since 1.3.0, will be error in 1.3.1 and hidden in 1.4.0. Binary compatibility with Spring
51-
@LowPriorityInOverloadResolution
52-
public fun <T> CoroutineScope.publish(
53-
context: CoroutineContext = EmptyCoroutineContext,
54-
@BuilderInference block: suspend ProducerScope<T>.() -> Unit
55-
): Publisher<T> = publishInternal(this, context, DEFAULT_HANDLER ,block)
56-
5743
/** @suppress For internal use from other reactive integration modules only */
5844
@InternalCoroutinesApi
5945
public fun <T> publishInternal(
@@ -288,3 +274,13 @@ public class PublisherCoroutine<in T>(
288274

289275
private fun Throwable.isFatal() = this is VirtualMachineError || this is ThreadDeath || this is LinkageError
290276
}
277+
278+
@Deprecated(
279+
message = "CoroutineScope.publish is deprecated in favour of top-level publish",
280+
level = DeprecationLevel.HIDDEN,
281+
replaceWith = ReplaceWith("publish(context, block)")
282+
) // Since 1.3.0, will be error in 1.3.1 and hidden in 1.4.0. Binary compatibility with Spring
283+
public fun <T> CoroutineScope.publish(
284+
context: CoroutineContext = EmptyCoroutineContext,
285+
@BuilderInference block: suspend ProducerScope<T>.() -> Unit
286+
): Publisher<T> = publishInternal(this, context, DEFAULT_HANDLER, block)

reactive/kotlinx-coroutines-reactive/test/IntegrationTest.kt

+2-26
Original file line numberDiff line numberDiff line change
@@ -81,30 +81,6 @@ class IntegrationTest(
8181
assertEquals(1, cnt)
8282
}
8383

84-
@Test
85-
fun testNumbers() = runBlocking<Unit> {
86-
val n = 100 * stressTestMultiplier
87-
val pub = publish(ctx(coroutineContext)) {
88-
for (i in 1..n) {
89-
send(i)
90-
if (delay) delay(1)
91-
}
92-
}
93-
assertEquals(1, pub.awaitFirst())
94-
assertEquals(1, pub.awaitFirstOrDefault(0))
95-
assertEquals(1, pub.awaitFirstOrNull())
96-
assertEquals(1, pub.awaitFirstOrElse { 0 })
97-
assertEquals(n, pub.awaitLast())
98-
assertFailsWith<IllegalArgumentException> { pub.awaitSingle() }
99-
assertFailsWith<IllegalArgumentException> { pub.awaitSingleOrDefault(0) }
100-
assertFailsWith<IllegalArgumentException> { pub.awaitSingleOrNull() }
101-
assertFailsWith<IllegalArgumentException> { pub.awaitSingleOrElse { 0 } }
102-
checkNumbers(n, pub)
103-
val channel = pub.openSubscription()
104-
checkNumbers(n, channel.asPublisher(ctx(coroutineContext)))
105-
channel.cancel()
106-
}
107-
10884
@Test
10985
fun testCancelWithoutValue() = runTest {
11086
val job = launch(Job(), start = CoroutineStart.UNDISPATCHED) {
@@ -118,7 +94,7 @@ class IntegrationTest(
11894
}
11995

12096
@Test
121-
fun testEmptySingle() = runTest(unhandled = listOf({e -> e is NoSuchElementException})) {
97+
fun testEmptySingle() = runTest(unhandled = listOf { e -> e is NoSuchElementException }) {
12298
expect(1)
12399
val job = launch(Job(), start = CoroutineStart.UNDISPATCHED) {
124100
publish<String> {
@@ -270,4 +246,4 @@ class IntegrationTest(
270246
assertEquals(n, last)
271247
}
272248

273-
}
249+
}

reactive/kotlinx-coroutines-reactive/test/PublisherSubscriptionSelectTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class PublisherSubscriptionSelectTest(private val request: Int) : TestBase() {
2828
var a = 0
2929
var b = 0
3030
// open two subs
31-
val channelA = source.openSubscription(request)
32-
val channelB = source.openSubscription(request)
31+
val channelA = source.toChannel(request)
32+
val channelB = source.toChannel(request)
3333
loop@ while (true) {
3434
val done: Int = select {
3535
channelA.onReceiveCatching { result ->

reactive/kotlinx-coroutines-reactor/api/kotlinx-coroutines-reactor.api

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ public final class kotlinx/coroutines/reactor/ConvertKt {
66
}
77

88
public final class kotlinx/coroutines/reactor/FlowKt {
9-
public static final fun asFlux (Lkotlinx/coroutines/flow/Flow;)Lreactor/core/publisher/Flux;
9+
public static final synthetic fun asFlux (Lkotlinx/coroutines/flow/Flow;)Lreactor/core/publisher/Flux;
1010
}
1111

1212
public final class kotlinx/coroutines/reactor/FluxKt {
1313
public static final fun flux (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lreactor/core/publisher/Flux;
14-
public static final fun flux (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lreactor/core/publisher/Flux;
14+
public static final synthetic fun flux (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lreactor/core/publisher/Flux;
1515
public static synthetic fun flux$default (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lreactor/core/publisher/Flux;
1616
public static synthetic fun flux$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lreactor/core/publisher/Flux;
1717
}
1818

1919
public final class kotlinx/coroutines/reactor/MonoKt {
2020
public static final fun mono (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lreactor/core/publisher/Mono;
21-
public static final fun mono (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lreactor/core/publisher/Mono;
21+
public static final synthetic fun mono (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;)Lreactor/core/publisher/Mono;
2222
public static synthetic fun mono$default (Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lreactor/core/publisher/Mono;
2323
public static synthetic fun mono$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lreactor/core/publisher/Mono;
2424
}

reactive/kotlinx-coroutines-reactor/src/Convert.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public fun <T> Deferred<T?>.asMono(context: CoroutineContext): Mono<T> = mono(co
4646
* @param context -- the coroutine context from which the resulting flux is going to be signalled
4747
*/
4848
@Deprecated(message = "Deprecated in the favour of consumeAsFlow()",
49-
level = DeprecationLevel.WARNING,
50-
replaceWith = ReplaceWith("this.consumeAsFlow().asFlux()"))
49+
level = DeprecationLevel.ERROR,
50+
replaceWith = ReplaceWith("this.consumeAsFlow().asFlux(context)", imports = ["kotlinx.coroutines.flow.consumeAsFlow"]))
5151
public fun <T> ReceiveChannel<T>.asFlux(context: CoroutineContext = EmptyCoroutineContext): Flux<T> = flux(context) {
5252
for (t in this@asFlux)
5353
send(t)

0 commit comments

Comments
 (0)