Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Kotlin/kotlinx-rpc
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.5.1
Choose a base ref
...
head repository: Kotlin/kotlinx-rpc
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.6.0
Choose a head ref

Commits on Feb 13, 2025

  1. Fix println tests

    Mr3zee committed Feb 13, 2025

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    f9d6195 View commit details
  2. CHANGELOG.md

    Mr3zee committed Feb 13, 2025

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    e259bf7 View commit details
  3. Update version to 0.5.1

    Mr3zee committed Feb 13, 2025

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    0e8255d View commit details
  4. detekt

    Mr3zee committed Feb 13, 2025

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    b061e12 View commit details
  5. Update monitior (#282)

    Mr3zee authored Feb 13, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ae244f2 View commit details

Commits on Feb 14, 2025

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4907cad View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0b5d334 View commit details
  3. Version 0.6.0-SNAPSHOT (#283)

    Mr3zee authored Feb 14, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bdfb6fd View commit details

Commits on Feb 18, 2025

  1. Update gRPC Docs and Sample (#284)

    * Updated gRPC doc for new Gradle configs
    
    * Updated gRPC sample
    
    * GH comments
    Mr3zee authored Feb 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c7f4174 View commit details

Commits on Feb 21, 2025

  1. Update build for custom KC versions (#293)

    Mr3zee authored Feb 21, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d702ecf View commit details

Commits on Mar 14, 2025

  1. Non suspend flow (#299)

    * KRPC-133 Don't require `suspend` modifier in functions returning `Flow`
    
    * gold tests
    
    * update compiler tests
    
    * Added cancellation tests and GC tests, checked exceptions
    
    * apiDump
    
    * detekt
    
    * uncomment subplugin options
    
    * fix timeout
    
    * review comments
    Mr3zee authored Mar 14, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7bfdb56 View commit details

Commits on Mar 17, 2025

  1. Update leftover sources from jvm-only to kmp (#300)

    * Move krpc-ktor-server to commonMain
    
    * Move krpc-test to commonMain
    
    * Move krpc-test tests to commonTest
    
    * detekt
    
    * PR comments
    Mr3zee authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ee5ab90 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5f3e091 View commit details
  3. Dependency bump (#303)

    * Update Core dependencies (non-major)
    
    * Update Python Monitor Dependencies
    
    * Update dependency Jinja2 to v3.1.6 [SECURITY]
    
    * Update Python Monitor Dependencies
    
    * Manual updates
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Mr3zee and renovate[bot] authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    647fd34 View commit details
  4. Confusing compilation error when not specifying type argument to regi…

    …sterService #288 (#302)
    Mr3zee authored Mar 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    87179d8 View commit details

Commits on Mar 19, 2025

  1. Fix kotlin master compilation (#306)

    Mr3zee authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    18afcd3 View commit details

Commits on Apr 1, 2025

  1. Fix api check (#307)

    Mr3zee authored Apr 1, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    94b711f View commit details
  2. Kotlin 2.1.20 (#309)

    * Kotlin 2.1.20
    
    * Update tests
    Mr3zee authored Apr 1, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ddeab6f View commit details
  3. KRPC-167 Internal symbols are the first completion candidate in proje…

    …cts where kxrpc is configured (#305)
    Mr3zee authored Apr 1, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8ae9414 View commit details
  4. CHANGELOG.md

    Mr3zee committed Apr 1, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Mr3zee Alexander Sysoev
    Copy the full SHA
    1f68443 View commit details

Commits on Apr 4, 2025

  1. Docs/release 0.6.0 (#314)

    * Docs for 0.6.0
    
    * Deprecations
    
    * Review comments
    Mr3zee authored Apr 4, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    070444b View commit details
  2. CHANGELOG.md date update

    Mr3zee committed Apr 4, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Mr3zee Alexander Sysoev
    Copy the full SHA
    88efcf0 View commit details
  3. detekt

    Mr3zee committed Apr 4, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Mr3zee Alexander Sysoev
    Copy the full SHA
    53ae4eb View commit details
  4. Fix tests

    Mr3zee committed Apr 4, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Mr3zee Alexander Sysoev
    Copy the full SHA
    481393b View commit details
  5. Update old doc

    Mr3zee committed Apr 4, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Mr3zee Alexander Sysoev
    Copy the full SHA
    07b10fb View commit details
Showing with 3,329 additions and 1,611 deletions.
  1. +1 −1 .github/workflows/docs.yml
  2. +54 −1 CHANGELOG.md
  3. +14 −13 README.md
  4. +5 −5 compiler-plugin/build.gradle.kts
  5. +3 −2 compiler-plugin/compiler-plugin-backend/build.gradle.kts
  6. +6 −2 compiler-plugin/compiler-plugin-backend/src/main/core/kotlinx/rpc/codegen/extension/RpcIrContext.kt
  7. +3 −2 ...iler-plugin/compiler-plugin-backend/src/main/core/kotlinx/rpc/codegen/extension/RpcIrExtension.kt
  8. +2 −6 ...ugin/compiler-plugin-backend/src/main/core/kotlinx/rpc/codegen/extension/RpcIrServiceProcessor.kt
  9. +49 −6 ...er-plugin/compiler-plugin-backend/src/main/core/kotlinx/rpc/codegen/extension/RpcStubGenerator.kt
  10. +21 −0 ...ugin/compiler-plugin-backend/src/main/latest/kotlinx/rpc/codegen/RpcIrServiceProcessorDelegate.kt
  11. +21 −0 .../compiler-plugin-backend/src/main/pre_2_0_10/kotlinx/rpc/codegen/RpcIrServiceProcessorDelegate.kt
  12. +21 −0 .../compiler-plugin-backend/src/main/pre_2_0_21/kotlinx/rpc/codegen/RpcIrServiceProcessorDelegate.kt
  13. +21 −0 ...lugin/compiler-plugin-backend/src/main/v_2_2/kotlinx/rpc/codegen/RpcIrServiceProcessorDelegate.kt
  14. +3 −2 compiler-plugin/compiler-plugin-cli/build.gradle.kts
  15. +2 −2 compiler-plugin/compiler-plugin-common/build.gradle.kts
  16. +3 −2 compiler-plugin/compiler-plugin-k2/build.gradle.kts
  17. +2 −1 compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/FirRpcServiceGenerator.kt
  18. +2 −9 compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/FirVersionSpecificApi.kt
  19. +3 −3 compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/StrictMode.kt
  20. +6 −2 ...gin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/FirCheckedAnnotationCheckers.kt
  21. +23 −13 ...in/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/diagnostics/FirRpcDiagnostics.kt
  22. +18 −3 ...-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/diagnostics/RpcDiagnosticRendererFactory.kt
  23. +7 −1 core/api/core.api
  24. +18 −0 core/src/commonMain/kotlin/kotlinx/rpc/RpcClient.kt
  25. +6 −5 core/src/commonMain/kotlin/kotlinx/rpc/descriptor/RpcServiceDescriptor.kt
  26. +6 −6 core/src/commonMain/kotlin/kotlinx/rpc/internal/ReflectionUtils.kt
  27. +2 −2 core/src/commonMain/kotlin/kotlinx/rpc/internal/{dataCast.kt → rpcInternalDataCast.kt}
  28. +3 −3 core/src/commonMain/kotlin/kotlinx/rpc/withService.kt
  29. +4 −4 core/src/jsMain/kotlin/kotlinx/rpc/internal/ReflectionUtils.js.kt
  30. +3 −3 core/src/jvmMain/kotlin/kotlinx/rpc/internal/ReflectionUtils.jvm.kt
  31. +4 −4 core/src/nativeMain/kotlin/kotlinx/rpc/internal/ReflectionUtils.native.kt
  32. +4 −4 core/src/wasmJsMain/kotlin/kotlinx/rpc/internal/ReflectionUtils.wasm.kt
  33. +4 −4 core/src/wasmWasiMain/kotlin/kotlinx/rpc/internal/ReflectionUtils.wasi.kt
  34. +1 −1 docs/pages/kotlinx-rpc/help-versions.json
  35. +3 −2 docs/pages/kotlinx-rpc/rpc.tree
  36. +24 −0 docs/pages/kotlinx-rpc/topics/0-6-0.topic
  37. +5 −56 docs/pages/kotlinx-rpc/topics/features.topic
  38. +86 −41 docs/pages/kotlinx-rpc/topics/grpc-configuration.topic
  39. +1 −3 docs/pages/kotlinx-rpc/topics/plugins.topic
  40. +149 −64 docs/pages/kotlinx-rpc/topics/strict-mode.topic
  41. +2 −1 docs/pages/kotlinx-rpc/topics/versions.topic
  42. +3 −3 docs/pages/kotlinx-rpc/v.list
  43. +2 −2 docs/pages/kotlinx-rpc/writerside.cfg
  44. +1 −2 gradle-conventions-settings/build.gradle.kts
  45. +2 −3 gradle-conventions-settings/develocity/build.gradle.kts
  46. +1 −3 gradle-conventions-settings/settings.gradle.kts
  47. +26 −8 gradle-conventions-settings/src/main/kotlin/conventions-version-resolution.settings.gradle.kts
  48. +1 −2 gradle-conventions-settings/src/main/kotlin/util/conventionsDefaults.kt
  49. +2 −2 gradle-conventions/common/src/main/kotlin/util/JsTarget.kt
  50. +10 −8 gradle-conventions/common/src/main/kotlin/util/ProjectKotlinConfig.kt
  51. +1 −0 gradle-conventions/common/src/main/kotlin/util/apiValidation.kt
  52. +11 −0 gradle-conventions/empty/src/main/kotlin/util/npm.kt
  53. +9 −5 gradle-conventions/{common → latest-only}/src/main/kotlin/util/npm.kt
  54. +5 −5 gradle-conventions/src/main/kotlin/compiler-specific-module.gradle.kts
  55. +4 −2 gradle-conventions/src/main/kotlin/util/wasm.kt
  56. +7 −7 gradle-plugin/src/main/kotlin/kotlinx/rpc/Extensions.kt
  57. +6 −7 gradle-plugin/src/main/kotlin/kotlinx/rpc/compilerPlugins.kt
  58. +1 −1 gradle/wrapper/gradle-wrapper.properties
  59. +2 −1 krpc/krpc-client/api/krpc-client.api
  60. +122 −11 krpc/krpc-client/src/commonMain/kotlin/kotlinx/rpc/krpc/client/KrpcClient.kt
  61. +24 −4 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/StreamScope.kt
  62. +3 −4 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/CancellationType.kt
  63. +3 −3 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/ExceptionUtils.kt
  64. +23 −7 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/KrpcConnector.kt
  65. +10 −5 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/KrpcPlugin.kt
  66. +13 −5 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/KrpcPluginKey.kt
  67. +3 −3 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/KrpcServiceHandler.kt
  68. +5 −5 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/KrpcStreamContext.kt
  69. +6 −1 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/KrpcVersion.kt
  70. +2 −2 krpc/krpc-core/src/commonMain/kotlin/kotlinx/rpc/krpc/internal/ObjectId.kt
  71. +4 −0 krpc/krpc-ktor/krpc-ktor-client/api/krpc-ktor-client.api
  72. +2 −1 krpc/krpc-ktor/krpc-ktor-core/src/jvmTest/kotlin/kotlinx/rpc/krpc/ktor/KtorTransportTest.kt
  73. +2 −2 krpc/krpc-ktor/krpc-ktor-server/build.gradle.kts
  74. +0 −6 krpc/krpc-ktor/krpc-ktor-server/gradle.properties
  75. +1 −1 ...krpc-ktor/krpc-ktor-server/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/ktor/server/Krpc.kt
  76. +1 −1 ...ktor/krpc-ktor-server/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/ktor/server/KrpcRoute.kt
  77. +1 −1 ...krpc-ktor-server/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/ktor/server/KtorKrpcServer.kt
  78. +1 −1 .../krpc-ktor-server/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/ktor/server/KtorServerDsl.kt
  79. +11 −11 ...ommonMain/kotlin/kotlinx/rpc/krpc/internal/logging/{CommonLogger.kt → RpcInternalCommonLogger.kt}
  80. +8 −8 ...rc/commonMain/kotlin/kotlinx/rpc/krpc/internal/logging/{DumpLogger.kt → RpcInternalDumpLogger.kt}
  81. +9 −9 ...lin/kotlinx/rpc/krpc/internal/logging/impl/{CommonLoggerImpl.kt → RpcInternalCommonLoggerImpl.kt}
  82. +6 −6 krpc/krpc-server/src/commonMain/kotlin/kotlinx/rpc/krpc/server/KrpcServer.kt
  83. +141 −32 krpc/krpc-server/src/commonMain/kotlin/kotlinx/rpc/krpc/server/internal/KrpcServerService.kt
  84. +25 −10 krpc/krpc-test/build.gradle.kts
  85. +6 −0 krpc/krpc-test/gradle.properties
  86. +0 −8 krpc/krpc-test/src/commonMain/kotlin/Stub.kt
  87. +1 −1 krpc/krpc-test/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/test/KrpcTestClient.kt
  88. +1 −1 krpc/krpc-test/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/test/KrpcTestServer.kt
  89. +35 −3 krpc/krpc-test/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/test/KrpcTestService.kt
  90. +38 −9 krpc/krpc-test/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.kt
  91. +689 −0 krpc/krpc-test/src/commonMain/kotlin/kotlinx/rpc/krpc/test/KrpcTransportTestBase.kt
  92. 0 krpc/krpc-test/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/test/Payloads.kt
  93. +1 −1 krpc/krpc-test/src/{jvmMain → commonMain}/kotlin/kotlinx/rpc/krpc/test/TestClass.kt
  94. +1 −1 krpc/krpc-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/LocalTransport.kt
  95. +7 −5 krpc/krpc-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/LocalTransportTest.kt
  96. +4 −4 krpc/krpc-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/ProtocolTest.kt
  97. +9 −10 krpc/krpc-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/ProtocolTestBase.kt
  98. +1 −1 krpc/krpc-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/SamplingService.kt
  99. +41 −20 krpc/krpc-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/TransportTest.kt
  100. +28 −1 ...-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/cancellation/CancellationService.kt
  101. +63 −6 ...rpc-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/cancellation/CancellationTest.kt
  102. +7 −8 ...-test/src/{jvmTest → commonTest}/kotlin/kotlinx/rpc/krpc/test/cancellation/CancellationToolkit.kt
  103. +9 −0 krpc/krpc-test/src/jsMain/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.js.kt
  104. +7 −0 krpc/krpc-test/src/jsMain/kotlin/kotlinx/rpc/krpc/test/KrpcTransportTestBase.js.kt
  105. +9 −0 krpc/krpc-test/src/jvmMain/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.jvm.kt
  106. +7 −0 krpc/krpc-test/src/jvmMain/kotlin/kotlinx/rpc/krpc/test/KrpcTransportTestBase.jvm.kt
  107. +0 −719 krpc/krpc-test/src/jvmMain/kotlin/kotlinx/rpc/krpc/test/KrpcTransportTestBase.kt
  108. +8 −8 krpc/krpc-test/src/jvmTest/kotlin/kotlinx/rpc/krpc/test/api/ApiModel.kt
  109. +9 −7 krpc/krpc-test/src/jvmTest/kotlin/kotlinx/rpc/krpc/test/api/IndexedEnumTest.kt
  110. +13 −13 krpc/krpc-test/src/jvmTest/kotlin/kotlinx/rpc/krpc/test/api/WireSamplingTestScope.kt
  111. +2 −1 krpc/krpc-test/src/jvmTest/kotlin/kotlinx/rpc/krpc/test/api/util/GoldChecks.kt
  112. +18 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallData.gold
  113. +15 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallDataBinary.gold
  114. +15 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallDataString.gold
  115. +11 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallException.gold
  116. +14 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallResult.gold
  117. +14 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallSuccess.gold
  118. +10 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallSuccessBinary.gold
  119. +10 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallSuccessString.gold
  120. +3 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/CallType.gold
  121. +8 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/Failure.gold
  122. +5 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/Handshake.gold
  123. +20 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/KrpcCallMessage.gold
  124. +5 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/KrpcGenericMessage.gold
  125. +12 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/KrpcMessage.gold
  126. +5 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/KrpcPlugin.gold
  127. +7 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/KrpcPluginKey.gold
  128. +9 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/KrpcProtocolMessage.gold
  129. +8 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/SerializedException.gold
  130. +6 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/StackElement.gold
  131. +13 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/StreamCancel.gold
  132. +11 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/StreamFinished.gold
  133. +15 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/StreamMessage.gold
  134. +12 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/StreamMessageBinary.gold
  135. +12 −0 krpc/krpc-test/src/jvmTest/resources/class_dumps/0_6_0/StreamMessageString.gold
  136. +2 −1 krpc/krpc-test/src/jvmTest/resources/indexed_enum_dumps/KrpcPlugin.gold
  137. +2 −1 krpc/krpc-test/src/jvmTest/resources/indexed_enum_dumps/KrpcPluginKey.gold
  138. +10 −0 krpc/krpc-test/src/jvmTest/resources/wire_dumps/0_6_0/callException_json.gold
  139. +10 −0 krpc/krpc-test/src/jvmTest/resources/wire_dumps/0_6_0/echo_json.gold
  140. +20 −0 krpc/krpc-test/src/jvmTest/resources/wire_dumps/0_6_0/echo_protobuf.gold
  141. +13 −0 krpc/krpc-test/src/nativeMain/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.native.kt
  142. +7 −0 krpc/krpc-test/src/nativeMain/kotlin/kotlinx/rpc/krpc/test/KrpcTransportTestBase.native.kt
  143. +9 −0 krpc/krpc-test/src/wasmJsMain/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.wasmJs.kt
  144. +7 −0 krpc/krpc-test/src/wasmJsMain/kotlin/kotlinx/rpc/krpc/test/KrpcTransportTestBase.wasmJs.kt
  145. +16 −11 monitor/main.py
  146. +8 −8 monitor/requirements.txt
  147. +7 −36 samples/grpc-app/build.gradle.kts
  148. +2 −2 samples/ktor-all-platforms-app/gradle/libs.versions.toml
  149. +2 −2 samples/ktor-android-app/gradle/libs.versions.toml
  150. +2 −2 samples/ktor-web-app/gradle/libs.versions.toml
  151. +9 −9 samples/simple-ktor-app/build.gradle.kts
  152. +1 −0 settings.gradle.kts
  153. +6 −6 tests/compiler-plugin-tests/build.gradle.kts
  154. +2 −2 tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractBoxTest.kt
  155. +2 −2 .../compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractDiagnosticTest.kt
  156. +2 −2 tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/BaseTestRunner.kt
  157. +32 −30 tests/compiler-plugin-tests/src/testData/box/customParameterTypes.fir.ir.txt
  158. +17 −14 tests/compiler-plugin-tests/src/testData/box/fields.fir.ir.txt
  159. +2 −2 tests/compiler-plugin-tests/src/testData/box/fields.fir.txt
  160. +56 −44 tests/compiler-plugin-tests/src/testData/box/flowParameter.fir.ir.txt
  161. +8 −7 tests/compiler-plugin-tests/src/testData/box/multiModule.fir.ir.txt
  162. +8 −7 tests/compiler-plugin-tests/src/testData/box/simple.fir.ir.txt
  163. +1 −1 tests/compiler-plugin-tests/src/testData/diagnostics/rpcService.kt
  164. +22 −0 tests/compiler-plugin-tests/src/testData/diagnostics/strictMode.fir.txt
  165. +8 −6 tests/compiler-plugin-tests/src/testData/diagnostics/strictMode.kt
  166. +80 −0 tests/krpc-compatibility-tests/build.gradle.kts
  167. +11 −0 tests/krpc-compatibility-tests/src/main/kotlin/kotlinx/rpc/krpc/compatibility/CompatibilityTest.kt
  168. +11 −0 tests/krpc-compatibility-tests/src/main/kotlin/kotlinx/rpc/krpc/compatibility/TestApiServer.kt
  169. +21 −0 tests/krpc-compatibility-tests/src/newApi/kotlin/interfaces/Bar.kt
  170. +22 −0 tests/krpc-compatibility-tests/src/newApi/kotlin/interfaces/Baz.kt
  171. +24 −0 tests/krpc-compatibility-tests/src/newApi/kotlin/interfaces/Foo.kt
  172. +26 −0 tests/krpc-compatibility-tests/src/newApi/kotlin/tests/ApiServer.kt
  173. +53 −0 tests/krpc-compatibility-tests/src/newApi/kotlin/tests/CompatibilityTests.kt
  174. +18 −0 tests/krpc-compatibility-tests/src/oldApi/kotlin/interfaces/Bar.kt
  175. +22 −0 tests/krpc-compatibility-tests/src/oldApi/kotlin/interfaces/Baz.kt
  176. +24 −0 tests/krpc-compatibility-tests/src/oldApi/kotlin/interfaces/Foo.kt
  177. +26 −0 tests/krpc-compatibility-tests/src/oldApi/kotlin/tests/ApiServer.kt
  178. +50 −0 tests/krpc-compatibility-tests/src/oldApi/kotlin/tests/CompatibilityTests.kt
  179. +88 −0 ...krpc-compatibility-tests/src/test/kotlin/kotlinx/rpc/krpc/compatibility/KrpcCompatibilityTests.kt
  180. +59 −0 tests/krpc-compatibility-tests/src/test/kotlin/kotlinx/rpc/krpc/compatibility/LocalTransport.kt
  181. +1 −4 utils/build.gradle.kts
  182. +1 −2 utils/src/commonMain/kotlin/kotlinx/rpc/internal/utils/InternalRpcApi.kt
  183. +9 −9 .../kotlin/kotlinx/rpc/internal/utils/{ShortEnumKSerializer.kt → RpcInternalShortEnumKSerializer.kt}
  184. +6 −4 ...c/internal/utils/{SupervisedCompletableDeferred.kt → RpcInternalSupervisedCompletableDeferred.kt}
  185. +7 −5 utils/src/commonMain/kotlin/kotlinx/rpc/internal/utils/deferredUtil.kt
  186. +2 −2 utils/src/commonMain/kotlin/kotlinx/rpc/internal/utils/hex/HexBytes.kt
  187. +0 −10 utils/src/commonMain/kotlin/kotlinx/rpc/internal/utils/kClassSafeCast.kt
  188. +0 −40 utils/src/commonMain/kotlin/kotlinx/rpc/internal/utils/map/ConcurrentHashMap.kt
  189. +42 −0 utils/src/commonMain/kotlin/kotlinx/rpc/internal/utils/map/RpcInternalConcurrentHashMap.kt
  190. +4 −4 utils/src/commonMain/kotlin/kotlinx/rpc/internal/utils/map/SynchronizedHashMap.kt
  191. +4 −2 utils/src/jsMain/kotlin/kotlinx/rpc/internal/utils/map/ConcurrentHashMap.js.kt
  192. +7 −5 utils/src/jvmMain/kotlin/kotlinx/rpc/internal/utils/map/ConcurrentHashMap.jvm.kt
  193. +4 −2 utils/src/nativeMain/kotlin/kotlinx/rpc/internal/utils/map/ConcurrentHashMap.native.kt
  194. +2 −2 utils/src/wasmJsMain/kotlin/kotlinx/rpc/internal/utils/map/ConcurrentHashMap.wasm.kt
  195. +2 −2 utils/src/wasmWasiMain/kotlin/kotlinx/rpc/internal/utils/map/ConcurrentHashMap.wasi.kt
  196. +7 −6 versions-root/kotlin-versions-lookup.csv
  197. +14 −11 versions-root/libs.versions.toml
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ env:
ALGOLIA_INDEX_NAME: 'prod_kotlin_rpc'
ALGOLIA_KEY: '${{ secrets.ALGOLIA_KEY }}'
CONFIG_JSON_PRODUCT: 'kotlinx-rpc'
CONFIG_JSON_VERSION: '0.5.0'
CONFIG_JSON_VERSION: '0.6.0'

jobs:
build:
55 changes: 54 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
# 0.6.0
> Published 4 April 2025
### Features 🎉
* 2.1.20 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/309
* Non suspend flow by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/299

### Documentation 📗
* Update gRPC Docs and Sample by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/284

### Infra 🚧
* Update monitior by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/282
* Fix build config for for-ide builds by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/287
* Update build for custom KC versions by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/293
* Fix kotlin master compilation by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/306

### Other Changes 🧹
* Upgrade Gradle to 8.12.1 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/286
* Version 0.6.0-SNAPSHOT by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/283
* Update leftover sources from jvm-only to kmp by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/300
* KRPC-129 Move compatibility tests from Toolbox to Kotlin RPC repo by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/304
* Dependency bump by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/303
* Better compiler error message for checked annotations by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/302

**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.5.1...0.6.0

# 0.5.1
> Published 12 February 2025
### Features 🎉
* 2.1.10 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/271

### Documentation 📗
* Fix typo in README.md by @SebastianAigner in https://github.com/Kotlin/kotlinx-rpc/pull/266
* Added IDE plugin docs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/273

### Infra 🚧
* Update for IDE configs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/272
* Added python deps automerge by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/276

### Other Changes 🧹
* Update README.md by @pambrose in https://github.com/Kotlin/kotlinx-rpc/pull/268
* Added monitor app for deps publication by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/265
* Fix kotlin master by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/274
* Fix println tests by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/277
* Update Python Monitor Dependencies by @renovate in https://github.com/Kotlin/kotlinx-rpc/pull/278

## New Contributors
* @SebastianAigner made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/266
* @pambrose made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/268

**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.5.0...0.5.1

# 0.5.0
> Published 27 January 2024
> Published 27 January 2025
### Features 🎉
* Update Service Descriptors Generation by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/227
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@

[![Kotlin Experimental](https://kotl.in/badges/experimental.svg)](https://kotlinlang.org/docs/components-stability.html)
[![Official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
[![Kotlin](https://img.shields.io/badge/kotlin-2.0.0--2.0.21-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/kotlin-2.0.0--2.1.20-blue.svg?logo=kotlin)](http://kotlinlang.org)
[![GitHub License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)

[//]: # ([![TeamCity build]&#40;https://img.shields.io/teamcity/build/s/Build_kRPC_All.svg?server=http%3A%2F%2Fkrpc.teamcity.com&#41;]&#40;https://teamcity.jetbrains.com/viewType.html?buildTypeId=Build_kRPC_All&guest=1&#41;)
@@ -26,7 +26,7 @@ import kotlinx.rpc.annotations.Rpc
interface AwesomeService : RemoteService {
suspend fun getNews(city: String): Flow<String>

suspend fun daysUntilStableRelese(): Int
suspend fun daysUntilStableRelease(): Int
}
```
In your server code define how to respond by simply implementing the service:
@@ -43,7 +43,7 @@ class AwesomeServiceImpl(
}
}

override suspend fun daysUntilStableRelese(): Int {
override suspend fun daysUntilStableRelease(): Int {
return if (parameters.stable) 0 else {
parameters.daysUntilStable ?: error("Who says it will be stable?")
}
@@ -88,7 +88,7 @@ val rpcClient = HttpClient { installKrpc() }.rpc {

val service = rpcClient.withService<AwesomeService>()

service.daysUntilStableRelese()
service.daysUntilStableRelease()

streamScoped {
service.getNews("KotlinBurg").collect { article ->
@@ -114,9 +114,9 @@ that will set up code generation in a project.
Example of a setup in a project's `build.gradle.kts`:
```kotlin
plugins {
kotlin("multiplatform") version "2.1.0"
kotlin("plugin.serialization") version "2.1.0"
id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.0"
kotlin("multiplatform") version "2.1.20"
kotlin("plugin.serialization") version "2.1.20"
id("org.jetbrains.kotlinx.rpc.plugin") version "0.6.0"
}
```

@@ -131,15 +131,15 @@ And now you can add dependencies to your project:
```kotlin
dependencies {
// Client API
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:0.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:0.6.0")
// Server API
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:0.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:0.6.0")
// Serialization module. Also, protobuf and cbor are provided
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-serialization-json:0.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-serialization-json:0.6.0")

// Transport implementation for Ktor
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client:0.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server:0.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client:0.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server:0.6.0")

// Ktor API
implementation("io.ktor:ktor-client-cio-jvm:$ktor_version")
@@ -176,7 +176,8 @@ For a working example, see the [sample gRPC project](/samples/grpc-app).

## Kotlin compatibility
We support all stable Kotlin versions starting from 2.0.0:
- 2.0.0, 2.0.10, 2.0.20, 2.0.21, 2.1.0
- 2.0.0, 2.0.10, 2.0.20, 2.0.21
- 2.1.0, 2.1.10, 2.1.20

For a full compatibility checklist,
see [Versions](https://kotlin.github.io/kotlinx-rpc/versions.html).
10 changes: 5 additions & 5 deletions compiler-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

import util.otherwise
import util.whenForIde

plugins {
@@ -16,10 +15,11 @@ val kotlinLangVersion = libs.versions.kotlin.lang.get()

allprojects {
group = "org.jetbrains.kotlinx"
whenForIde {
version = "$kotlinCompilerVersion-$rpcVersion"
} otherwise {
version = "$kotlinLangVersion-$rpcVersion"

version = if (kotlinCompilerVersion != kotlinLangVersion) {
"$kotlinCompilerVersion-$rpcVersion"
} else {
"$kotlinLangVersion-$rpcVersion"
}
}

5 changes: 3 additions & 2 deletions compiler-plugin/compiler-plugin-backend/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
@@ -18,6 +18,7 @@ kotlin {
}

dependencies {
compileOnly(libs.kotlin.compiler.embeddable)
compileOnly(libs.kotlin.compiler)

implementation(projects.compilerPluginCommon)
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package kotlinx.rpc.codegen.extension
@@ -169,13 +169,17 @@ internal class RpcIrContext(
}

val dataCast by lazy {
namedFunction("kotlinx.rpc.internal", "dataCast")
namedFunction("kotlinx.rpc.internal", "rpcInternalDataCast")
}

val rpcClientCall by lazy {
rpcClient.namedFunction("call")
}

val rpcClientCallServerStreaming by lazy {
rpcClient.namedFunction("callServerStreaming")
}

val provideStubContext by lazy {
rpcClient.namedFunction("provideStubContext")
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package kotlinx.rpc.codegen.extension

import kotlinx.rpc.codegen.RpcIrServiceProcessorDelegate
import kotlinx.rpc.codegen.VersionSpecificApi
import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
@@ -20,7 +21,7 @@ class RpcIrExtension(configuration: CompilerConfiguration) : IrGenerationExtensi
) {
val context = RpcIrContext(pluginContext, VersionSpecificApi.INSTANCE)

val processor = RpcIrServiceProcessor(logger)
val processor = RpcIrServiceProcessorDelegate(RpcIrServiceProcessor(logger))
moduleFragment.transform(processor, context)
}
}
Original file line number Diff line number Diff line change
@@ -6,22 +6,18 @@ package kotlinx.rpc.codegen.extension

import kotlinx.rpc.codegen.common.RpcClassId
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
import org.jetbrains.kotlin.ir.IrStatement
import org.jetbrains.kotlin.ir.declarations.IrClass
import org.jetbrains.kotlin.ir.util.hasAnnotation
import org.jetbrains.kotlin.ir.util.isInterface
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer

internal class RpcIrServiceProcessor(
@Suppress("unused")
private val logger: MessageCollector,
) : IrElementTransformer<RpcIrContext> {
override fun visitClass(declaration: IrClass, data: RpcIrContext): IrStatement {
) {
fun visitClass(declaration: IrClass, data: RpcIrContext) {
if (declaration.hasAnnotation(RpcClassId.rpcAnnotation) && declaration.isInterface) {
processService(declaration, data)
}

return super.visitClass(declaration, data)
}

private fun processService(service: IrClass, context: RpcIrContext) {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/

package kotlinx.rpc.codegen.extension
@@ -530,7 +530,7 @@ internal class RpcStubGenerator(
returnType = method.function.returnType
modality = Modality.OPEN

isSuspend = true
isSuspend = method.function.isSuspend
}.apply {
val functionThisReceiver = vsApi {
stubClassThisReceiver.copyToVS(this@apply, origin = IrDeclarationOrigin.DEFINED)
@@ -550,6 +550,20 @@ internal class RpcStubGenerator(
overriddenSymbols = listOf(method.function.symbol)

body = irBuilder(symbol).irBlockBody {
if (method.function.isNonSuspendingWithFlowReturn()) {
+irReturn(
irRpcMethodClientCall(
method = method,
functionThisReceiver = functionThisReceiver,
isMethodObject = isMethodObject,
methodClass = methodClass,
arguments = arguments,
)
)

return@irBlockBody
}

+irReturn(
irCall(
callee = ctx.functions.scopedClientCall,
@@ -742,8 +756,14 @@ internal class RpcStubGenerator(
methodClass: IrClass,
arguments: List<IrValueParameter>,
): IrCall {
val callee = if (method.function.isNonSuspendingWithFlowReturn()) {
ctx.functions.rpcClientCallServerStreaming.symbol
} else {
ctx.functions.rpcClientCall.symbol
}

val call = irCall(
callee = ctx.functions.rpcClientCall.symbol,
callee = callee,
type = method.function.returnType,
typeArgumentsCount = 1,
).apply {
@@ -1218,13 +1238,15 @@ internal class RpcStubGenerator(
* ),
* ...
* ),
* isNonSuspendFunction = !function.isSuspend,
* )
*```
*
* Where:
* - `<callable-name>` - the name of the method (field)
* - `<callable-data-type>` - a method class for a method and `FieldDataObject` for fields
* - `<callable-return-type>` - the return type for the method and the field type for a field
* - `<callable-return-type>` - the return type for the method and the field type for a field.
* For a non-suspending flow the return type is its element type
* - `<callable-invokator>` - an invokator, previously generated by [generateInvokators]
* - `<method-parameter-name-k>` - if a method, its k-th parameter name
* - `<method-parameter-type-k>` - if a method, its k-th parameter type
@@ -1253,7 +1275,16 @@ internal class RpcStubGenerator(
putValueArgument(1, irRpcTypeCall(dataType))

val returnType = when (callable) {
is ServiceDeclaration.Method -> callable.function.returnType
is ServiceDeclaration.Method -> when {
callable.function.isNonSuspendingWithFlowReturn() -> {
(callable.function.returnType as IrSimpleType).arguments.single().typeOrFail
}

else -> {
callable.function.returnType
}
}

is ServiceDeclaration.FlowField -> callable.property.getterOrFail.returnType
}

@@ -1321,9 +1352,14 @@ internal class RpcStubGenerator(
}

putValueArgument(4, arrayOfCall)
putValueArgument(5, booleanConst(callable is ServiceDeclaration.Method && !callable.function.isSuspend))
}
}

private fun IrSimpleFunction.isNonSuspendingWithFlowReturn(): Boolean {
return returnType.classOrNull == ctx.flow && !isSuspend
}

/**
* Accessor function for the `callableMap` property
* Defined in `RpcServiceDescriptor`
@@ -1525,7 +1561,7 @@ internal class RpcStubGenerator(
}

/**
* IR call of the `RpcType(KType, Array<Annotation>)` function
* IR call of the `RpcType(KType)` function
*/
private fun irRpcTypeCall(type: IrType): IrConstructorCallImpl {
return vsApi {
@@ -1644,6 +1680,13 @@ internal class RpcStubGenerator(
value = value,
)

private fun booleanConst(value: Boolean) = IrConstImpl.boolean(
startOffset = UNDEFINED_OFFSET,
endOffset = UNDEFINED_OFFSET,
type = ctx.irBuiltIns.booleanType,
value = value,
)

private fun <T> vsApi(body: VersionSpecificApi.() -> T): T {
return ctx.versionSpecificApi.body()
}
Loading