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() {
115
115
116
116
map.put(
117
117
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'." ,
119
120
)
120
121
121
122
map.put(
Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ FILE: module_main_grpc.kt
65
65
66
66
@R|kotlinx/rpc/grpc/annotations/Grpc.Method|(name = <strcat>(String(wrongName), String(+3))) public abstract suspend fun wrongName3(): R|kotlin/Unit|
67
67
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|
69
71
70
72
public final class $rpcServiceStub : R|kotlin/Any| {
71
73
public final companion object Companion : R|kotlin/Any| {
Original file line number Diff line number Diff line change @@ -53,5 +53,8 @@ interface WrongAnnotations4 {
53
53
suspend fun wrongName3 ()
54
54
55
55
@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 ()
57
60
}
You can’t perform that action at this time.
0 commit comments