Fork me on GitHub
#tools-deps
<
2020-12-12
>
practicalli_john08:12:14

I am trying to remember what the -f option does in this alias, is it specifying the file to look in for the preceeding -i init path option? Or does it have a different meaning?

:repl/rebel-nrepl
  {:extra-deps {nrepl/nrepl                {:mvn/version "0.8.3"}
                cider/cider-nrepl          {:mvn/version "0.25.5"}
                com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
   :main-opts  ["-m" "nrepl.cmdline"
                "--middleware" "[cider.nrepl/cider-middleware]"
                "-i"
                "-f" "rebel-readline.main/-main"]}
Thanks.

seancorfield19:12:54

That's an argument to nrepl.cmdline @jr0cket

practicalli_john19:12:51

Ah, that makes sense, thanks.

seancorfield19:12:40

-f is equivalent to --repl-fn so I guess it's how you specify a particular REPL to run instead of the default nREPL one.

seancorfield19:12:54

(I had to go look in the source for that -- I don't use nREPL)

practicalli_john19:12:24

Oh that's very useful. I'll take a look when I get chance. Thanks.

borkdude22:12:43

small update from babashka.deps, a way to programmatically invoke a clojure process without additional installers, cross platform (it's using deps.clj under the hood (https://github.com/borkdude/deps.clj))

$ bb "(->> (deps/clojure '[-X:deps tree :format :edn] {:out :string}) deref :out edn/read-string :children keys (take 2))"
(org.clojure/clojure org.clojure/tools.cli)

borkdude22:12:36

$ bb -e "(:exit @(deps/clojure '[-X clojure.core/prn :foo :bar]))"
{:foo :bar}
0