Skip to content

Commit 8df7573

Browse files
authored
Replaced old library name in code (#53)
* Updated library name usage in code, configs and kDOCs
1 parent ebfdb45 commit 8df7573

File tree

111 files changed

+296
-927
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+296
-927
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# for local ci builds
22
FROM stl5/ktor-test-image
3-
WORKDIR krpc/
3+
WORKDIR rpc/
44
COPY . .

build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ plugins {
1616
}
1717

1818
object Const {
19-
const val KRPC_COMPILER_PLUGIN_MODULE_NAME = "kotlinx-rpc-compiler-plugin"
20-
const val INTERNAL_KRPC_API_ANNOTATION = "kotlinx.rpc.internal.InternalKRPCApi"
19+
const val COMPILER_PLUGIN_MODULE_NAME = "kotlinx-rpc-compiler-plugin"
20+
const val INTERNAL_RPC_API_ANNOTATION = "kotlinx.rpc.internal.InternalRPCApi"
2121
}
2222

2323
apiValidation {
24-
val compilerPluginModules = subprojects.single { it.name == Const.KRPC_COMPILER_PLUGIN_MODULE_NAME }.let {
24+
val compilerPluginModules = subprojects.single { it.name == Const.COMPILER_PLUGIN_MODULE_NAME }.let {
2525
it.subprojects.map { sub -> sub.name }
26-
} + Const.KRPC_COMPILER_PLUGIN_MODULE_NAME
26+
} + Const.COMPILER_PLUGIN_MODULE_NAME
2727

2828
ignoredProjects.addAll(
2929
listOf(
@@ -36,7 +36,7 @@ apiValidation {
3636
) + compilerPluginModules
3737
)
3838

39-
nonPublicMarkers.add(Const.INTERNAL_KRPC_API_ANNOTATION)
39+
nonPublicMarkers.add(Const.INTERNAL_RPC_API_ANNOTATION)
4040
}
4141

4242
val kotlinVersion: String by extra
@@ -47,7 +47,7 @@ if (kotlinVersion >= "1.8.0") {
4747

4848
allprojects {
4949
group = "org.jetbrains.kotlinx"
50-
version = rootProject.libs.versions.krpc.full.get()
50+
version = rootProject.libs.versions.rpc.full.get()
5151
}
5252

5353
println("kotlinx.rpc project version: $version")

compiler-plugin/compiler-plugin-1_7/src/main/kotlin/kotlinx/rpc/codegen/KRPCCompilerPlugin.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ import org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
1111
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
1212
import org.jetbrains.kotlin.config.CompilerConfiguration
1313

14-
class KRPCCommandLineProcessor : CommandLineProcessor {
15-
override val pluginId = "kotlinx.rpc.krpc-compiler-plugin"
14+
class RPCCommandLineProcessor : CommandLineProcessor {
15+
override val pluginId = "kotlinx.rpc.compiler-plugin"
1616

1717
override val pluginOptions = emptyList<CliOption>()
1818
}
1919

20-
class KRPCCompilerPlugin : ComponentRegistrar {
20+
class RPCCompilerPlugin : ComponentRegistrar {
2121
init {
2222
VersionSpecificApi.upload(VersionSpecificApiImpl)
2323
}
2424

2525
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
26-
val extension = KRPCCompilerPluginCore.provideExtension(configuration)
26+
val extension = RPCCompilerPluginCore.provideExtension(configuration)
2727

2828
IrGenerationExtension.registerExtension(project, extension)
2929
}

compiler-plugin/compiler-plugin-1_7/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
kotlinx.rpc.codegen.KRPCCommandLineProcessor
5+
kotlinx.rpc.codegen.RPCCommandLineProcessor

compiler-plugin/compiler-plugin-1_7/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
kotlinx.rpc.codegen.KRPCCompilerPlugin
5+
kotlinx.rpc.codegen.RPCCompilerPlugin

compiler-plugin/compiler-plugin-1_7_2/src/main/kotlin/kotlinx/rpc/codegen/KRPCCompilerPlugin.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ import org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
1111
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
1212
import org.jetbrains.kotlin.config.CompilerConfiguration
1313

14-
class KRPCCommandLineProcessor : CommandLineProcessor {
15-
override val pluginId = "kotlinx.rpc.krpc-compiler-plugin"
14+
class RPCCommandLineProcessor : CommandLineProcessor {
15+
override val pluginId = "kotlinx.rpc.compiler-plugin"
1616

1717
override val pluginOptions = emptyList<CliOption>()
1818
}
1919

20-
class KRPCCompilerPlugin : ComponentRegistrar {
20+
class RPCCompilerPlugin : ComponentRegistrar {
2121
init {
2222
VersionSpecificApi.upload(VersionSpecificApiImpl)
2323
}
2424

2525
override val supportsK2: Boolean = false
2626

2727
override fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration) {
28-
val extension = KRPCCompilerPluginCore.provideExtension(configuration)
28+
val extension = RPCCompilerPluginCore.provideExtension(configuration)
2929

3030
IrGenerationExtension.registerExtension(project, extension)
3131
}

compiler-plugin/compiler-plugin-1_7_2/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
kotlinx.rpc.codegen.KRPCCommandLineProcessor
5+
kotlinx.rpc.codegen.RPCCommandLineProcessor

compiler-plugin/compiler-plugin-1_7_2/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
kotlinx.rpc.codegen.KRPCCompilerPlugin
5+
kotlinx.rpc.codegen.RPCCompilerPlugin

compiler-plugin/compiler-plugin-1_8/src/main/kotlin/kotlinx/rpc/codegen/KRPCCompilerPlugin.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
1212
import org.jetbrains.kotlin.config.CompilerConfiguration
1313

1414
@OptIn(ExperimentalCompilerApi::class)
15-
class KRPCCommandLineProcessor : CommandLineProcessor {
16-
override val pluginId = "kotlinx.rpc.krpc-compiler-plugin"
15+
class RPCCommandLineProcessor : CommandLineProcessor {
16+
override val pluginId = "kotlinx.rpc.compiler-plugin"
1717

1818
override val pluginOptions = emptyList<CliOption>()
1919
}
2020

2121
@OptIn(ExperimentalCompilerApi::class)
22-
class KRPCCompilerPlugin : CompilerPluginRegistrar() {
22+
class RPCCompilerPlugin : CompilerPluginRegistrar() {
2323
init {
2424
VersionSpecificApi.upload(VersionSpecificApiImpl)
2525
}
2626

2727
override val supportsK2: Boolean = false
2828

2929
override fun ExtensionStorage.registerExtensions(configuration: CompilerConfiguration) {
30-
val extension = KRPCCompilerPluginCore.provideExtension(configuration)
30+
val extension = RPCCompilerPluginCore.provideExtension(configuration)
3131

3232
IrGenerationExtension.registerExtension(extension)
3333
}

compiler-plugin/compiler-plugin-1_8/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
kotlinx.rpc.codegen.KRPCCommandLineProcessor
5+
kotlinx.rpc.codegen.RPCCommandLineProcessor

compiler-plugin/compiler-plugin-1_8/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
kotlinx.rpc.codegen.KRPCCompilerPlugin
5+
kotlinx.rpc.codegen.RPCCompilerPlugin

compiler-plugin/compiler-plugin-1_9/src/main/kotlin/kotlinx/rpc/codegen/KRPCCompilerPlugin.kt renamed to compiler-plugin/compiler-plugin-1_9/src/main/kotlin/kotlinx/rpc/codegen/RPCCompilerPlugin.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
1212
import org.jetbrains.kotlin.config.CompilerConfiguration
1313

1414
@OptIn(ExperimentalCompilerApi::class)
15-
class KRPCCommandLineProcessor : CommandLineProcessor {
16-
override val pluginId = "kotlinx.rpc.krpc-compiler-plugin"
15+
class RPCCommandLineProcessor : CommandLineProcessor {
16+
override val pluginId = "kotlinx.rpc.compiler-plugin"
1717

1818
override val pluginOptions = emptyList<CliOption>()
1919
}
2020

2121
@OptIn(ExperimentalCompilerApi::class)
22-
class KRPCCompilerPlugin : CompilerPluginRegistrar() {
22+
class RPCCompilerPlugin : CompilerPluginRegistrar() {
2323
init {
2424
VersionSpecificApi.upload(VersionSpecificApiImpl)
2525
}
2626

2727
override val supportsK2: Boolean = false
2828

2929
override fun ExtensionStorage.registerExtensions(configuration: CompilerConfiguration) {
30-
val extension = KRPCCompilerPluginCore.provideExtension(configuration)
30+
val extension = RPCCompilerPluginCore.provideExtension(configuration)
3131

3232
IrGenerationExtension.registerExtension(extension)
3333
}

compiler-plugin/compiler-plugin-1_9/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
kotlinx.rpc.codegen.KRPCCommandLineProcessor
5+
kotlinx.rpc.codegen.RPCCommandLineProcessor

compiler-plugin/compiler-plugin-1_9/src/main/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
kotlinx.rpc.codegen.KRPCCompilerPlugin
5+
kotlinx.rpc.codegen.RPCCompilerPlugin

compiler-plugin/compiler-plugin-core/src/main/kotlin/kotlinx/rpc/codegen/KRPCCompilerPluginCore.kt renamed to compiler-plugin/compiler-plugin-core/src/main/kotlin/kotlinx/rpc/codegen/RPCCompilerPluginCore.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
package kotlinx.rpc.codegen
66

7-
import kotlinx.rpc.codegen.extension.KRPCIrExtension
7+
import kotlinx.rpc.codegen.extension.RPCIrExtension
88
import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
99
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
1010
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
1111
import org.jetbrains.kotlin.config.CompilerConfiguration
1212

13-
object KRPCCompilerPluginCore {
13+
object RPCCompilerPluginCore {
1414
fun provideExtension(configuration: CompilerConfiguration): IrGenerationExtension {
1515
val logger = configuration.get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE)
1616
val versionSpecificApi = VersionSpecificApi.loadService()
1717

18-
return KRPCIrExtension(logger, versionSpecificApi)
18+
return RPCIrExtension(logger, versionSpecificApi)
1919
}
2020
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import org.jetbrains.kotlin.ir.declarations.IrClass
1010
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
1111
import org.jetbrains.kotlin.ir.util.kotlinFqName
1212

13-
internal class KRPCIrContext(
13+
internal class RPCIrContext(
1414
private val pluginContext: IrPluginContext,
1515
private val versionSpecificApi: VersionSpecificApi,
1616
) {
@@ -33,8 +33,8 @@ internal class KRPCIrContext(
3333
getRpcIrClassSymbol("WithRPCClientObject", "internal")
3434
}
3535

36-
val internalKRPCApiAnnotation by lazy {
37-
getRpcIrClassSymbol("InternalKRPCApi", "internal")
36+
val internalRPCApiAnnotation by lazy {
37+
getRpcIrClassSymbol("InternalRPCApi", "internal")
3838
}
3939

4040
private fun getRpcIrClassSymbol(name: String, subpackage: String? = null): IrClassSymbol {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.cli.common.messages.MessageCollector
1111
import org.jetbrains.kotlin.ir.declarations.IrModuleFragment
1212
import org.jetbrains.kotlin.platform.konan.isNative
1313

14-
internal class KRPCIrExtension(
14+
internal class RPCIrExtension(
1515
private val logger: MessageCollector,
1616
private val versionSpecificApi: VersionSpecificApi,
1717
) : IrGenerationExtension {
@@ -20,9 +20,9 @@ internal class KRPCIrExtension(
2020
pluginContext: IrPluginContext,
2121
) {
2222
if (versionSpecificApi.isJs(pluginContext.platform) || pluginContext.platform.isNative()) {
23-
val context = KRPCIrContext(pluginContext, versionSpecificApi)
23+
val context = RPCIrContext(pluginContext, versionSpecificApi)
2424

25-
moduleFragment.transform(KRPCIrServiceProcessor(logger), context)
25+
moduleFragment.transform(RPCIrServiceProcessor(logger), context)
2626
}
2727
}
2828
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import org.jetbrains.kotlin.ir.util.constructors
1515
import org.jetbrains.kotlin.ir.util.isInterface
1616
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
1717

18-
internal class KRPCIrServiceProcessor(
18+
internal class RPCIrServiceProcessor(
1919
@Suppress("unused")
2020
private val logger: MessageCollector,
21-
) : IrElementTransformer<KRPCIrContext> {
22-
override fun visitClass(declaration: IrClass, data: KRPCIrContext): IrStatement {
21+
) : IrElementTransformer<RPCIrContext> {
22+
override fun visitClass(declaration: IrClass, data: RPCIrContext): IrStatement {
2323
if (declaration.isInterface &&
2424
// data.rpc is resolved lazily, so first check is rather heuristic
2525
declaration.maybeRPC() &&
@@ -33,7 +33,7 @@ internal class KRPCIrServiceProcessor(
3333

3434
private fun IrClass.maybeRPC() = superTypes.any { it.classFqName?.asString()?.contains("RPC") == true }
3535

36-
private fun addAssociatedObjectAnnotation(declaration: IrClass, data: KRPCIrContext) {
36+
private fun addAssociatedObjectAnnotation(declaration: IrClass, data: RPCIrContext) {
3737
declaration.annotations += IrConstructorCallImpl(
3838
startOffset = declaration.startOffset,
3939
endOffset = declaration.endOffset,
@@ -43,16 +43,16 @@ internal class KRPCIrServiceProcessor(
4343
constructorTypeArgumentsCount = 0,
4444
valueArgumentsCount = 1,
4545
).apply {
46-
val internalKRPCApiClassReferenceType = data.internalKRPCApiAnnotation.typeWith()
46+
val internalRPCApiClassReferenceType = data.internalRPCApiAnnotation.typeWith()
4747

4848
putValueArgument(
4949
index = 0,
5050
valueArgument = IrClassReferenceImpl(
5151
startOffset = startOffset,
5252
endOffset = endOffset,
53-
type = data.irBuiltIns.kClassClass.typeWith(internalKRPCApiClassReferenceType),
54-
symbol = data.internalKRPCApiAnnotation,
55-
classType = internalKRPCApiClassReferenceType
53+
type = data.irBuiltIns.kClassClass.typeWith(internalRPCApiClassReferenceType),
54+
symbol = data.internalRPCApiAnnotation,
55+
classType = internalRPCApiClassReferenceType
5656
)
5757
)
5858
}

detekt/baseline.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<SmellBaseline>
77
<ManuallySuppressedIssues>
8-
<ID>ReturnCount:ExceptionUtils.jvm.kt$@InternalKRPCApi public actual fun SerializedException.deserialize(): Throwable</ID>
8+
<ID>ReturnCount:ExceptionUtils.jvm.kt$@InternalRPCApi public actual fun SerializedException.deserialize(): Throwable</ID>
99
<ID>CyclomaticComplexMethod:RPCServerService.kt$RPCServerService$@Suppress("detekt.ThrowsCount", "detekt.LongMethod") private fun handleCall(callData: RPCCallMessage.CallData)</ID>
1010
<ID>LongMethod:RPCServerService.kt$RPCServerService$@OptIn(InternalCoroutinesApi::class) private fun handleCall(callData: RPCCallMessage.CallData)</ID>
1111
<ID>RethrowCaughtException:KRPCTransportTestBase.kt$KRPCTransportTestBase$throw e</ID>

gradle-conventions/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ dependencies {
3232
gradlePlugin {
3333
plugins {
3434
named("conventions-common") {
35-
version = libs.versions.krpc.core.get()
35+
version = libs.versions.rpc.core.get()
3636
}
3737
}
3838

3939
plugins {
4040
named("conventions-jvm") {
41-
version = libs.versions.krpc.core.get()
41+
version = libs.versions.rpc.core.get()
4242
}
4343
}
4444

4545
plugins {
4646
named("conventions-kmp") {
47-
version = libs.versions.krpc.core.get()
47+
version = libs.versions.rpc.core.get()
4848
}
4949
}
5050
}

gradle-conventions/compiler-specific-module/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies {
2222
gradlePlugin {
2323
plugins {
2424
named("compiler-specific-module") {
25-
version = libs.versions.krpc.core.get()
25+
version = libs.versions.rpc.core.get()
2626
}
2727
}
2828
}

gradle-conventions/compiler-specific-module/src/main/kotlin/compiler-specific-module.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ object CSM {
1818
const val KOTLIN_MULTIPLATFORM_PLUGIN_ID = "org.jetbrains.kotlin.multiplatform"
1919
const val KOTLIN_JVM_PLUGIN_ID = "org.jetbrains.kotlin.jvm"
2020

21-
const val KRPC_SERVICE_LOADER_MODULE = ":kotlinx-rpc-utils:kotlinx-rpc-utils-service-loader"
21+
const val SERVICE_LOADER_MODULE = ":kotlinx-rpc-utils:kotlinx-rpc-utils-service-loader"
2222
}
2323

2424
val kotlinVersion = getKotlinPluginVersion()
@@ -60,7 +60,7 @@ val root = project
6060
subprojects {
6161
when {
6262
name == coreProjectName -> {
63-
lazyImplementation(project(CSM.KRPC_SERVICE_LOADER_MODULE))
63+
lazyImplementation(project(CSM.SERVICE_LOADER_MODULE))
6464

6565
root.lazyApi(this)
6666
}
@@ -75,7 +75,7 @@ subprojects {
7575
val coreProject = root.subprojects.singleOrNull { it.name == coreProjectName }
7676
?: error("Expected to find subproject with name '$coreProjectName'")
7777

78-
lazyImplementation(project(CSM.KRPC_SERVICE_LOADER_MODULE))
78+
lazyImplementation(project(CSM.SERVICE_LOADER_MODULE))
7979
lazyApi(coreProject)
8080

8181
root.lazyApi(this)

gradle-conventions/kover-stub/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ gradlePlugin {
2323
plugins {
2424
named("kover-root-project") {
2525
id = "kover-root-project"
26-
version = libs.versions.krpc.core.get()
26+
version = libs.versions.rpc.core.get()
2727
}
2828
}
2929
}

gradle-conventions/kover/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ gradlePlugin {
2424
plugins {
2525
named("kover-root-project") {
2626
id = "kover-root-project"
27-
version = libs.versions.krpc.core.get()
27+
version = libs.versions.rpc.core.get()
2828
}
2929
}
3030
}

0 commit comments

Comments
 (0)