diff --git a/README.md b/README.md
index 320b86a16..03faef104 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
[](https://kotlinlang.org/docs/components-stability.html)
[](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
-[](http://kotlinlang.org)
+[](http://kotlinlang.org)
[](http://www.apache.org/licenses/LICENSE-2.0)
[//]: # ([](https://teamcity.jetbrains.com/viewType.html?buildTypeId=Build_kRPC_All&guest=1))
@@ -114,8 +114,8 @@ 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.10"
- kotlin("plugin.serialization") version "2.1.10"
+ kotlin("multiplatform") version "2.1.20"
+ kotlin("plugin.serialization") version "2.1.20"
id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.1"
}
```
@@ -177,7 +177,7 @@ 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.1.10
+- 2.1.0, 2.1.10, 2.1.20
For a full compatibility checklist,
see [Versions](https://kotlin.github.io/kotlinx-rpc/versions.html).
diff --git a/docs/pages/kotlinx-rpc/topics/versions.topic b/docs/pages/kotlinx-rpc/topics/versions.topic
index 353f85d6a..e82ca3a0b 100644
--- a/docs/pages/kotlinx-rpc/topics/versions.topic
+++ b/docs/pages/kotlinx-rpc/topics/versions.topic
@@ -22,7 +22,7 @@
2.0.0, 2.0.10, 2.0.20, 2.0.21
- 2.1.0, 2.1.10
+ 2.1.0, 2.1.10, 2.1.20
Our code generation will support these versions (See more on code generation artifacts).
diff --git a/docs/pages/kotlinx-rpc/v.list b/docs/pages/kotlinx-rpc/v.list
index a0323eee4..7addb534a 100644
--- a/docs/pages/kotlinx-rpc/v.list
+++ b/docs/pages/kotlinx-rpc/v.list
@@ -15,5 +15,5 @@
-
+
diff --git a/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractBoxTest.kt b/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractBoxTest.kt
index bd3eeb163..2d9ce0848 100644
--- a/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractBoxTest.kt
+++ b/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractBoxTest.kt
@@ -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.test.runners
@@ -36,7 +36,7 @@ open class AbstractBoxTest : BaseTestRunner(), RunnerWithTargetBackendForTestGen
override val targetBackend: TargetBackend
get() = TargetBackend.JVM_IR
- override fun TestConfigurationBuilder.configuration() {
+ override fun configure(builder: TestConfigurationBuilder) = with(builder) {
configureFirParser(FirParser.LightTree)
defaultDirectives {
diff --git a/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractDiagnosticTest.kt b/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractDiagnosticTest.kt
index 6615505e0..7a7198921 100644
--- a/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractDiagnosticTest.kt
+++ b/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/AbstractDiagnosticTest.kt
@@ -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.test.runners
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.test.services.EnvironmentBasedStandardLibrariesPathP
import org.jetbrains.kotlin.test.services.KotlinStandardLibrariesPathProvider
abstract class AbstractDiagnosticTest : BaseTestRunner() {
- override fun TestConfigurationBuilder.configuration() {
+ override fun configure(builder: TestConfigurationBuilder) = with(builder) {
commonFirWithPluginFrontendConfiguration()
configureFirParser(FirParser.LightTree)
}
diff --git a/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/BaseTestRunner.kt b/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/BaseTestRunner.kt
index e1a831970..0bd5d5ef4 100644
--- a/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/BaseTestRunner.kt
+++ b/tests/compiler-plugin-tests/src/test/kotlin/kotlinx/rpc/codegen/test/runners/BaseTestRunner.kt
@@ -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.test.runners
@@ -8,11 +8,11 @@ import kotlinx.rpc.codegen.test.services.ExtensionRegistrarConfigurator
import kotlinx.rpc.codegen.test.services.RpcCompileClasspathProvider
import kotlinx.rpc.codegen.test.services.RpcRuntimeClasspathProvider
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
+import org.jetbrains.kotlin.test.configuration.baseFirDiagnosticTestConfiguration
import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives
import org.jetbrains.kotlin.test.initIdeaConfiguration
import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerTest
-import org.jetbrains.kotlin.test.runners.baseFirDiagnosticTestConfiguration
import org.jetbrains.kotlin.test.services.EnvironmentBasedStandardLibrariesPathProvider
import org.jetbrains.kotlin.test.services.KotlinStandardLibrariesPathProvider
import org.junit.jupiter.api.BeforeAll
diff --git a/tests/compiler-plugin-tests/src/testData/box/customParameterTypes.fir.ir.txt b/tests/compiler-plugin-tests/src/testData/box/customParameterTypes.fir.ir.txt
index 7536f8fe3..9c1caf41f 100644
--- a/tests/compiler-plugin-tests/src/testData/box/customParameterTypes.fir.ir.txt
+++ b/tests/compiler-plugin-tests/src/testData/box/customParameterTypes.fir.ir.txt
@@ -19,7 +19,7 @@ FILE fqName: fileName:/customParameterTypes.kt
CONSTRUCTOR GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] visibility:private <> () returnType:.TestData.Companion [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -40,7 +40,7 @@ FILE fqName: fileName:/customParameterTypes.kt
GET_OBJECT 'CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.TestData>]' type=.TestData.$serializer
CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.TestData>]
annotations:
- Deprecated(message = "This synthesized declaration should not be used directly", replaceWith = , level = GET_ENUM 'ENUM_ENTRY name:HIDDEN' type=kotlin.DeprecationLevel)
+ Deprecated(message = "This synthesized declaration should not be used directly", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:HIDDEN' type=kotlin.DeprecationLevel)
$this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestData.$serializer
PROPERTY GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:descriptor visibility:public modality:FINAL [val]
overridden:
@@ -72,7 +72,7 @@ FILE fqName: fileName:/customParameterTypes.kt
CONSTRUCTOR GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] visibility:private <> () returnType:.TestData.$serializer [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.TestData>]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.TestData>]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlinx.serialization.internal.GeneratedSerializer
@@ -99,12 +99,12 @@ FILE fqName: fileName:/customParameterTypes.kt
CALL 'public final fun arrayOf (vararg elements: T of kotlin.arrayOf): kotlin.Array declared in kotlin' type=kotlin.Array> origin=null
: kotlinx.serialization.KSerializer<*>
elements: VARARG type=kotlin.Array> varargElementType=kotlinx.serialization.KSerializer<*>
- GET_OBJECT 'CLASS OBJECT name:StringSerializer modality:FINAL visibility:internal superTypes:[kotlinx.serialization.KSerializer]' type=kotlinx.serialization.internal.StringSerializer
+ GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:StringSerializer modality:FINAL visibility:internal superTypes:[kotlinx.serialization.KSerializer]' type=kotlinx.serialization.internal.StringSerializer
FUN GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:deserialize visibility:public modality:FINAL <> ($this:.TestData.$serializer, decoder:kotlinx.serialization.encoding.Decoder) returnType:.TestData
overridden:
public abstract fun deserialize (decoder: kotlinx.serialization.encoding.Decoder): T of kotlinx.serialization.internal.GeneratedSerializer declared in kotlinx.serialization.internal.GeneratedSerializer
$this: VALUE_PARAMETER name: type:.TestData.$serializer
- VALUE_PARAMETER name:decoder index:0 type:kotlinx.serialization.encoding.Decoder
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:decoder index:0 type:kotlinx.serialization.encoding.Decoder
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlinx.serialization.descriptors.SerialDescriptor [val]
CALL 'public final fun (): kotlinx.serialization.descriptors.SerialDescriptor declared in .TestData.$serializer' type=kotlinx.serialization.descriptors.SerialDescriptor origin=GET_PROPERTY
@@ -183,8 +183,8 @@ FILE fqName: fileName:/customParameterTypes.kt
overridden:
public abstract fun serialize (encoder: kotlinx.serialization.encoding.Encoder, value: T of kotlinx.serialization.internal.GeneratedSerializer): kotlin.Unit declared in kotlinx.serialization.internal.GeneratedSerializer
$this: VALUE_PARAMETER name: type:.TestData.$serializer
- VALUE_PARAMETER name:encoder index:0 type:kotlinx.serialization.encoding.Encoder
- VALUE_PARAMETER name:value index:1 type:.TestData
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:encoder index:0 type:kotlinx.serialization.encoding.Encoder
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:value index:1 type:.TestData
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlinx.serialization.descriptors.SerialDescriptor [val]
CALL 'public final fun (): kotlinx.serialization.descriptors.SerialDescriptor declared in .TestData.$serializer' type=kotlinx.serialization.descriptors.SerialDescriptor origin=GET_PROPERTY
@@ -226,7 +226,7 @@ FILE fqName: fileName:/customParameterTypes.kt
VALUE_PARAMETER name:value index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestData modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestData modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' type=kotlin.Unit
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:.TestData) returnType:kotlin.String [operator]
$this: VALUE_PARAMETER name: type:.TestData
BLOCK_BODY
@@ -494,7 +494,7 @@ FILE fqName: fileName:/customParameterTypes.kt
CONSTRUCTOR visibility:private <> () returnType:.BoxService.$rpcServiceStub.Companion [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.FirRpcServiceStubCompanionObject] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlinx.rpc.descriptor.RpcServiceDescriptor<.BoxService>]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.FirRpcServiceStubCompanionObject] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlinx.rpc.descriptor.RpcServiceDescriptor<.BoxService>]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlinx.rpc.descriptor.RpcServiceDescriptor
@@ -560,7 +560,7 @@ FILE fqName: fileName:/customParameterTypes.kt
CONSTRUCTOR GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] visibility:private <> () returnType:.BoxService.$rpcServiceStub.test1$rpcMethod.Companion [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -581,7 +581,7 @@ FILE fqName: fileName:/customParameterTypes.kt
GET_OBJECT 'CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.BoxService.$rpcServiceStub.test1$rpcMethod>]' type=.BoxService.$rpcServiceStub.test1$rpcMethod.$serializer
CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.BoxService.$rpcServiceStub.test1$rpcMethod>]
annotations:
- Deprecated(message = "This synthesized declaration should not be used directly", replaceWith = , level = GET_ENUM 'ENUM_ENTRY name:HIDDEN' type=kotlin.DeprecationLevel)
+ Deprecated(message = "This synthesized declaration should not be used directly", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:HIDDEN' type=kotlin.DeprecationLevel)
$this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.BoxService.$rpcServiceStub.test1$rpcMethod.$serializer
PROPERTY GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:descriptor visibility:public modality:FINAL [val]
overridden:
@@ -613,7 +613,7 @@ FILE fqName: fileName:/customParameterTypes.kt
CONSTRUCTOR GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] visibility:private <> () returnType:.BoxService.$rpcServiceStub.test1$rpcMethod.$serializer [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.BoxService.$rpcServiceStub.test1$rpcMethod>]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.BoxService.$rpcServiceStub.test1$rpcMethod>]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlinx.serialization.internal.GeneratedSerializer
@@ -645,7 +645,7 @@ FILE fqName: fileName:/customParameterTypes.kt
overridden:
public abstract fun deserialize (decoder: kotlinx.serialization.encoding.Decoder): T of kotlinx.serialization.internal.GeneratedSerializer declared in kotlinx.serialization.internal.GeneratedSerializer
$this: VALUE_PARAMETER name: type:.BoxService.$rpcServiceStub.test1$rpcMethod.$serializer
- VALUE_PARAMETER name:decoder index:0 type:kotlinx.serialization.encoding.Decoder
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:decoder index:0 type:kotlinx.serialization.encoding.Decoder
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlinx.serialization.descriptors.SerialDescriptor [val]
CALL 'public final fun (): kotlinx.serialization.descriptors.SerialDescriptor declared in .BoxService.$rpcServiceStub.test1$rpcMethod.$serializer' type=kotlinx.serialization.descriptors.SerialDescriptor origin=GET_PROPERTY
@@ -730,8 +730,8 @@ FILE fqName: fileName:/customParameterTypes.kt
overridden:
public abstract fun serialize (encoder: kotlinx.serialization.encoding.Encoder, value: T of kotlinx.serialization.internal.GeneratedSerializer): kotlin.Unit declared in kotlinx.serialization.internal.GeneratedSerializer
$this: VALUE_PARAMETER name: type:.BoxService.$rpcServiceStub.test1$rpcMethod.$serializer
- VALUE_PARAMETER name:encoder index:0 type:kotlinx.serialization.encoding.Encoder
- VALUE_PARAMETER name:value index:1 type:.BoxService.$rpcServiceStub.test1$rpcMethod
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:encoder index:0 type:kotlinx.serialization.encoding.Encoder
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:value index:1 type:.BoxService.$rpcServiceStub.test1$rpcMethod
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp_19 type:kotlinx.serialization.descriptors.SerialDescriptor [val]
CALL 'public final fun (): kotlinx.serialization.descriptors.SerialDescriptor declared in .BoxService.$rpcServiceStub.test1$rpcMethod.$serializer' type=kotlinx.serialization.descriptors.SerialDescriptor origin=GET_PROPERTY
@@ -751,7 +751,7 @@ FILE fqName: fileName:/customParameterTypes.kt
VALUE_PARAMETER GENERATED[kotlinx.rpc.codegen.RpcGeneratedRpcMethodClassKey] name:testData index:0 type:.TestData
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.RpcGeneratedRpcMethodClassKey] CLASS name:test1$rpcMethod modality:FINAL visibility:public superTypes:[kotlin.Any; kotlinx.rpc.internal.RpcMethodClass]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.RpcGeneratedRpcMethodClassKey] CLASS name:test1$rpcMethod modality:FINAL visibility:public superTypes:[kotlin.Any; kotlinx.rpc.internal.RpcMethodClass]' type=kotlin.Unit
CONSTRUCTOR KOTLINX_SERIALIZATION visibility:internal <> (seen0:kotlin.Int, testData:.TestData?, serializationConstructorMarker:kotlinx.serialization.internal.SerializationConstructorMarker?) returnType:.BoxService.$rpcServiceStub.test1$rpcMethod
VALUE_PARAMETER KOTLINX_SERIALIZATION name:seen0 index:0 type:kotlin.Int
VALUE_PARAMETER KOTLINX_SERIALIZATION name:testData index:1 type:.TestData?
@@ -833,7 +833,7 @@ FILE fqName: fileName:/customParameterTypes.kt
CONSTRUCTOR GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] visibility:private <> () returnType:.BoxService.$rpcServiceStub.test2$rpcMethod.Companion [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -854,7 +854,7 @@ FILE fqName: fileName:/customParameterTypes.kt
GET_OBJECT 'CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.BoxService.$rpcServiceStub.test2$rpcMethod>]' type=.BoxService.$rpcServiceStub.test2$rpcMethod.$serializer
CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.BoxService.$rpcServiceStub.test2$rpcMethod>]
annotations:
- Deprecated(message = "This synthesized declaration should not be used directly", replaceWith = , level = GET_ENUM 'ENUM_ENTRY name:HIDDEN' type=kotlin.DeprecationLevel)
+ Deprecated(message = "This synthesized declaration should not be used directly", replaceWith = , level = GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:HIDDEN' type=kotlin.DeprecationLevel)
$this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.BoxService.$rpcServiceStub.test2$rpcMethod.$serializer
PROPERTY GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:descriptor visibility:public modality:FINAL [val]
overridden:
@@ -886,7 +886,7 @@ FILE fqName: fileName:/customParameterTypes.kt
CONSTRUCTOR GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] visibility:private <> () returnType:.BoxService.$rpcServiceStub.test2$rpcMethod.$serializer [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.BoxService.$rpcServiceStub.test2$rpcMethod>]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS KOTLINX_SERIALIZATION OBJECT name:$serializer modality:FINAL visibility:public superTypes:[kotlinx.serialization.internal.GeneratedSerializer<.BoxService.$rpcServiceStub.test2$rpcMethod>]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlinx.serialization.internal.GeneratedSerializer
@@ -918,7 +918,7 @@ FILE fqName: fileName:/customParameterTypes.kt
overridden:
public abstract fun deserialize (decoder: kotlinx.serialization.encoding.Decoder): T of kotlinx.serialization.internal.GeneratedSerializer declared in kotlinx.serialization.internal.GeneratedSerializer
$this: VALUE_PARAMETER name: type:.BoxService.$rpcServiceStub.test2$rpcMethod.$serializer
- VALUE_PARAMETER name:decoder index:0 type:kotlinx.serialization.encoding.Decoder
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:decoder index:0 type:kotlinx.serialization.encoding.Decoder
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp_22 type:kotlinx.serialization.descriptors.SerialDescriptor [val]
CALL 'public final fun (): kotlinx.serialization.descriptors.SerialDescriptor declared in .BoxService.$rpcServiceStub.test2$rpcMethod.$serializer' type=kotlinx.serialization.descriptors.SerialDescriptor origin=GET_PROPERTY
@@ -1003,8 +1003,8 @@ FILE fqName: fileName:/customParameterTypes.kt
overridden:
public abstract fun serialize (encoder: kotlinx.serialization.encoding.Encoder, value: T of kotlinx.serialization.internal.GeneratedSerializer): kotlin.Unit declared in kotlinx.serialization.internal.GeneratedSerializer
$this: VALUE_PARAMETER name: type:.BoxService.$rpcServiceStub.test2$rpcMethod.$serializer
- VALUE_PARAMETER name:encoder index:0 type:kotlinx.serialization.encoding.Encoder
- VALUE_PARAMETER name:value index:1 type:.BoxService.$rpcServiceStub.test2$rpcMethod
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:encoder index:0 type:kotlinx.serialization.encoding.Encoder
+ VALUE_PARAMETER GENERATED[org.jetbrains.kotlinx.serialization.compiler.fir.SerializationPluginKey] name:value index:1 type:.BoxService.$rpcServiceStub.test2$rpcMethod
BLOCK_BODY
VAR IR_TEMPORARY_VARIABLE name:tmp_28 type:kotlinx.serialization.descriptors.SerialDescriptor [val]
CALL 'public final fun (): kotlinx.serialization.descriptors.SerialDescriptor declared in .BoxService.$rpcServiceStub.test2$rpcMethod.$serializer' type=kotlinx.serialization.descriptors.SerialDescriptor origin=GET_PROPERTY
@@ -1024,7 +1024,7 @@ FILE fqName: fileName:/customParameterTypes.kt
VALUE_PARAMETER GENERATED[kotlinx.rpc.codegen.RpcGeneratedRpcMethodClassKey] name:testData index:0 type:.TestData
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.RpcGeneratedRpcMethodClassKey] CLASS name:test2$rpcMethod modality:FINAL visibility:public superTypes:[kotlin.Any; kotlinx.rpc.internal.RpcMethodClass]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.RpcGeneratedRpcMethodClassKey] CLASS name:test2$rpcMethod modality:FINAL visibility:public superTypes:[kotlin.Any; kotlinx.rpc.internal.RpcMethodClass]' type=kotlin.Unit
CONSTRUCTOR KOTLINX_SERIALIZATION visibility:internal <> (seen0:kotlin.Int, testData:.TestData?, serializationConstructorMarker:kotlinx.serialization.internal.SerializationConstructorMarker?) returnType:.BoxService.$rpcServiceStub.test2$rpcMethod
VALUE_PARAMETER KOTLINX_SERIALIZATION name:seen0 index:0 type:kotlin.Int
VALUE_PARAMETER KOTLINX_SERIALIZATION name:testData index:1 type:.TestData?
@@ -1091,7 +1091,7 @@ FILE fqName: fileName:/customParameterTypes.kt
VALUE_PARAMETER name:__rpc_client index:1 type:kotlinx.rpc.RpcClient
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.RpcGeneratedStubKey] CLASS name:$rpcServiceStub modality:FINAL visibility:public superTypes:[.BoxService]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.RpcGeneratedStubKey] CLASS name:$rpcServiceStub modality:FINAL visibility:public superTypes:[.BoxService]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .BoxService
@@ -1195,14 +1195,14 @@ FILE fqName: fileName:/customParameterTypes.kt
CALL 'public abstract fun test1 (testData: .TestData): kotlin.String declared in .BoxService' type=kotlin.String origin=null
$this: CALL 'public final fun withService (): T of kotlinx.rpc.withService declared in kotlinx.rpc' type=.BoxService origin=null
: .BoxService
- $receiver: GET_OBJECT 'CLASS OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
+ $receiver: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
testData: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) declared in .TestData' type=.TestData origin=null
value: CONST String type=kotlin.String value="value"
VAR name:test2 type:kotlin.String [val]
CALL 'public abstract fun test2 (testData: .TestData): kotlin.String declared in .BoxService' type=kotlin.String origin=null
$this: CALL 'public final fun withService (): T of kotlinx.rpc.withService declared in kotlinx.rpc' type=.BoxService origin=null
: .BoxService
- $receiver: GET_OBJECT 'CLASS OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
+ $receiver: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
testData: CONSTRUCTOR_CALL 'public constructor (value: kotlin.String) declared in .TestData' type=.TestData origin=null
value: CONST String type=kotlin.String value="value"
RETURN type=kotlin.Nothing from='local final fun (): kotlin.String declared in .box'
diff --git a/tests/compiler-plugin-tests/src/testData/box/fields.fir.ir.txt b/tests/compiler-plugin-tests/src/testData/box/fields.fir.ir.txt
index b402c4130..1dab42ad0 100644
--- a/tests/compiler-plugin-tests/src/testData/box/fields.fir.ir.txt
+++ b/tests/compiler-plugin-tests/src/testData/box/fields.fir.ir.txt
@@ -287,7 +287,7 @@ FILE fqName: fileName:/fields.kt
CONSTRUCTOR visibility:private <> () returnType:.BoxService.$rpcServiceStub.Companion [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.FirRpcServiceStubCompanionObject] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlinx.rpc.descriptor.RpcServiceDescriptor<.BoxService>]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.FirRpcServiceStubCompanionObject] OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlinx.rpc.descriptor.RpcServiceDescriptor<.BoxService>]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlinx.rpc.descriptor.RpcServiceDescriptor
@@ -345,7 +345,7 @@ FILE fqName: fileName:/fields.kt
VALUE_PARAMETER name:__rpc_client index:1 type:kotlinx.rpc.RpcClient
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any'
- INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.RpcGeneratedStubKey] CLASS name:$rpcServiceStub modality:FINAL visibility:public superTypes:[.BoxService]'
+ INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[kotlinx.rpc.codegen.RpcGeneratedStubKey] CLASS name:$rpcServiceStub modality:FINAL visibility:public superTypes:[.BoxService]' type=kotlin.Unit
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in .BoxService
@@ -417,7 +417,7 @@ FILE fqName: fileName:/fields.kt
$receiver: CALL 'public abstract fun (): kotlinx.coroutines.flow.Flow declared in .BoxService' type=kotlinx.coroutines.flow.Flow origin=GET_PROPERTY
$this: CALL 'public final fun withService (): T of kotlinx.rpc.withService declared in kotlinx.rpc' type=.BoxService origin=null
: .BoxService
- $receiver: GET_OBJECT 'CLASS OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
+ $receiver: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
VAR name:sharedFlow type:kotlin.collections.List [val]
CALL 'public final fun toList (destination: kotlin.collections.MutableList): kotlin.collections.List declared in kotlinx.coroutines.flow' type=kotlin.collections.List origin=null
: kotlin.String
@@ -426,14 +426,14 @@ FILE fqName: fileName:/fields.kt
$receiver: CALL 'public abstract fun (): kotlinx.coroutines.flow.SharedFlow declared in .BoxService' type=kotlinx.coroutines.flow.SharedFlow origin=GET_PROPERTY
$this: CALL 'public final fun withService (): T of kotlinx.rpc.withService declared in kotlinx.rpc' type=.BoxService origin=null
: .BoxService
- $receiver: GET_OBJECT 'CLASS OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
+ $receiver: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
count: CONST Int type=kotlin.Int value=1
VAR name:stateFlow type:kotlin.String [val]
CALL 'public abstract fun (): T of kotlinx.coroutines.flow.StateFlow declared in kotlinx.coroutines.flow.StateFlow' type=kotlin.String origin=GET_PROPERTY
$this: CALL 'public abstract fun (): kotlinx.coroutines.flow.StateFlow declared in .BoxService' type=kotlinx.coroutines.flow.StateFlow origin=GET_PROPERTY
$this: CALL 'public final fun withService (): T of kotlinx.rpc.withService declared in kotlinx.rpc' type=.BoxService origin=null
: .BoxService
- $receiver: GET_OBJECT 'CLASS OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
+ $receiver: GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:TestRpcClient modality:FINAL visibility:public superTypes:[kotlinx.rpc.RpcClient]' type=kotlinx.rpc.codegen.test.TestRpcClient
VAR name:failures type:kotlin.collections.MutableList [val]
CALL 'public final fun mutableListOf (): kotlin.collections.MutableList declared in kotlin.collections' type=kotlin.collections.MutableList origin=null
: kotlin.String
@@ -459,13 +459,13 @@ FILE fqName: fileName:/fields.kt
BLOCK type=kotlin.Boolean origin=null
CALL 'public abstract fun add (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.MutableList' type=kotlin.Boolean origin=null
$this: GET_VAR 'val failures: kotlin.collections.MutableList declared in .box..' type=kotlin.collections.MutableList origin=null
- element: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS
- $this: STRING_CONCATENATION type=kotlin.String
+ element: STRING_CONCATENATION type=kotlin.String
+ STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="plainFlow.size = "
CALL 'public abstract fun (): kotlin.Int declared in kotlin.collections.List' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val plainFlow: kotlin.collections.List declared in .box..' type=kotlin.collections.List origin=null
CONST String type=kotlin.String value=" (expected 1), "
- other: STRING_CONCATENATION type=kotlin.String
+ STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="plainFlow[0] = \""
CALL 'public final fun getOrNull (index: kotlin.Int): T of kotlin.collections.getOrNull? declared in kotlin.collections' type=kotlin.String? origin=null
: kotlin.String
@@ -494,13 +494,13 @@ FILE fqName: fileName:/fields.kt
BLOCK type=kotlin.Boolean origin=null
CALL 'public abstract fun add (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.MutableList' type=kotlin.Boolean origin=null
$this: GET_VAR 'val failures: kotlin.collections.MutableList declared in .box..' type=kotlin.collections.MutableList origin=null
- element: CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS
- $this: STRING_CONCATENATION type=kotlin.String
+ element: STRING_CONCATENATION type=kotlin.String
+ STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="sharedFlow.size = "
CALL 'public abstract fun (): kotlin.Int declared in kotlin.collections.List' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'val sharedFlow: kotlin.collections.List declared in .box..' type=kotlin.collections.List origin=null
CONST String type=kotlin.String value=" (expected 1), "
- other: STRING_CONCATENATION type=kotlin.String
+ STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="sharedFlow[0] = \""
CALL 'public final fun getOrNull (index: kotlin.Int): T of kotlin.collections.getOrNull? declared in kotlin.collections' type=kotlin.String? origin=null
: kotlin.String
diff --git a/tests/compiler-plugin-tests/src/testData/box/fields.fir.txt b/tests/compiler-plugin-tests/src/testData/box/fields.fir.txt
index a50dc03b1..26699a18d 100644
--- a/tests/compiler-plugin-tests/src/testData/box/fields.fir.txt
+++ b/tests/compiler-plugin-tests/src/testData/box/fields.fir.txt
@@ -25,13 +25,13 @@ FILE: fields.kt
lval failures: R|kotlin/collections/MutableList| = R|kotlin/collections/mutableListOf|()
when () {
!=(R|/plainFlow|.R|SubstitutionOverride|, Int(1)) || !=(R|/plainFlow|.R|SubstitutionOverride|(Int(0)), String(registerPlainFlowField_42)) -> {
- R|/failures|.R|SubstitutionOverride|((String(plainFlow.size = ), R|/plainFlow|.R|SubstitutionOverride|, String( (expected 1), )).R|kotlin/String.plus|((String(plainFlow[0] = ), String("), R|/plainFlow|.R|kotlin/collections/getOrNull|(Int(0)), String("), String( (expected ), String("), String(registerPlainFlowField_42), String("), String()))))
+ R|/failures|.R|SubstitutionOverride|(((String(plainFlow.size = ), R|/plainFlow|.R|SubstitutionOverride|, String( (expected 1), )), (String(plainFlow[0] = ), String("), R|/plainFlow|.R|kotlin/collections/getOrNull|(Int(0)), String("), String( (expected ), String("), String(registerPlainFlowField_42), String("), String()))))
}
}
when () {
!=(R|/sharedFlow|.R|SubstitutionOverride|, Int(1)) || !=(R|/sharedFlow|.R|SubstitutionOverride|(Int(0)), String(registerSharedFlowField_42)) -> {
- R|/failures|.R|SubstitutionOverride|((String(sharedFlow.size = ), R|/sharedFlow|.R|SubstitutionOverride|, String( (expected 1), )).R|kotlin/String.plus|((String(sharedFlow[0] = ), String("), R|/sharedFlow|.R|kotlin/collections/getOrNull|(Int(0)), String("), String( (expected ), String("), String(registerSharedFlowField_42), String("), String()))))
+ R|