cbeust / kobalt-intellij-plugin

An IntelliJ plug-in for Kobalt
21 stars 7 forks source link

Loading plugins() disables IDEA plug-in #56

Closed ethauvin closed 7 years ago

ethauvin commented 8 years ago

I created a project with ./kobaltw --init java, added the following to the Build.kt file:

import com.beust.kobalt.plugins

val pl = plugins("net.thauvin.erik:kobalt-exec:0.6.2")

Imported as a Kobalt project into IDEA 2016.2 (Windows), the IDEA plugin is basically disabled:

capture

I then commented the plugins() line out and reloaded:

capture2

Works.

Additionally, I have never been able to import a Kobalt project as an .ipr, only .iml seems to work.

cbeust commented 8 years ago

Mmmh that's mysterious. @dmitry-zhuravlev any thoughts?

dmitry-zhuravlev commented 8 years ago

"the IDEA plugin is basically disabled" I think you mean that tool window doesn't show anything? If so I suppose that Kobalt return nothing because of val pl = plugins("net.thauvin.erik:kobalt-exec:0.6.2") for some reason...

"Additionally, I have never been able to import a Kobalt project as an .ipr, only .iml seems to work." ".ipr" it is a legacy IDEA project format ".iml" it is a IDEA module format. Maybe you mean "...as an .ipr, only .idea seems to work" you cannot compare .ipr with .iml because it is a different things. Anyway I haven't check plugin with legacy .ipr based version of project. If you have some test .ipr based projects you are welcome to show me the concrete example.

ethauvin commented 8 years ago

"the IDEA plugin is basically disabled" I think you mean that tool window doesn't show anything? If so I suppose that Kobalt return nothing because of val pl = plugins("net.thauvin.erik:kobalt-exec:0.6.2") for some reason...

Actually, it'll ultimately give you a warning saying the module is no longer a valid Kobalt module and the Kobalt tool window will completely disappear, and to be clear, it doesn't matter which plugin is used, even @cbeust kobalt-line-count will fail.

Anyway I haven't check plugin with legacy .ipr based version of project. If you have some test .ipr based projects you are welcome to show me the concrete example.

./kobaltw --init java then import as .ipr.

dmitry-zhuravlev commented 8 years ago

Tried with: import com.beust.kobalt.plugins val pl = plugins("net.thauvin.erik:kobalt-exec:0.6.2")

And after some improvement in the plugin's output I see some exceptions which was thrown inside Kobalt:

Caused by: java.lang.AssertionError: com.beust.kobalt.KobaltException: Couldn't create PluginInfo: net.thauvin.erik.kobalt.plugin.exec.ExecPlugin

@cbeust any thoughts about it?

dmitry-zhuravlev commented 8 years ago

./kobaltw --init java then import as .ipr.

Tried to do it and it works for me without any problem:

image

ethauvin commented 8 years ago

Tried to do it and it works for me without any problem:

It worked for me today too. Whatever @cbeust changed fixed it.