1. 程式人生 > >Kotlin 1.2.70 is Out!

Kotlin 1.2.70 is Out!

We’re happy to announce the release of Kotlin 1.2.70, a new bugfix and tooling update for Kotlin 1.2. This release:

  • Significantly improves incremental compilation for Kotlin/JS
  • Marks a number of kotlin-stdlib-common annotations with @OptionalExpectation
  • Contains native binaries built with Excelsior JET for the standalone Kotlin compiler
  • Adds new refactorings, inspections, and intentions to the IntelliJ IDEA plugin
  • Fixes a lot of known issues in the compiler and the IDE plugin and provides performance improvements

The update is compatible with all versions of IntelliJ IDEA from 2017.3 to 2018.3, as well as with Android Studio 3.1, 3.2 RC, and 3.3 Canary.

The complete list of changes in this release can be found in the changelog. Read on for the highlights.

Incremental compilation improvements for Kotlin/JS

Incremental compilation has been greatly improved for Kotlin/JS. Depending on the project structure, this can speed up development builds up to 7

times and even more. Also, Kotlin/JS Gradle builds now support cross-module incremental compilation.

Note that it is still experimental and disabled by default. To try it, you need to enable it explicitly:

  • In a Gradle project, add kotlin.incremental.js=true into gradle.properties or local.properties
  • In a project built with IntelliJ IDEA, go to Settings | Build, Execution, Deployment | Compiler | Kotlin Compiler | Kotlin to JavaScript and check Enable incremental compilation (experimental).

Your feedback is welcome, and if you face any issues with Kotlin/JS incremental compilation, please tell us.

Multiplatform projects update

A number of platform-specific annotations were introduced in kotlin-stdlib-common. They are marked with the @OptionalExpectation annotation introduced in 1.2.60. The compiler will ignore these annotations on common declarations during compilation of platform modules that have no corresponding actual annotation class.

For example, this allows you to use some JVM-specific annotations such as @JvmName in the common code of a multiplatform project and compile it to JavaScript without any problems.

Those annotations are @JsName, @JvmOverloads, @JvmStatic, @JvmName, @JvmMultifileClass, @JvmField, @JvmSuppressWildcards, @JvmWildcard, @Volatile, @Transient, @Strictfp, and @Synchronized

IntelliJ IDEA support improvements

Quick Fix to convert chains of collection functions into sequences

There’s a new inspection with a quick fix for converting a non-lazy collection transformations chain into a sequence equivalent. Using sequences helps avoid unnecessary temporary allocations overhead and, may significantly improve performance of complex processing pipelines:

Other improvements in the IntelliJ IDEA plugin

  • Intentions to replace an if null-check with ?.let and the other way around
  • Inspection to detect unnecessary with calls
  • Intention to convert a property getter to initializer
  • Inspection and quickfix to replace assertTrue(a == b) with assertEquals(a, b)
  • “Redundant return label” inspection
  • Quick-fix for default parameter value removal
  • forEach parameter unused” inspection
  • Lots of bug fixes and performance improvements

Standalone Kotlin compiler native binaries

In addition to the JVM version of the standalone Kotlin compiler, the Github releases now contain a native, system-dependent version for every major platform (Linux, macOS, and Windows). Those binaries are built with the Excelsior JET AOT compiler and have faster startup times, which is suitable for building small files or scripts.

The Excelsior JET runtime supports some JVM and specific options that you may pass with -J using the kotlinc wrapper script. All recognized options may be found in the Excelsior JET documentation.

How to update

To update your IntelliJ IDEA or Android Studio plugin, use Tools | Kotlin | Configure Kotlin Plugin Updates and click the “Check for updates now” button. The Eclipse IDE plugin can be installed or updated via the Eclipse Marketplace (Help | Eclipse Marketplace and search for the Kotlin plugin).

Also, don’t forget to update the compiler and standard library version in your Maven and Gradle build scripts.

As usual, if you run into any problems with the new release, you’re welcome to ask for help on the forums, on Slack (get an invite here), or to report issues in the issue tracker.

Let’s Kotlin!

相關推薦

Kotlin 1.2.70 is Out!

We’re happy to announce the release of Kotlin 1.2.70, a new bugfix and tooling update for Kotlin 1.2. This release: Significantly improves in

Kotlin 1.2.30 is out

We’re happy to announce the release of Kotlin 1.2.30, a new bugfix and tooling update for Kotlin 1.2. This update: Adds a new declaration in

Kotlin 1.2.60 is out!

We’re happy to announce the release of Kotlin 1.2.60, a new bugfix and tooling update for Kotlin 1.2. This release: Adds optional expected an

Kotlin 1.2.40 is out!

