Skip to content

Commit

Permalink
update: update release details
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahhaggarty committed Sep 5, 2023
1 parent 8802bac commit 20a46ad
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 60 deletions.
3 changes: 1 addition & 2 deletions docs/topics/eap.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ check [our instructions on how to configure your build to support this version](
</tr>
<tr>
<td><strong>1.9.20-Beta</strong>
<p>Released: <strong>September 5, 2023</strong></p>
<p>Released: <strong>September 7, 2023</strong></p>
<p><a href="https://github.com/JetBrains/kotlin/releases/tag/v1.9.20-Beta" target="_blank">Release on GitHub</a></p>
</td>
<td>
<ul>
<li>K2: preview for Kotlin scripting support</li>
<li>Kotlin/JVM: support for Java 21 bytecode</li>
<li>Kotlin/Native: custom allocator enabled by default, full parallel mark available in the GC, deprecated targets disabled, obligatory opt-in for all cinterop declarations (except for platform libraries), the GC scheduler tracking objects in big chunks, legacy memory manager disabled</li>
<li>Kotlin Multiplatform: hierarchy template available by default, full support for Gradle Configuration cache, the default support for third-party cinterop libraries, reworked configuration of compiler settings in multiplatform projects</li>
Expand Down
87 changes: 30 additions & 57 deletions docs/topics/whatsnew-eap.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,25 @@ _[Released: %kotlinEapReleaseDate%](eap.md#build-details)_
>
{type="note"}

The Kotlin %kotlinEapVersion% release is out! Here are some highlights from this preview version of Kotlin:
The Kotlin team at JetBrains is delighted to release %kotlinEapVersion%! Here are some highlights from this preview version of Kotlin:

<!-- TODO: add toc -->
* [New default hierarchy template for setting up multiplatform projects](#configuring-multiplatform-projects-with-a-template)
* [Full support for Gradle Configuration cache in Kotlin Multiplatform](#full-support-for-gradle-configuration-cache-in-kotlin-multiplatform)
* [Custom memory allocator enabled by default in Kotlin/Native](#custom-memory-allocator-enabled-by-default)
* [Performance improvements for garbage collector in Kotlin/Native](#performance-imporvements-for-garbage-collector)
* [New and renamed targets in Kotlin/Wasm](#new-wasm-wasi-target-and-rename-wasm-target-to-wasm-js)
* [Support of WASI API in the standard library for Kotlin/Wasm](#support-of-wasi-api-in-standard-library)

## IDE support

The Kotlin plugins that support %kotlinEapVersion% are available for:

| IDE | Supported versions |
|----------------|-------------------------------|
| IntelliJ IDEA | 2022.3.x, 2023.1.x |
| Android Studio | Giraffe (223), Hedgehog (231) |
| IDE | Supported versions |
|----------------|--------------------|
| IntelliJ IDEA | 2023.1, 2023.2 |
| Android Studio | Hedgehog, Iguana |

## New Kotlin K2 compiler updates

### Preview Kotlin scripting with K2

> Support for compiling scripts with the K2 compiler is [Experimental](components-stability.md).
> It may be dropped or changed at any time. Opt-in is required (see details below), and you
> should use it only for evaluation purposes.
>
{type="warning"}

In %kotlinEapVersion%, you can compile your [Kotlin scripts](custom-script-deps-tutorial.md) with the K2 compiler.
To compile your scripts with the K2 compiler, use the [`-language-version`](compiler-reference.md#language-version-version)
compiler option with the version set to `2.0`. For example:

```bash
kotlinc -language-version 2.0 -script script.kts
```

Alternatively, if you compile your scripts along with other sources, use the `kotlin.experimental.tryK2=true` Gradle property.

> The K2 compiler doesn’t currently support the REPL or [javax.script](https://docs.oracle.com/javase/8/docs/api/javax/script/package-summary.html)
> APIs. If you configure your scripts to compile with the K2 compiler, this is ignored for REPL and javax.script.
> Support for REPL and javax.script APIs will come in future Kotlin releases.
>
{type="warning"}

If you encounter any issues when using scripts with the K2 compiler, please report them to our [issue tracker](http://kotl.in/issue).

## Kotlin/Multiplatform

### Configuring multiplatform projects with a template
## Configuring multiplatform projects with a template

Since Kotlin %kotlinEapVersion%, the Kotlin Gradle Plugin automatically creates shared source sets forin the most popular multiplatform scenarios.
If your project setup is one of them, you don't need to configure the source set hierarchy manually.
Expand All @@ -61,7 +36,7 @@ Just explicitly specify the targets necessary for your project.
The setup became easier thanks to the default hierarchy template. It includes shared source sets for the most popular cases.
The template is built into the Kotlin Gradle plugin and applied automatically starting with this release.

#### Set up your project
### Set up your project

Consider a multiplatform project that targets both Android and iPhone devices and is developed on Apple silicon MacBook.
Compare this project setup between different versions of Kotlin:
Expand Down Expand Up @@ -126,7 +101,7 @@ Green source sets are actually created and present in the project, while gray on

For more information and the complete scheme for the default hierarchy template, see [Hierarchical project structure](multiplatform-hierarchy.md#default-hierarchy).

#### Check out improved tooling support
### Check out improved tooling support

To help you understand the created project structure, IntelliJ IDEA now provides completion for source sets created with the default hierarchy template:

Expand Down Expand Up @@ -161,11 +136,11 @@ w: Accessed 'source set jvmMain' without registering the jvm target:
}
```

#### Leave feedback
### Leave feedback

This is a significant change to multiplatform projects. We would appreciate your [feedback](https://kotl.in/issue) to help make it even better.

### Full support for Gradle configuration cache in Kotlin Multiplatform
## Full support for Gradle configuration cache in Kotlin Multiplatform

Previously, we’ve introduced a [preview](whatsnew19.md#preview-of-the-gradle-configuration-cache) of the Gradle configuration cache available for Kotlin multiplatform libraries.
With %kotlinEapVersion%, the Kotlin Multiplatform plugin takes a step further.
Expand All @@ -177,9 +152,7 @@ Now all multiplatform projects can take advantage of the improved build time.
The Gradle configuration cache speeds up the build process by reusing the results of the configuration phase for subsequent builds.
For more details and setup instructions, follow the [Gradle documentation](https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:usage).

## Kotlin/Native

### Custom memory allocator enabled by default
## Custom memory allocator enabled by default

Kotlin 1.9.20-Beta comes with the new memory allocator enabled by default. It’s designed to replace the previous default allocator,
`mimaloc` to make garbage collection more efficient and improve the runtime performance of the [Kotlin/Native memory manager](native-memory-manager.md).
Expand All @@ -198,7 +171,7 @@ This page may already be available, require sweeping, or should be created first
The new allocator allows having multiple independent allocation spaces simultaneously,
which will allow the Kotlin team to experiment with different page layouts to improve performance even further.

#### How to enable custom memory allocator
### How to enable custom memory allocator

Starting with Kotlin %kotlinEapVersion%, the new memory allocator is the default. No additional setup is required.

Expand All @@ -207,15 +180,15 @@ Please report such issues in [YouTrack](https://kotl.in/issue) to help us improv

For technical details of the new allocator’s design, see this [README](https://github.com/JetBrains/kotlin/blob/master/kotlin-native/runtime/src/custom_alloc/README.md).

### Performance improvements for garbage collector
## Performance improvements for garbage collector

The Kotlin team continues to improve performance and stability of the new Kotlin/Native memory manager.
This release brings a number of significant changes to the garbage collector (GC), including the following %kotlinEapVersion% highlights:

* [](#full-parallel-mark-to-reduce-the-pause-time-for-the-gc)
* [](#tracking-memory-in-big-chunks-to-improve-the-allocation-performance)

#### Full parallel mark to reduce the pause time for the GC
### Full parallel mark to reduce the pause time for the GC

Previously, the default garbage collector performed only a partial parallel mark. When the mutator thread was paused,
it would mark the GC start from its own roots, like thread-local variables and the call stack.
Expand All @@ -233,18 +206,15 @@ the mark queue together. By default, the marking process is performed by:

This new approach makes the marking process more efficient, reducing the pause time of the GC.

#### Tracking memory in big chunks to improve the allocation performance
### Tracking memory in big chunks to improve the allocation performance

Previously, the GC scheduler tracked each object allocation individually. However, both the new default custom allocator
and the `mimalloc` memory allocator do not allocate separate storage for each object; they allocate large areas for several objects at once.

Now the GC tracks areas instead of individual objects. This speeds up the allocation of small objects by reducing
the number of tasks performed on each allocation and, therefore, helps to keep down the garbage collector’s memory usage.

## Updates in Kotlin/Wasm

* New `wasm-wasi` target, and rename `wasm` target to `wasm-js`
* Support of WASI API in standard library
## New wasmWasi and wasmJs targets, deprecation of wasm target

> Kotlin Wasm is [Experimental](components-stability.md).
> It may be changed at any time. Use it only for evaluation purposes.
Expand All @@ -253,8 +223,6 @@ the number of tasks performed on each allocation and, therefore, helps to keep d
>
{type="warning"}

### New wasmWasi and wasmJs targets, deprecation of wasm target

We introduce a new target for Kotlin/Wasm `wasm-wasi`. In this release we also rename `wasm` target to `wasm-js`.
In the Gradle DSL they are available respectively as `wasmWasi` and `wasmJs`.

Expand All @@ -276,7 +244,14 @@ To migrate your existing Kotlin/Wasm project, you should:
* In the `build.gradle.kts` file, rename the `wasm` block to `wasmJs`
* In your project structure, rename the `wasmMain` folder to `wasmJsMain`

### Support of WASI in standard library
## Support of WASI in standard library

> Kotlin Wasm is [Experimental](components-stability.md).
> It may be changed at any time. Use it only for evaluation purposes.
>
> We would appreciate your feedback on it in [YouTrack](https://kotl.in/issue).
>
{type="warning"}

In this release, we have included support of [WASI](https://github.com/WebAssembly/WASI), a system interface for the Wasm platform.
WASI support allows you to create applications not only for browsers, but also for server-side usage.
Expand All @@ -298,8 +273,6 @@ private external fun wasiRawClockTimeGet(clockId: Int, precision: Long, resultPt
>
{type="note"}



## How to update to Kotlin %kotlinEapVersion%

Install Kotlin %kotlinEapVersion% in any of the following ways:
Expand Down
2 changes: 1 addition & 1 deletion docs/v.list
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<var name="kotlinReleaseDate" value="August 23, 2023" type="string"/>

<var name="kotlinEapReleaseDate" value="September 5, 2023" type="string"/>
<var name="kotlinEapReleaseDate" value="September 7, 2023" type="string"/>

<var name="coroutinesVersion" value="1.7.1" type="string"/>

Expand Down

0 comments on commit 20a46ad

Please sign in to comment.