JetBrains to Deprecate Certain Kotlin Scripting Features
JetBrains has announced plans to phase out several scripting-related technologies in the Kotlin programming language. These include the REPL (Read-Eval-Print Loop) functionality, an outdated Java scripting API, the KotlinScriptMojo Maven plugin, and the kotlin-scripting-ide-services library for code completion. In a blog post on November 19, JetBrains explained that this decision stems from research indicating that users’ scripting needs are already addressed by alternative, more modern technologies.
Key changes include the removal of default REPL implementations from the Kotlin compiler and IntelliJ IDEA plugin. JetBrains noted that while the REPL has served its purpose, its functionality is limited, and enhancing it has not been a priority. Instead, the company encourages developers to adopt the Kotlin Notebook plugin and IDE Scratch files for interactive development. Some REPL-related features will remain in the compiler and Custom Scripting API, but the switch to the new K2 compiler will significantly alter or eliminate much of this functionality.
Another component being retired is support for Java Specification Request (JSR) 223, an API for Java platform scripting. As the original JSR 223 specification has been withdrawn, JetBrains sees little value in maintaining an obsolete API. Current implementations will remain functional in the language version 1.9 compatibility mode until Kotlin 2.3 is released. Similarly, the KotlinScriptMojo Maven plugin, used for script execution during builds, is being dropped due to low adoption.
The kotlin-scripting-ide-services library, primarily used for implementing REPL code completion, is also slated for removal. This library depends heavily on pre-K2 compiler infrastructure, making it incompatible with the K2 compiler. JetBrains has indicated that it may consider reimplementing similar functionality on the K2 platform in the future. Despite these changes, the company emphasized its commitment to supporting Kotlin scripting as an essential component of the language’s ecosystem, albeit in an experimental capacity for now.