You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, first off thanks so much for your excellent plugin.
I've been having an issue with live plugins when they use other Groovy scripts in the same directory. For example, in the situation where there is this folder structure:
This works fine, but this isn't really a workable solution as my team currently have a few live plugins with various files and most people on the team do not have this issue, while 3-4 people do.
I've tried quite a few things so far but I'm at a bit of a loss as to what to try next. Please do let me know if there's anything more I can add that would be helpful.
I tried reproducing the problem in GoLand 2024.3.1 and LivePlugin (0.9.5 beta) but it seems to work 🤔
The code for running Groovy plugins hasn't change for a while and it's basically just this:
val pluginFolderUrl = "file:///${plugin.path}/"
val scriptEngine = GroovyScriptEngine(pluginFolderUrl, classLoader)
scriptEngine.loadScriptByName(mainScript.toUrlString())
where GroovyScriptEngine is bundled with Groovy so it should be pretty stable.
AFAIK Groovy version pretty much doesn't change across IDEs (and stays on version 3.0.x).
JDKs could probably be different across GoLand installations but it shouldn't make any difference.
I wonder if it could some kind of local problem (like case-sensitive files 🤷) or when copying the code I made a mistake and called the file global.groovy instead of "globals".
I am also having this problem under similarly mundane circumstances, but in IntelliJ IDEA Community on Windows. Same error, unable to resolve any classes in other files.
The classpath trick isn't working for me either.
Worth noting for above that making the file name match the class name didn't help.
IntelliJ IDEA 2024.3.1.1 Community Edition
LivePlugin 0.9.5 beta
Windows 11 23H2
Edit: and now I find // depends-on-plugin doesn't seem to be working for me in the editor for Groovy? That part works when the plugin is run, but doesn't seem to be able to resolve anything in the editor. Good grief... back to a single kotlin script instead then, at least that works for now.
Hi there, first off thanks so much for your excellent plugin.
I've been having an issue with live plugins when they use other Groovy scripts in the same directory. For example, in the situation where there is this folder structure:
Where
plugin.groovy
isand
globals.groovy
beingI get the error
If I specify adding it to the classpath in the form
// add-to-classpath /Users/jordanrobinson/example/.live-plugins/hello-world-test/
This works fine, but this isn't really a workable solution as my team currently have a few live plugins with various files and most people on the team do not have this issue, while 3-4 people do.
I've tried quite a few things so far but I'm at a bit of a loss as to what to try next. Please do let me know if there's anything more I can add that would be helpful.
Versions:
GoLand 2024.1.3 GO-241.17890.21
LivePlugin 0.8.8 beta
macOS Sonoma 14.5
The text was updated successfully, but these errors were encountered: