You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By their nature; all member-functions of RpcService implementations should be suspending.
During development, it may be a common mistake to omit suspend, in which case the developer-user is faced with a potentially confusing error at compile time:
e: org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /Users/user/Projects/project/shared/src/commonMain/kotlin/com/project/shared/domain/service/SomeService.kt
The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:47)
...
<long stack trace>
Describe the solution you'd like
Compiler plugin or KSP part of kotlinx.rpc should detect the presence of non suspend functions and throw a more meaningful error e.g:
The function 'getUser' in com.company.project.service.UserService is not suspending, only suspending functions are allowed in RPC service implementations.
The text was updated successfully, but these errors were encountered:
By their nature; all member-functions of
RpcService
implementations should besuspend
ing.During development, it may be a common mistake to omit
suspend
, in which case the developer-user is faced with a potentially confusing error at compile time:Describe the solution you'd like
Compiler plugin or KSP part of
kotlinx.rpc
should detect the presence of nonsuspend
functions and throw a more meaningful error e.g:The text was updated successfully, but these errors were encountered: