Hi there, I think this is a problem with a missing var-to-str but I can't work out exactly where that should be.
Basically, if you shadow some state, you should expect it to reset when doing mount/stop, but it doesn't.
(require '[mount.core :as mount])
(mount/defstate foo :start :foo)
(mount/start-with-states
{#'foo {:start (constantly :bar)
;; to get it to even be able to be stopped when given to (mount/stop)
:stop (constantly nil)}})
(println foo) ;; => :bar
;; unexpected behaviour
(mount/stop #'foo)
(mount/start)
(println foo) ;; => :bar
;; workaround
(mount/stop "#'user/foo")
(mount/start)
(println foo) ;; => :foo
Hi there, I think this is a problem with a missing
var-to-strbut I can't work out exactly where that should be.Basically, if you shadow some state, you should expect it to reset when doing
mount/stop, but it doesn't.