Seems `kotlin-scripting-jvm-host` is missing a dep...
# scripting
e
Seems
kotlin-scripting-jvm-host
is missing a dependency on
kotlin-scripting-compiler(-embeddable)
in the pom. Had to explicitly specify it.
g
I’m not sure but, probably it’s intentional, so you could choose what kind compiler you need (daemon or embeddable)
i
It is unexpected for me, seems my teammates dropped this dependency while trying to solve unrelated problem. I’ll have a look. And no, you cannot choose the implementation here. The daemon support for the new scripting is not ready yet, and for
-embeddable
, youneed to use appropriate
-embeddable
host.
e
I’m not sure I understand tbh. Also, even after adding a dep on the compiler i still get NoClassDef for
com/intellij/openapi/util/Disposer
.
Let me guess, the artifacts without
-embeddable
are supposed to be used within IntelliJ-land (eg kotlin IJ plugin etc) and the ones with
-embeddable
are meant to be used in user-land
i
The problem will be fixed in the 1.3.50 release, but for a moment you need to use
-embeddable
compiler if you’re using
-embeddable
host. And accordingly - non-embeddable compiler with non-embeddable host.
It is recommended to use
-embeddable
variants if you’re adding these dependencies to any non-trivial app.
e
I was using the non -embeddable ones actually till i hit the missing dependencies. Switched to embeddable for now. and it works. I know this has been asked/answered before but, can you give me a quick enough explainer of the difference between the two?
i
Just copy the answer I gave few days ago. Maybe we should put it somewhere publicly. :)
We have a bunch of
-embeddable
jars, starting from compiler. The `kotlin-compiler`jar is a fat jar that contains almost all dependencies inside and in the reduced form (we’re using proguard to remove unused parts.) So if your app need to include the compiler as a dependency, e.g. when you’re using scripting, then there is a chance of version clashes or missing functionality, if your app happens to depend from the same dependency. To avoid this problem the
-embeddable
compiler is created in which all bundled 3-party dependencies are relocated to different package names. All other
-embeddable
jars use
-embeddable
compiler accordingly.
👍 1
e
Nice. Thank you, that makes sense.