After kotlin plugin update cannot execute any script: IllegalArgumentException: wrong number of arguments
Versions:
IntelliJ IDEA 2022.1.3 (Ultimate Edition) Build #IU-221.5921.22, built on June 21, 2022
Runtime version: 11.0.15+10-b2043.56 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
$ java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
Kotlin Plugin 221-1.7.0-release-281-IJ5591.52
script test.main.kts
println("Hello !")
fails in Idea with error
error: wrong number of arguments (test.main.kts): java.lang.IllegalArgumentException: wrong number of arguments
tried to start directly with
~/.sdkman/candidates/java/current/bin/java \
-Dfile.encoding=UTF-8 \
-classpath ~/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/221.5921.22.plugins/Kotlin/kotlinc/lib/kotlin-compiler.jar:~/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/221.5921.22.plugins/Kotlin/kotlinc/lib/kotlin-main-kts.jar \
org.jetbrains.kotlin.cli.jvm.K2JVMCompiler \
-kotlin-home ~/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/221.5921.22.plugins/Kotlin/kotlinc -verbose \
-script ~/IdeaProjects/test/test.main.kts
got the same error, debug shows that error occurs in native function on script loading
tryed to fix it by replacing with older versions of kotlin plugin, it worker until Idea restart and made Idea to work unstable
Please, give me any suggestions to fix the problem
Please sign in to leave a comment.
Please file an issue - https://kotl.in/issue and attach your project.