dkandalov / live-plugin

IntelliJ plugin for writing IntelliJ plugins at runtime ⚡️
https://plugins.jetbrains.com/plugin/7282
Apache License 2.0
858 stars 67 forks source link

Error running hello world live plugin in PyCharm 2021.1 #118

Open JiuShiRen opened 3 years ago

JiuShiRen commented 3 years ago

Upon running hello world live plugin in PyCharm 2021.1, I get this error, it’s the same one no matter if with Groovy or with Kotlin: Error linking script. Could not initialize class liveplugin.pluginrunner.PluginClassLoader_Fork

dkandalov commented 3 years ago

Thanks a lot for reporting this! Can you please copy the exact version of PyCharm from the "About" window (and I assume it's liveplugin version 0.7.0).

I tried the following PyCharm version but couldn't reproduce the issue 🤔 PyCharm 2021.1 (Community Edition) Build #PC-211.6693.115, built on April 6, 2021 LivePlugin: 0.7.0 beta

JiuShiRen commented 3 years ago

Sure, thanks so much for replying! Meanwhile I managed to get quite a lot to run on IDE scripting, but the LivePlugin still won't budge. Though I see that the PyCharm version of the IDE scripting is a reduced or outdated version of the IntelliJ IDE scripting (e.g. $project is defined in IntelliJ, but not in PyCharm IDE scripting), and python IDE scripting is even more limited (though it still works for those instructions without closures).

I wonder if it has anything to do with the IntelliJ configuration, or how does it work in the first place that PyCharm can interpret groovy? Maybe it has something to do with IntelliJ being only partly available (e.g. no JRE or unknown SDK)

The versions: indeed, its LivePlugin 0.7.0 beta

PyCharm 2021.1 (Community Edition) Build #PC-211.6693.115, built on April 6, 2021 Runtime version: 11.0.10+9-b1341.35 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2012M Cores: 8 Non-Bundled Plugins: GrepConsole (11.7.211.6085.0), LiveTemplatePreview (0.3), Quick Fix (1.0), SmarterEditor (0.12.0), String Manipulation (8.14.203.000.0), com.code-scan.intellij (4.7.3), com.google.ide-perf (1.1.0), com.intellij.ideolog (203.0.27.0), com.tabnine.TabNine (0.3.5), com.vladsch.MissingInActions (1.8.193.4), io.github.maddouri.intellij.OnlineSearch2 (1.1.4), me.fingerart.idea.apidebugger (2.0.1), org.jetbrains.intellij.scripting-javascript (1.0), org.jetbrains.intellij.scripting-python (1.0), LivePlugin (0.6.8 beta), izhangzhihao.rainbow.brackets (6.17), com.github.alexmojaki.birdseye.pycharm (1.1.0), python-smart-execute (0.1.6), com.kite.intellij (1.8.25), com.millennialmedia.intellibot@SeleniumLibrary Patched (0.10.143.381)

JiuShiRen commented 3 years ago

Whilst on IntelliJ the LivePlugin same version seems to run just as it should (if that helps)

dkandalov commented 3 years ago

Hm, in the Non-Bundled Plugins part of the output it says "LivePlugin (0.6.8 beta)" so maybe it's failing because of that 🤔 I mean can you try upgrading to 0.7.0 beta.

I'm not really familiar with IDE scripting but it pretty much doesn't work in PyCharm for me (makes me wonder why jetbrains even include it).

how does it work in the first place that PyCharm can interpret groovy

There is a groovy-2.5.11.jar bundled with PyCharm (and other IDEs). It has groovy.util.GroovyScriptEngine which can run any Groovy code.