Kotlin 1.1.4 EAP


#1

We’re happy to announce the EAP for Kotlin 1.1.4.

What’s new

  • Improvements in Java 9 support: we now recognize module-info files and report compilation errors on access to non-exported packages or non-required modules
  • Support for JSR 305 meta-annotations for nullability qualifiers (enabled by the -Xjsr305-annotations=enable compiler argument)
  • Dead code elimination tool for JS backend (more info)
  • Better support for JavaScript Unit Testing frameworks (more info)
  • Many improvements in generation of JS source maps; distribute kotlin.js library with source maps
  • New ‘Inline Property’ and ‘Copy Class’ refactorings
  • Bunch of new inspections and intentions
  • Improvements in Lint
  • Improvements in the performance of generated bytecode
  • Lots of bugs are fixed in the compiler and IDE

Full changelog

How to get EAP build

For IntelliJ IDEA:

You can configure Early Access Preview channel in Tools → Kotlin → Configure Kotlin Plugin Updates. Change the update channel to “Early Access Preview 1.1.x” and press Check for updates now.

###For Gradle or Maven:

Add https://dl.bintray.com/kotlin/kotlin-eap-1.1 to your repositories.
Change the version of Kotlin dependencies (compiler and stdlib) to 1.1.4-eap-11

Please do provide feedback and report any issues to our issue tracker (please specify your plugin version and IDE version).


#2

Why is there no JavaFX support in the Kotlin REPL? Would be great to do some JavaFX prototyping using TornadoFX and the Kotlin REPL if the option was there. Does the EAP fix all the serious issues relating to IntelliJ freezing when Gradle Kotlin DSL is used?


#3

JavaFX in the REPL should work if you turn off the headless option, which is now possible: https://youtrack.jetbrains.com/issue/KT-18181

For Gradle Kotlin DSL, the fixes will be released in one of the next 1.1.4 EAPs.


#4

Is it possible to run it from gradle? Or using bin/kotlin-dce-js from sdk is the only way?


#5

Yes, it’s possible to use DCE tool from gradle, see the corresponding post.


#6

Kotlin 1.1.4-eap-33 build is now available. Includes stability improvements and bug fixes.
Full changeLog


#7

Kotlin 1.1.4-eap-54 build is now available. Includes stability improvements and bug fixes (ChangeLog).

Note that -Xload-jsr305-annotations compiler option chnaged to -Xjsr305-annotations=enable


#8

#9

#10

#11

kotlin compiler is using special generator for “suite” output in test compilation and actually using js lambdas :slight_smile:
Can we expect kotlin lambdas be compiled to js ones, that will greatly simplify js debugging in browser?


#12

What’s the problem with debugging in the browser? Did you try to enable source map?


#13

The problem is debugging experience in browser is pathetic compared to IDEA.
Watching js code is simpler since kotlinjs is very strait forward translator and output is very readable most of the times. But any non trivial lambda usage emits multi page worth of "main$lambda5$lambda7"
Also currently js map shows empty kt files in chrome, but module structure is ok :slight_smile: no idea why


#14

Also currently js map shows empty kt files in chrome, but module structure is ok :slight_smile: no idea why

That’s because browser can’t find sources. You should either setup browser properly (Sources tab -> right click inside source tree -> Add folder to workspace) or embed sources into source maps (install 1.1.4 EAP, then either open Kotlin facet in project structure or Kotlin compiler settings and choose corresponding inlining option).

I don’t think comiler will translate Kotlin lambdas to JavaScript lambdas in the near future, may be it’ll never do.


#15

I managed to force google chrome to see source maps with

compileKotlin2Js.kotlinOptions.sourceMapEmbedSources = “always”

Still it is really hard to debug simple things. For example maps are really tricky to introspect in debugger.
Any hints on that?


#16

Are any improvements planned to sort out concurrency in the Kotlin REPL? Right now with the EAP you can run a TornadoFX program only ONCE per REPL session, and while the program is running it BLOCKS the main thread (can’t do other stuff in the REPL).


#17

Kotlin 1.1.4-eap-69 is out: https://github.com/JetBrains/kotlin/blob/1.1.4/ChangeLog.md


#18

It would be nice to find the latest EAP version somewhere on the home page (kotlinlang.org/).


#19

Kotlin 1.1.4-eap-77 is out: https://github.com/JetBrains/kotlin/blob/1.1.4/ChangeLog.md


#20