Fork me on GitHub
#tools-deps
<
2022-02-26
>
borkdude14:02:33

Workaround for getting a REPL for -A with :main-opts invocation:

clj -Scp $(clojure -Spath -A:babashka/dev)

Alex Miller (Clojure team)14:02:59

What are you working around?

borkdude16:02:35

Not invoking the main-opts thing

practicalli-johnny19:02:10

I define a separate alias that doesn't include the main-opts, such as :lib/kaocha (in practicalli/clojure-deps-edn) for including Kaocha test runner as a library rather than calling it as a test running. Not sure I understand any use cases that would require a workaround

borkdude20:02:24

Defining a separate alias is also a workaround ;)

borkdude20:02:01

My use case is that 99% of the time I am using -M:alias to invoke the main function, but today I needed to invoke a REPL with that dependency, which was unusual, and I thought I'd share my workaround. Which brings me to the question: when will -A + :main-opts be really deprecated so it will invoke a REPL? I think the deprecation warning has been there for long enough now?