bhauman / rebel-readline

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

something strange with classpath (?) #166

Closed agzam closed 6 years ago

agzam commented 6 years ago

I was trying to play with it, noticed something strange, not sure if it's a bug. according to readme of "find-deps" project https://github.com/hagmonk/find-deps#api you should be able to use it from the rebel repl. I tried this in my ~/.clojure/deps.edn

{:aliases {:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
                  :main-opts  ["-m" "rebel-readline.main"]}
          :find-deps {:extra-deps
                      {find-deps {:git/url "https://github.com/hagmonk/find-deps",
                                  :sha "6fc73813aafdd2288260abb2160ce0d4cdbac8be"}},
                      :main-opts ["-m" "find-deps.core"]}}}

but for some reason that didn't work. Then I tried calling aliases with -Spath key and noticed: for some reason when running clj -A:rebel -Spath it uses significantly shorter one compared to clj -A:find-deps -Spath

What am I missing?

bhauman commented 6 years ago

clj -A:rebel:find-deps

bhauman commented 6 years ago

If you are wanting to use find-deps from rebel readline :main-opts ["-m" "find-deps.core"] is wrong. You would need to require find-deps not use it as a main entry point. rebel needs to be the main entry point.

agzam commented 6 years ago

of course. I knew I was doing something stupid. Thank you Bruce!