Are Kotlin scratch files broken in the latest vers...
# intellij
r
Are Kotlin scratch files broken in the latest version, or is it just my project? Getting "good code red":
Cannot access script base class 'kotlin.script.templates.standard.ScriptTemplateWithArgs'. Check your module classpath for missing or conflicting dependencies
-- I'm not seeing any issues with the module classpath...
g
I usually have this problem if my project build is broken, try to build project where you run this scratch
r
Nope, the build works fine
m
I’ve had issues with this too, but if you do ‘Intention’ on the bad lines, it will suggest adding the script libraries to your config. It adds them to your build.gradle as runtime dependencies, and it appears to work. So still not a seamless process for me.
r
Well, that's odd. I just flipped back to the scratch to try the workaround above, and the scratch "good code red" went away on its own, after a second or two.
Not sure what I did... I may have resynced the gradle project. It doesn't seem like adding the script libs is necessary (it wasn't in the past either).
m
I’ve also found it to be hit-and-miss, so some lurking issues somewhere. It is a bit confusing to ensure one has chosen the correct module to load, and as you say, perhaps a loading issue too. Very handy when it works as expected.