I am using Clojure, ClojureScript, shadow-cljs, Emacs, Cider, and Lein to develop a web app project.
This is the usual workflow: inside a project and for ClojureScript projects, execute cider-jack-in-cljs, choose shadow-cljs, then shadow for REPL type, and app for build option.
Sometimes, I start a project and see as the top-level in the REPL:
shadow.user>
In other times, I see:
cljs.user>
I believe the names indicate the namespace been used.
But, why are different start-ups happening? What do the different names imply (beyond the namespace)?
My expectation was that I would have the same namespace on every startup of the REPL.
shadow.user>
is generated after executing cider-jack-in-clj
. And cljs.user>
is generated after executing cider-jack-in-cljs
.
The s
at the end of the command's name is subtle but crucial. I can't say much about the implications.
Since the commands are similar, I believe that I accidentally executed cider-jack-in-clj
instead of cider-jack-in-cljs
. This generated different namespaces for the REPL and a wrong impression that the REPL namespace would vary under same conditions. It only varies if the command changes!