Skip to content

Commit 1e4a13d

Browse files
committed
Remove Stream Scopes (#346)
1 parent b5f56ca commit 1e4a13d

File tree

37 files changed

+651
-2162
lines changed

37 files changed

+651
-2162
lines changed

core/src/commonMain/kotlin/kotlinx/rpc/RpcClient.kt

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,6 @@ public interface RpcClient : CoroutineScope {
2828
*/
2929
public suspend fun <T> call(call: RpcCall): T
3030

31-
/**
32-
* This method is used by generated clients to perform a call to the server.
33-
*
34-
* @param T type of the result
35-
* @param serviceScope service's coroutine scope
36-
* @param call an object that contains all required information about the called method,
37-
* that is needed to route it properly to the server.
38-
* @return actual result of the call, for example, data from the server
39-
*/
40-
@Deprecated(
41-
"This method was primarily used for fields in RPC services, which are now deprecated. " +
42-
"See https://kotlin.github.io/kotlinx-rpc/strict-mode.html fields guide for more information",
43-
level = DeprecationLevel.ERROR,
44-
)
45-
public fun <T> callAsync(serviceScope: CoroutineScope, call: RpcCall): Deferred<T>
46-
4731
/**
4832
* This method is used by generated clients to perform a call to the server
4933
* that returns a streaming flow.
@@ -53,9 +37,7 @@ public interface RpcClient : CoroutineScope {
5337
* that is needed to route it properly to the server.
5438
* @return the actual result of the call, for example, data from the server
5539
*/
56-
public fun <T> callServerStreaming(call: RpcCall): Flow<T> {
57-
error("Non-suspending server streaming is not supported by this client")
58-
}
40+
public fun <T> callServerStreaming(call: RpcCall): Flow<T>
5941

6042
/**
6143
* Provides child [CoroutineContext] for a new [RemoteService] service stub.

krpc/krpc-client/build.gradle.kts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,3 @@ kotlin {
2828
}
2929
}
3030

31-
rpc {
32-
strict {
33-
stateFlow = RpcStrictMode.NONE
34-
sharedFlow = RpcStrictMode.NONE
35-
nestedFlow = RpcStrictMode.NONE
36-
streamScopedFunctions = RpcStrictMode.NONE
37-
suspendingServerStreaming = RpcStrictMode.NONE
38-
notTopLevelServerFlow = RpcStrictMode.NONE
39-
fields = RpcStrictMode.NONE
40-
}
41-
}

0 commit comments

Comments
 (0)