Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kotlin/JS legacy backend removal information #3723

Merged
merged 3 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/topics/js/js-ir-compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ 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 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.

Expand Down
12 changes: 10 additions & 2 deletions docs/topics/whatsnew19.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 has become an error, and using the old compiler leads to warnings.

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

Starting with Kotlin 1.9.0, the `kotlin-js` Gradle plugin is
Expand Down Expand Up @@ -1227,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).
of these changes in the [Compatibility guide for Kotlin 1.9.0](compatibility-guide-19.md).
Loading