Fork me on GitHub

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?


Not invoking the main-opts thing


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


Defining a separate alias is also a workaround ;)


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?