bhauman / rebel-readline

Terminal readline library for Clojure dialects
Eclipse Public License 1.0
679 stars 37 forks source link

babashka support #214

Open mizlan opened 3 years ago

mizlan commented 3 years ago

Would it be possible to use this with Babashka?

jeroenvandijk commented 1 year ago

It would require Babashka support for JLine (see this discussion or this one) or something else then Jline would have to be used by rebel-readline.

More details:

Given the following script rebel_readline.clj:

(require '[babashka.deps :refer [add-deps]])

(add-deps '{:deps
            {io.github.bhauman/rebel-readline {:sha "146c5ccd261f02adff725be5387f9a7258344342"
                                               :deps/root "rebel-readline"}}})

(require '[rebel-readline.main])

(rebel-readline.main/main)

When I run bb rebel_readline.clj Then I see the following error:

1: (ns rebel-readline.jline-api.attributed-string
2:   (:refer-clojure :exclude [partition-all])
3:   (:import
     ^--- Unable to resolve classname: org.jline.utils.AttributedStringBuilder
4:    [org.jline.utils AttributedStringBuilder AttributedString AttributedStyle]))
5:
6: (defn astr
7:   [& args]
8:   (AttributedString.