Hey there folks, are there any stability guarantee...
# scripting
r
Hey there folks, are there any stability guarantees around the scripting/repl APIs? I have a project using
JvmReplCompiler
+
JvmReplEvaluator
that would ideally support multiple Kotlin versions (the actual compiler version is important for things like compose). Would the BTA be able to help at all?
i
We are not able to provide any official stability guarantees about scripting. It remains an experimental feature. But in reality, scripting part of it is stable, and we intend to continue supporting it. The REPL part, on the other hand, is questionable. In particular, the
JvmReplCompiler
and
JvmReplEvaluator
are K1 based and will die soon. There are even more experimental
K2ReplCompiler
and
K2ReplEvaluator
wich will survive with a high probability, but they are not even part of the Scripting API yet. BTA will not help with REPL and script evaluation; it can only perform script compilation, and this is quite an edge case scenario.
r
Ok, good to know. What I'm really after here is a way to write a scripting/REPL harness that can run multiple Kotlin versions (ideally any, but even the non-deprecated language versions (+- 2 IIRC) would be very helpful)
I was able to migrate without running into any issues except one. If the interfaces in
kotlin.script.experimental.api
were somewhat stabilized in the future it would work great for my needs
i
It's cool that you migrated without many issues. I hope we'll be able to pull all the components of the K2 REPL into the API some day, so it will be less of a problem for you. And thanks for the issue. I'll take a look.
l
Hi, I'm doing REPL work using the API. github.com/lolifamily/Minecraft-MCP If you cares about compiling time, you must do some work like me to cache the environment