This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-30
Channels
- # babashka (19)
- # beginners (87)
- # calva (11)
- # cider (6)
- # cljdoc (30)
- # clojure (84)
- # clojure-china (1)
- # clojure-dev (13)
- # clojure-europe (4)
- # clojure-france (1)
- # clojure-gamedev (1)
- # clojurescript (12)
- # core-async (1)
- # cursive (12)
- # data-oriented-programming (1)
- # defnpodcast (1)
- # emacs (9)
- # events (1)
- # fulcro (8)
- # graalvm (1)
- # introduce-yourself (1)
- # missionary (6)
- # music (1)
- # nextjournal (14)
- # off-topic (26)
- # portal (2)
- # re-frame (1)
- # releases (2)
- # shadow-cljs (13)
@thheller I just wanted to circle back on that weird problem I was having a couple weeks back with the odd changes in repl state because after quite a bit of detective work I've tracked down the cause. It turns out that, without my being aware of it, the clj-refactor bindings in emacs were inserting require cljs libspecs in the ns form whenever I hit / with an "new" namespace. Unfortunately, it put those in the :require-macros
section rather than the :require
section as it should (presumably because it was first). There were a couple of these, and when I removed them the problem went away. When I put them back, the problem returned. I don't understand why that would produce the problems I saw, but the causality seems pretty clear. Thanks again for all your help; I very much appreciate it!
I’m starting my app by launching a repl clj -M:shadow-cljs clj-repl
then running (shadow/watch :app)
. I like having that repl there. What is the best way to go about adding functions to this namespace? Can I somehow provide my own namespace and just require the functions that shadow.user
does and add my own?
I’ve tried adding :nrepl {:init-ns phrasing.user}
to my shadow-cljs.edn
and tried adding {:repl-init-ns phrasing.user}
to :builds :app :devtools
I tried that with the following clojure tools alias:
:nrepl
{:extra-deps {nrepl/nrepl {:mvn/version "0.9.0"}}
:main-opts ["-m" "nrepl.cmdline"
"--connect"]}}}
which loads in the user
namesapce. I tried lein repl :connect
and that seems to have worked! So thank you!!
Do you happen to know why the clojure.tools version isn’t working?it would work just fine, it just isn't supported because nobody has asked for this before
most people use an editor connected REPL and most editors use nrepl for this, so that is the default that has the most features