TL; DR;
lein repl starts in the namespace defined by :main in project.clj , instead of user , if required.
More details
I have a Leiningen project that deploys as a command line application in uberjar, so I can run it like this:
java -jar my-app-1.0-standalone.jar --some --args
I also have dev/user.clj to give me a nice REPL environment, described here .
My project.clj looks like this:
(defproject my-app "1.0" :main my-app.cli :aot [my-app.cli] :profiles {:dev {:source-paths ["src" "dev"]}})
When I run my REPL, either with lein repl from the command line or Mx cider-jack-in from Emacs, I am in the my-app.cli , not user .
If I remove :main my-app.cli from project.clj , my REPL runs in the user namespace as I expected, but this clearly violates my uberjar.
Any ideas?
source share