This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-19
Channels
- # announcements (1)
- # babashka (40)
- # beginners (84)
- # biff (46)
- # calva (37)
- # cherry (2)
- # cider (18)
- # clj-otel (5)
- # clojure (53)
- # clojure-europe (39)
- # clojure-hungary (12)
- # clojure-norway (40)
- # clojure-sweden (2)
- # clojure-uk (2)
- # clojurescript (6)
- # community-development (21)
- # cursive (28)
- # data-science (12)
- # datomic (3)
- # figwheel-main (2)
- # fulcro (12)
- # graalvm (7)
- # gratitude (1)
- # hyperfiddle (23)
- # integrant (9)
- # jobs (2)
- # leiningen (4)
- # lsp (8)
- # malli (3)
- # missionary (1)
- # off-topic (39)
- # polylith (3)
- # portal (33)
- # practicalli (4)
- # re-frame (3)
- # releases (1)
- # sci (53)
- # solo-full-stack (8)
- # sql (5)
- # timbre (9)
Hi there, is there a way to halt and re-init a single component when using integrant.repl
?
I have tried with the standard ig/halt!
but it seems to stop the whole system...for some reason
Not currently. There is a PR for it, I believe, but it's difficult to implement while maintaining consistency. For example, what if someone runs (init :foo)
and then (halt :bar)
. It might be reasonable to support keys only on init
, and then maintain a set of initiated keys.
(From the https://github.com/weavejester/integrant#initializing-and-halting): Both init
and halt!
can take a second argument of a collection of keys. If this is supplied, the functions will only initiate or halt the supplied keys (and any referenced keys). For example:
(def system
(ig/init config [:adapter/jetty]))
I’ve never actually used halt!
supplying a collection of keys, but I assume it works as advertised.
Well I tried the integrant.repl
version (adding an arity, cause missing) but it does not seem to work
I'll have to dig into it and before doing that I was wondering if noone else had a pattern for it
The problem with other approaches is that you'd have to maintain your system
and config
as var somewhere in the repl, integrant.repl
does that for you
I see why now, the original repl
code wipes the whole system
https://github.com/arichiardi/integrant-repl/blob/master/src/integrant/repl.clj#L70