File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
compiler-plugin/compiler-plugin-backend/src/main/kotlin/kotlinx/rpc/codegen/extension Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 4
4
5
5
package kotlinx.rpc.codegen.extension
6
6
7
+ import kotlinx.rpc.codegen.common.RpcClassId
7
8
import kotlinx.rpc.codegen.common.RpcNames
8
9
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
9
10
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
@@ -17,7 +18,6 @@ import org.jetbrains.kotlin.ir.expressions.IrExpression
17
18
import org.jetbrains.kotlin.ir.util.dumpKotlinLike
18
19
import org.jetbrains.kotlin.ir.util.getAnnotation
19
20
import org.jetbrains.kotlin.ir.util.hasDefaultValue
20
- import org.jetbrains.kotlin.ir.util.kotlinFqName
21
21
22
22
/* *
23
23
* This class scans user declared RPC service
@@ -30,7 +30,7 @@ internal object RpcDeclarationScanner {
30
30
fun scanServiceDeclaration (service : IrClass , ctx : RpcIrContext , logger : MessageCollector ): ServiceDeclaration {
31
31
var stubClass: IrClass ? = null
32
32
33
- val grpcAnnotation = service.getAnnotation(ctx .grpcAnnotation.owner.kotlinFqName )
33
+ val grpcAnnotation = service.getAnnotation(RpcClassId .grpcAnnotation.asSingleFqName() )
34
34
val protoPackage = grpcAnnotation?.arguments?.getOrNull(0 )?.asConstString() ? : " "
35
35
36
36
val declarations = service.declarations.memoryOptimizedMap { declaration ->
Original file line number Diff line number Diff line change @@ -64,10 +64,6 @@ internal class RpcIrContext(
64
64
getRpcIrClassSymbol(" RpcServiceDescriptor" , " descriptor" )
65
65
}
66
66
67
- val grpcAnnotation by lazy {
68
- getIrClassSymbol(" kotlinx.rpc.grpc.annotations" , " Grpc" )
69
- }
70
-
71
67
val grpcServiceDescriptor by lazy {
72
68
getIrClassSymbol(" kotlinx.rpc.grpc.descriptor" , " GrpcServiceDescriptor" )
73
69
}
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ private object Descriptor {
36
36
const val CALLABLE_MAP = " callableMap"
37
37
const val CALLABLES = " callables"
38
38
39
- // the kotlin class name (derived from java_package and name)
39
+ // the kotlin class name
40
40
const val FQ_NAME = " fqName"
41
41
const val SIMPLE_NAME = " simpleName"
42
42
const val GET_CALLABLE = " getCallable"
@@ -1085,7 +1085,7 @@ internal class RpcStubGenerator(
1085
1085
*
1086
1086
* ```kotlin
1087
1087
* serviceDescriptor(
1088
- * name = MyService, // simpleName
1088
+ * name = my.proto.package. MyService, // $declaration.serviceFqName
1089
1089
* methods = methodDescriptorMap.values, // Collection<MethodDescriptor<*, *>>
1090
1090
* schemaDescriptor = null, // for now, only null
1091
1091
* )
You can’t perform that action at this time.
0 commit comments