This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-27
Channels
- # aleph (1)
- # announcements (39)
- # aws (11)
- # beginners (58)
- # calva (10)
- # cider (7)
- # clj-kondo (65)
- # cljs-dev (5)
- # clojure (90)
- # clojure-dev (48)
- # clojure-europe (23)
- # clojure-madison (1)
- # clojure-norway (1)
- # clojure-uk (40)
- # clojured (11)
- # clojurescript (20)
- # conjure (12)
- # core-async (4)
- # core-logic (4)
- # cursive (3)
- # datalevin (1)
- # emacs (7)
- # events (2)
- # fulcro (48)
- # introduce-yourself (2)
- # lsp (36)
- # malli (11)
- # missionary (1)
- # off-topic (1)
- # other-languages (72)
- # pathom (4)
- # polylith (13)
- # portal (94)
- # re-frame (14)
- # react (5)
- # releases (1)
- # sci (12)
- # shadow-cljs (29)
- # spacemacs (3)
- # vim (4)
- # xtdb (12)
I'm still making some slow progress on my integration with sci
. I'm working with shadow-cljs, with hot code reloading. If I add a var (for example) to some cljs namespace, and shadow-cljs hot loads that, I'm struggling to figure out how to make it visible to sci
. I think that when I'm calling copy-ns
, the source ns
that I'm copying from maybe doesn't have the new var, which I suppose probably isn't a sci
issue but I'm a little baffled by all this.
Yeah, I have something that looks like this:
(defn ^:export ^:dev/after-load update-repl-namespaces
[]
(when-let [repl-config (:repl @state)]
(let [namespaces ((:namespace-fn repl-config))]
(swap! repl/state update :sci-env sci/merge-opts namespaces))))
And that namespaces
variable is something like:
{:namespaces {'client (copy-ns foo.client (sci/create-ns 'client))
...}}
But when I print out the namespaces there (triggered by the reload), it doesn't contain the new var, unless some other namespace makes a reference to it ... or something along those lines. I haven't untangled it yet. I don't know if there's some fundamental reason this can't work.