This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-16
Channels
- # adventofcode (24)
- # announcements (3)
- # aws (3)
- # babashka (16)
- # beginners (88)
- # biff (5)
- # calva (27)
- # cider (15)
- # cljs-dev (70)
- # clojure (87)
- # clojure-austin (3)
- # clojure-belgium (6)
- # clojure-europe (59)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (3)
- # clojurescript (37)
- # data-science (2)
- # datalevin (40)
- # datomic (1)
- # emacs (23)
- # events (2)
- # graalvm (13)
- # graphql (7)
- # gratitude (1)
- # holy-lambda (193)
- # inf-clojure (15)
- # lsp (27)
- # malli (9)
- # off-topic (20)
- # polylith (6)
- # reitit (29)
- # releases (2)
- # scittle (13)
- # shadow-cljs (51)
- # transit (15)
- # xtdb (29)
for clj I use C-c C-k
to invoke (do (load-file "filepath")(in-ns 'namespace))
to reload a file and switch to its' namespace. I'm having difficulty figuring out an equivalent thing for cljs. If I run load-file
and then in-ns
it works but it leaves an extra []\n
in the repl output so I've been trying to sort it out. In the meantime I was wondering why inf-clojure has these as separate commands, do people usually load and set-ns as different commands or is there a different common workflow?
I just require the namespace. I’m not sure that clojurescript has a notion of load file?
and using load-file
means each form is essentially fed into a repl so you don't get line number metadata and source therefore won't work
it seems cljs does have load-file
. Interesting that you see extra input. If you just type in (load-file "whatever")
in the repl do you see the extra input?
(do (load-file "whatever"))
gives goog.nodeGlobalRequire is not a function\n:repl/exception!
what I was supposed to be asking is if I'm running a watch process is just in-ns effectively the same thing