We’re happy to announce the release of Kotlin 1.2.40, a new bugfix and tooling update for Kotlin 1.2! This update: Allows platform modules in

Kotlin 1.2.50 is out!

We’re happy to announce the release of Kotlin 1.2.50, a new bugfix and tooling update for Kotlin 1.2. This release: Updates Kotlin support in

springboot 1.5.10 +kotlin 1.2.20 解決 java.lang.ClassNotFoundException: kotlin.reflect.KotlinReflectionInternalError

exceptio pri pla nbsp http art fas cep start.s 使用http://start.spring.io/ 下載的 項目 跑單元測試 報 java.lang.ClassNotFoundException: kotlin.reflect.

Kotlin 1.2 新特性

Kotlin JavaScript JVM 點擊關註異步圖書,置頂公眾號每天與你分享IT好書 技術幹貨 職場知識在Kotlin 1.1中,團隊正式發布了JavaScript目標,允許開發者將Kotlin代碼編譯為JS並在瀏覽器中運行。在Kotlin 1.2中,團隊增加了在JVM和JavaScrip

Kotlin 1.3 RC is Here: Migrate Your Coroutines!

We’re proud to introduce Kotlin 1.3-RC, the latest preview and release candidate for 1.3.0. This release mostly contains critical bug-fixes re

index 2 is out of bounds for axis 1 with size 2

在使用類似  keras.np_utils.to_categorical 的函式,對標籤轉換成one-hot編碼的時候,要使標籤從0開始。即如果是兩類,設標籤裡面的內容為0和1,不能設定為1和2或其他數字。 比如: from keras.utils import np_util

買到了翻新鏡頭(佳能(Canon)EF 70-200mm f/2.8L IS II USM 鏡頭)

單反 鏡頭 假貨 翻新 今天在淘寶上買了一個佳能(Canon)EF 70-200mm f/2.8L IS II USM 鏡頭,收到後,心都涼了,竟然是一只真真正正的翻新機。 如果有條件,和真正的正品比較,才能發現細節問題。下面說說,為什麽不是新鏡頭呢? 1. 開箱味道全新正品應開箱應該有工業產

Python實現groupBy函數。grpby = groupBy(lambda x: x%2 is 1),grpby([1, 2, 3])的結果為{True: [1, 3], False: [2]}

結果 false n) pen als 不存在 def lam nbsp def groupBy(fn): def go(lst): m = {} for v in lst: m[fn(v)].append(v) if m.get(fn(v

Error:Minimum supported Gradle version is 2.14.1. Current version is 2.10.原因分析和解決。

圖片 幫助 url err ... tle IT .net fcm 最近和主管一起開發項目一直出現這個問題: Error:Minimum supported Gradle version is 2.14.1. Current version is 12.10. If usi

解決 You are using pip version 7.1.2, however version 18.0 is available.報錯

完美 bsp -- 安裝目錄 方法 exe win .exe 嘗試 Windows下安裝 Pyhton的mysql庫時 命令行一直報 You are using pip version 7.1.2, however version 18.0 is available

[python問題] You are using pip version 7.1.2, however version 18.1 is available

 在windows環境下在安裝paramiko的時候 ,使用命令python -m pip install paramiko 一直報錯  You are using pip version 7.1.2, however version 18.1 is available  解決辦法,pip版本升級。在Py

ubuntu18.04安裝pip3 Depends: python-pip-whl (= 8.1.1-2) but 8.1.1-2ubuntu0.4 is to be installed

下了個ubuntu18.04,更新源後安裝pip3 apt install python3-pip 結果居然報錯了 Reading package lists... Done Building dependency tree Reading state inf

解決MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.(win10)

一、問題情境 本想用django搭建個小部落格,但是在Windows10的DOS下安裝mysql驅動時, 總是報錯:MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.

python報錯 ValueError: dictionary update sequence element #0 has length 1; 2 is require

原文連結地址: https://blog.csdn.net/weixin_40894428/article/details/80683137 字串轉字典要用eval(),這個方法很多書上都沒有介紹, 有關eval()的用法,傳送門: http://www.runoob.com/python/

安裝MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform.

安裝了python,想用python來連線資料庫,需要安裝mysql-python包。 在https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python

Spring Boot - An incompatible version [1.2.12] of the APR based Apache Tomcat Native library is...

Spring Boot在目前的專案開發中已經逐步火熱起來,既然是一種技術在使用的過程中出現問題在所難免,在一次初始化Spring Boot專案啟動時,我遇到了一個啟動失敗的問題,日誌給出的資訊An incompatible version [1.1.14] of the APR ba

Spring Security(二):2.1 Introduction What is Spring Security?

Spring Security provides comprehensive security services for Java EE-based enterprise software applications. There is a particular emphasis on supporting p