Kotlin / kotlin-interactive-shell

Kotlin Language Interactive Shell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Possible to use kotlin-shell via lein repl ?

573 opened this issue · comments

lein update-in :dependencies conj '[org.jetbrains.kotlinx/ki-shell "0.3.2"]' -- repl

just gives me a clojure repl.
What are the steps to start the kotlin shell inside this session ?
Something along (my example is incorrect):

user=> (ns kotlin-shell-ns (:require [org.jetbrains.kotlinx.ki.shell.KotlinShell :as ki]))

Execution error (FileNotFoundException) at kotlin-shell-ns/eval2008$loading (REPL:1).
Could not locate org/jetbrains/kotlinx/ki/shell/KotlinShell__init.class, org/jetbrains/kotlinx/ki/shell/KotlinShell.clj or org/jetbrains/kotlinx/ki/shell/KotlinShell.cljc on classpath.

I never tried to do something similar. So, I need to do some research here.

I am a little bit closer now. If we would use the java class for KotlinShell we could use something like:

user=> (org.jetbrains.kotlinx.ki.shell.KotlinShell/main (into-array ["test"]))

What remains as a followup issue, although I am entirely not sure if on kotlin-shell's side is, that when I close the kotlin-shell via :q and then directly reopen via above clojure expression I have no input anymore. Might be a terminal issue.