File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
compiler-plugin/compiler-plugin-k2/src/main/kotlin/kotlinx/rpc/codegen/checkers/diagnostics
tests/compiler-plugin-tests/src/testData/diagnostics Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ object GrpcDiagnosticRendererFactory : BaseDiagnosticRendererFactory() {
115115
116116 map.put(
117117 factory = FirGrpcDiagnostics .WRONG_SAFE_IDEMPOTENT_COMBINATION ,
118- message = " 'safe = true' and 'idempotent = false' are mutually exclusive." ,
118+ message = " 'safe = true' and 'idempotent = false' are mutually exclusive. " +
119+ " If the method is safe, write explicitly 'idempotent = true'." ,
119120 )
120121
121122 map.put(
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ FILE: module_main_grpc.kt
6565
6666 @R|kotlinx/rpc/grpc/annotations/Grpc.Method|(name = <strcat>(String(wrongName), String(+3))) public abstract suspend fun wrongName3(): R|kotlin/Unit|
6767
68- @R|kotlinx/rpc/grpc/annotations/Grpc.Method|(safe = Boolean(true), idempotent = Boolean(false)) public abstract suspend fun wrongSafeIdempotent(): R|kotlin/Unit|
68+ @R|kotlinx/rpc/grpc/annotations/Grpc.Method|(safe = Boolean(true), idempotent = Boolean(false)) public abstract suspend fun wrongSafeIdempotent1(): R|kotlin/Unit|
69+
70+ @R|kotlinx/rpc/grpc/annotations/Grpc.Method|(safe = Boolean(true)) public abstract suspend fun wrongSafeIdempotent2(): R|kotlin/Unit|
6971
7072 public final class $rpcServiceStub : R|kotlin/Any| {
7173 public final companion object Companion : R|kotlin/Any| {
Original file line number Diff line number Diff line change @@ -53,5 +53,8 @@ interface WrongAnnotations4 {
5353 suspend fun wrongName3 ()
5454
5555 @Grpc.Method < ! WRONG_SAFE_IDEMPOTENT_COMBINATION ! > (safe = true , idempotent = false )< ! >
56- suspend fun wrongSafeIdempotent ()
56+ suspend fun wrongSafeIdempotent1 ()
57+
58+ @Grpc.Method < ! WRONG_SAFE_IDEMPOTENT_COMBINATION ! > (safe = true )< ! >
59+ suspend fun wrongSafeIdempotent2 ()
5760}
You can’t perform that action at this time.
0 commit comments