From 00abbc5cfe72859f78674a39f2211480b0c19032 Mon Sep 17 00:00:00 2001 From: Abduqodiri Qurbonzoda Date: Fri, 16 Jun 2023 17:46:29 +0300 Subject: [PATCH] Advance ObsoleteNativeApi opt-in requirement level to ERROR #KT-57088 As a part of efforts to stabilize Native stdlib. --- .../runtime/src/main/kotlin/kotlin/native/ObsoleteNativeApi.kt | 3 +-- .../stdlib/wasm/src/kotlin/text/regex/ObsoleteNativeApi.kt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/ObsoleteNativeApi.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/ObsoleteNativeApi.kt index 07f5059c450..ed827143af3 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/ObsoleteNativeApi.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/ObsoleteNativeApi.kt @@ -11,13 +11,12 @@ import kotlin.annotation.AnnotationTarget.* * This annotation marks the Kotlin/Native standard library API that is considered obsolete and is being phased out. * * An obsolete API is not recommended to use, and users should migrate from it. - * In the future the opt-in level of the annotation might be raised to [ERROR][RequiresOptIn.Level.ERROR]. * * Any usage of a declaration annotated with `@ObsoleteNativeApi` must be accepted either by * annotating that usage with the [OptIn] annotation, e.g. `@OptIn(ObsoleteNativeApi::class)`, * or by using the compiler argument `-opt-in=kotlin.native.ObsoleteNativeApi`. */ -@RequiresOptIn(message = "This API is obsolete and subject to removal in a future release.", level = RequiresOptIn.Level.WARNING) +@RequiresOptIn(message = "This API is obsolete and subject to removal in a future release.", level = RequiresOptIn.Level.ERROR) @Retention(AnnotationRetention.BINARY) @Target( AnnotationTarget.CLASS, diff --git a/libraries/stdlib/wasm/src/kotlin/text/regex/ObsoleteNativeApi.kt b/libraries/stdlib/wasm/src/kotlin/text/regex/ObsoleteNativeApi.kt index 3100aabeba7..637e767c050 100644 --- a/libraries/stdlib/wasm/src/kotlin/text/regex/ObsoleteNativeApi.kt +++ b/libraries/stdlib/wasm/src/kotlin/text/regex/ObsoleteNativeApi.kt @@ -13,7 +13,7 @@ import kotlin.annotation.AnnotationTarget.* * This is an internal copy of the public K/N annotation. * It is used to [OptIn] obsolete K/N API used in the shared native-wasm directory. */ -@RequiresOptIn(message = "This API is obsolete and subject to removal in a future release.", level = RequiresOptIn.Level.WARNING) +@RequiresOptIn(message = "This API is obsolete and subject to removal in a future release.", level = RequiresOptIn.Level.ERROR) @Retention(AnnotationRetention.BINARY) @Target( AnnotationTarget.CLASS,