From 2821c94a18841f88f888b1b57493f70ecf2d00f6 Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Wed, 2 Aug 2023 19:50:53 +0200 Subject: [PATCH 1/3] Add Kotlin/JS legacy backend removal information --- docs/topics/js/js-ir-compiler.md | 4 +++- docs/topics/whatsnew19.md | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/topics/js/js-ir-compiler.md b/docs/topics/js/js-ir-compiler.md index 752e4065c98..616795efb0c 100644 --- a/docs/topics/js/js-ir-compiler.md +++ b/docs/topics/js/js-ir-compiler.md @@ -23,9 +23,11 @@ kotlin { ``` * `IR` uses the new IR compiler backend for Kotlin/JS. -* `LEGACY` uses the default compiler backend. +* `LEGACY` uses the old compiler backend. * `BOTH` compiles your project with the new IR compiler as well as the default compiler backend. Use this mode for [authoring libraries compatible with both backends](#authoring-libraries-for-the-ir-compiler-with-backwards-compatibility). +The old compiler backend is deprecated since Kotlin 1.8.0. Starting with Kotlin 1.9.0 using compiler types `LEGACY` of `BOTH` leads to an error. + The compiler type can also be set in the `gradle.properties` file, with the key `kotlin.js.compiler=ir`. This behaviour is overwritten by any settings in the `build.gradle(.kts)`, however. diff --git a/docs/topics/whatsnew19.md b/docs/topics/whatsnew19.md index a8303206241..7636f7b29df 100644 --- a/docs/topics/whatsnew19.md +++ b/docs/topics/whatsnew19.md @@ -598,9 +598,10 @@ fun computeAck(m: Int, n: Int) { ## Kotlin/JS -This release introduces updates for Kotlin/JS, including the deprecation of the Kotlin/JS Gradle plugin and Experimental +This release introduces updates for Kotlin/JS, including the removal of the old Kotlin/JS compiler, Kotlin/JS Gradle plugin deprecation and Experimental support for ES6: +* [Removal of the old Kotlin/JS compiler](#removal-of-the-kotlin-js-legacy-target) * [Deprecation of the Kotlin/JS Gradle plugin](#deprecation-of-the-kotlin-js-gradle-plugin) * [Deprecation of external enum](#deprecation-of-external-enum) * [Experimental support for ES6 classes and modules](#experimental-support-for-es6-classes-and-modules) @@ -612,6 +613,13 @@ support for ES6: {type="note"} +### Removal of the old Kotlin/JS compiler + +In Kotlin 1.8.0, we [announced](whatsnew18.md#stable-js-ir-compiler-backend) that the IR-based backend became [Stable](components-stability.md). +Since then not specifying the compiler started to be an error, and using the old compiler lead to warnings. + +In Kotlin 1.9.0 using the old backend is an error. Please migrate to the IR compiler with the help of our [migration guide](js-ir-migration.md). + ### Deprecation of the Kotlin/JS Gradle plugin Starting with Kotlin 1.9.0, the `kotlin-js` Gradle plugin is From f8fb1a4a6865eb6009868f03ca8d857d21f027fe Mon Sep 17 00:00:00 2001 From: Andrey Polyakov Date: Thu, 3 Aug 2023 09:56:22 +0200 Subject: [PATCH 2/3] update: update js-ir-compiler.md wording --- docs/topics/js/js-ir-compiler.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/topics/js/js-ir-compiler.md b/docs/topics/js/js-ir-compiler.md index 616795efb0c..36a342e3b1b 100644 --- a/docs/topics/js/js-ir-compiler.md +++ b/docs/topics/js/js-ir-compiler.md @@ -26,7 +26,9 @@ kotlin { * `LEGACY` uses the old compiler backend. * `BOTH` compiles your project with the new IR compiler as well as the default compiler backend. Use this mode for [authoring libraries compatible with both backends](#authoring-libraries-for-the-ir-compiler-with-backwards-compatibility). -The old compiler backend is deprecated since Kotlin 1.8.0. Starting with Kotlin 1.9.0 using compiler types `LEGACY` of `BOTH` leads to an error. +> The old compiler backend has been deprecated since Kotlin 1.8.0. Starting with Kotlin 1.9.0, using compiler types `LEGACY` of `BOTH` leads to an error. +> +{type="warning"} The compiler type can also be set in the `gradle.properties` file, with the key `kotlin.js.compiler=ir`. This behaviour is overwritten by any settings in the `build.gradle(.kts)`, however. From 50ea132e4a0ba89f29c425220ee6ecab93b40097 Mon Sep 17 00:00:00 2001 From: Andrey Polyakov Date: Thu, 3 Aug 2023 09:58:52 +0200 Subject: [PATCH 3/3] update: update whatsnew19.md wording --- docs/topics/whatsnew19.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/topics/whatsnew19.md b/docs/topics/whatsnew19.md index 7636f7b29df..a3c9c9e7715 100644 --- a/docs/topics/whatsnew19.md +++ b/docs/topics/whatsnew19.md @@ -616,9 +616,9 @@ support for ES6: ### Removal of the old Kotlin/JS compiler In Kotlin 1.8.0, we [announced](whatsnew18.md#stable-js-ir-compiler-backend) that the IR-based backend became [Stable](components-stability.md). -Since then not specifying the compiler started to be an error, and using the old compiler lead to warnings. +Since then, not specifying the compiler has become an error, and using the old compiler leads to warnings. -In Kotlin 1.9.0 using the old backend is an error. Please migrate to the IR compiler with the help of our [migration guide](js-ir-migration.md). +In Kotlin 1.9.0, using the old backend results in an error. Please migrate to the IR compiler by following our [migration guide](js-ir-migration.md). ### Deprecation of the Kotlin/JS Gradle plugin @@ -1235,4 +1235,4 @@ If the repository is not specified, Gradle uses the sunset JCenter repository, w Kotlin 1.9.0 is a [feature release](kotlin-evolution.md#feature-releases-and-incremental-releases) and can, therefore, bring changes that are incompatible with your code written for earlier versions of the language. Find the detailed list -of these changes in the [Compatibility guide for Kotlin 1.9.0](compatibility-guide-19.md). \ No newline at end of file +of these changes in the [Compatibility guide for Kotlin 1.9.0](compatibility-guide-19.md).