diff --git a/compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/StrictMode.kt b/compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/StrictMode.kt
index bec06d161..b8e4ca918 100644
--- a/compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/StrictMode.kt
+++ b/compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/StrictMode.kt
@@ -49,13 +49,13 @@ object StrictModeConfigurationKeys {
fun CompilerConfiguration.strictModeAggregator(): StrictModeAggregator {
return StrictModeAggregator(
- stateFlow = get(StrictModeConfigurationKeys.STATE_FLOW, StrictMode.WARNING),
- sharedFlow = get(StrictModeConfigurationKeys.SHARED_FLOW, StrictMode.WARNING),
- nestedFlow = get(StrictModeConfigurationKeys.NESTED_FLOW, StrictMode.WARNING),
- streamScopedFunctions = get(StrictModeConfigurationKeys.STREAM_SCOPED_FUNCTIONS, StrictMode.WARNING),
- suspendingServerStreaming = get(StrictModeConfigurationKeys.SUSPENDING_SERVER_STREAMING, StrictMode.WARNING),
- notTopLevelServerFlow = get(StrictModeConfigurationKeys.NOT_TOP_LEVEL_SERVER_FLOW, StrictMode.WARNING),
- fields = get(StrictModeConfigurationKeys.FIELDS, StrictMode.WARNING),
+ stateFlow = get(StrictModeConfigurationKeys.STATE_FLOW, StrictMode.ERROR),
+ sharedFlow = get(StrictModeConfigurationKeys.SHARED_FLOW, StrictMode.ERROR),
+ nestedFlow = get(StrictModeConfigurationKeys.NESTED_FLOW, StrictMode.ERROR),
+ streamScopedFunctions = get(StrictModeConfigurationKeys.STREAM_SCOPED_FUNCTIONS, StrictMode.ERROR),
+ suspendingServerStreaming = get(StrictModeConfigurationKeys.SUSPENDING_SERVER_STREAMING, StrictMode.ERROR),
+ notTopLevelServerFlow = get(StrictModeConfigurationKeys.NOT_TOP_LEVEL_SERVER_FLOW, StrictMode.ERROR),
+ fields = get(StrictModeConfigurationKeys.FIELDS, StrictMode.ERROR),
)
}
diff --git a/compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/diagnostics/RpcDiagnosticRendererFactory.kt b/compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/diagnostics/RpcDiagnosticRendererFactory.kt
index 17851071c..2717da2aa 100644
--- a/compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/diagnostics/RpcDiagnosticRendererFactory.kt
+++ b/compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/diagnostics/RpcDiagnosticRendererFactory.kt
@@ -140,6 +140,7 @@ class RpcStrictModeDiagnosticRendererFactory(
StrictMode.ERROR -> "prohibited"
}
- return "$entityName is $actionWord in @Rpc services in strict mode."
+ return "$entityName is $actionWord in @Rpc services in strict mode. " +
+ "Support will be removed completely in the 0.8.0 release."
}
}
diff --git a/docs/pages/kotlinx-rpc/topics/strict-mode.topic b/docs/pages/kotlinx-rpc/topics/strict-mode.topic
index 9053e22d5..0d512e3ba 100644
--- a/docs/pages/kotlinx-rpc/topics/strict-mode.topic
+++ b/docs/pages/kotlinx-rpc/topics/strict-mode.topic
@@ -13,8 +13,11 @@
Starting with version 0.5.0
, the library introduces major changes to the service APIs.
The following declarations will be gradually restricted:
0.8.0
release.
+ Deprecation level: WARNING
Deprecation level: ERROR
Deprecation level: WARNING
Deprecation level: ERROR
Deprecation level: WARNING
Deprecation level: ERROR
Deprecation level: WARNING
Deprecation level: ERROR
Deprecation level: WARNING
Deprecation level: ERROR
Deprecation level: WARNING
Deprecation level: ERROR
The next stream scope management structures are deprecated due to the introduction of @@ -158,18 +161,18 @@ rpc { strict { - stateFlow = RpcStrictMode.WARNING - sharedFlow = RpcStrictMode.WARNING - nestedFlow = RpcStrictMode.WARNING - notTopLevelServerFlow = RpcStrictMode.WARNING - fields = RpcStrictMode.WARNING - suspendingServerStreaming = RpcStrictMode.WARNING - streamScopedFunctions = RpcStrictMode.WARNING + stateFlow = RpcStrictMode.ERROR + sharedFlow = RpcStrictMode.ERROR + nestedFlow = RpcStrictMode.ERROR + notTopLevelServerFlow = RpcStrictMode.ERROR + fields = RpcStrictMode.ERROR + suspendingServerStreaming = RpcStrictMode.ERROR + streamScopedFunctions = RpcStrictMode.ERROR } }
- Modes RpcStrictMode.NONE
and RpcStrictMode.ERROR
are available.
+ Modes RpcStrictMode.NONE
and RpcStrictMode.WARNING
are available.