JetBrains / sbt-idea-plugin

Develop IntelliJ plugins with Scala and SBT
Apache License 2.0
98 stars 28 forks source link

idea-runner/run return "Could not find installation home path" #25

Closed dieu closed 5 years ago

dieu commented 5 years ago
[info] Done packaging.
[info] Running com.intellij.idea.Main

Start Failed: Internal error. Please report to http://jb.gg/ide/critical-startup-errors

java.lang.RuntimeException: Could not find installation home path. Please reinstall the software.
    at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:93)
    at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:72)
    at com.intellij.openapi.application.PathManager.loadProperties(PathManager.java:409)
    at com.intellij.ide.Bootstrap.main(Bootstrap.java:17)
    at com.intellij.idea.Main.main(Main.java:61)
    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 sbt.Run.invokeMain(Run.scala:98)
    at sbt.Run.run0(Run.scala:92)
    at sbt.Run.execute$1(Run.scala:68)
    at sbt.Run.$anonfun$run$4(Run.scala:80)
    at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
    at sbt.util.InterfaceUtil$$anon$1.get(InterfaceUtil.scala:10)
    at sbt.TrapExit$App.run(TrapExit.scala:253)
    at java.lang.Thread.run(Thread.java:745)
mutcianm commented 5 years ago

SBT's default run task unfortunately seems to be unusable in order to run IDEA with sbt 1.x. IDEA bootstrap process expects a certain file and folder structure for jars on the classpath, which sbt screws up.

I guess some sort of custom dumb launcher has to be implemented to make it work for sbt 1.x

For the time being you can debug your plugin from IDEA after having created a run confuguration by running $YOUR_RUNNER_PROJECT/createIDEARunConfiguration task