tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
practicalli-john 2020-12-12T08:51:14.406500Z

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.

seancorfield 2020-12-12T19:10:54.407100Z

That's an argument to nrepl.cmdline @jr0cket

practicalli-john 2020-12-12T19:11:51.407200Z

Ah, that makes sense, thanks.

seancorfield 2020-12-12T19:16:40.407400Z

-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.

seancorfield 2020-12-12T19:16:54.407600Z

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

practicalli-john 2020-12-12T19:22:24.407800Z

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

borkdude 2020-12-12T22:32:43.408900Z

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)

borkdude 2020-12-12T22:36:36.409200Z

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