IntelliJ compilation error (to JS) after upgrading from 1.0.6 to Kotlin 1.1.1


#1

Hi JetBrains and other people!

We are suffering from a compilation error in IntelliJ after upgrading from 1.0 to 1.1.
The projects builds successfully with maven,
but when hitting the IntelliJ compile button it fails - see below.

Is this a problem others are experiencing too? We also did a test with a simple Kotlin project containing one class. It compiled successfully in IntelliJ. However when making the project a maven project it fails with the same error.

Thanks, for any help!

Information:Kotlin: Kotlin JPS plugin version 1.1.1
Information:Kotlin: Using kotlin-home = /Users/joerunds/Library/Application Support/IntelliJIdea2016.3/Kotlin/kotlinc
Information:Module “elements” was fully rebuilt due to project configuration/dependencies changes
Information:27/03/2017, 12:37 - Compilation completed with 3 errors and 0 warnings in 2s 132ms
Error:Kotlin: [Internal Error] java.lang.IllegalArgumentException: Invalid argument: -output
at org.jetbrains.kotlin.cli.common.arguments.ArgumentUtilsKt.parseArguments(argumentUtils.kt:34)
at org.jetbrains.kotlin.cli.common.arguments.ArgumentUtilsKt.parseArguments$default(argumentUtils.kt:25)
at org.jetbrains.kotlin.cli.common.arguments.ArgumentUtilsKt.parseArguments(argumentUtils.kt)
at org.jetbrains.kotlin.cli.common.CLICompiler.parseArguments(CLICompiler.java:105)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1.invoke(CompileServiceImpl.kt:347)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1.invoke(CompileServiceImpl.kt:95)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.ifAlive(CompileServiceImpl.kt:930)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.ifAlive$default(CompileServiceImpl.kt:817)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:339)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Error:Kotlin: [Internal Error] java.lang.Exception: Could not deserialize compiler arguments
at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65)
at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:64)
at org.jetbrains.kotlin.compilerRunner.JpsKotlinCompilerRunner.compileWithDaemon(JpsKotlinCompilerRunner.kt:127)
at org.jetbrains.kotlin.compilerRunner.JpsKotlinCompilerRunner.compileWithDaemonOrFallback(JpsKotlinCompilerRunner.kt:100)
at org.jetbrains.kotlin.compilerRunner.JpsKotlinCompilerRunner.compileWithDaemonOrFallback(JpsKotlinCompilerRunner.kt:35)
at org.jetbrains.kotlin.compilerRunner.KotlinCompilerRunner.runCompiler(KotlinCompilerRunner.kt:115)
at org.jetbrains.kotlin.compilerRunner.JpsKotlinCompilerRunner.runK2JsCompiler(JpsKotlinCompilerRunner.kt:88)
at org.jetbrains.kotlin.jps.build.KotlinBuilder.compileToJs(KotlinBuilder.kt:675)
at org.jetbrains.kotlin.jps.build.KotlinBuilder.doCompileModuleChunk(KotlinBuilder.kt:428)
at org.jetbrains.kotlin.jps.build.KotlinBuilder.doBuild(KotlinBuilder.kt:264)
at org.jetbrains.kotlin.jps.build.KotlinBuilder.build(KotlinBuilder.kt:181)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1282)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:956)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1028)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:915)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:741)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:387)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:195)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:295)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:238)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Error:Kotlin: Compiler terminated with internal error


#2

This issue is fixed in 1.1.2 and should be available in the upcoming EAP


#3

Hi
Thanks for fast answer.

Is there any known workaround other than going for EAP of 1.1.2?

Jørund


#4

You can manually remove "-ouput " in Kotlin facets for JavaScript modules (available in Project Structure), but these changes will only last until the reimport of Maven project


#5

OK. Thanks! We will try that out.