Fork me on GitHub
#mount
<
2020-10-08
>
bastilla10:10:38

Hi there. Is there a way to automatically re-load a state (defstate) once the underlying source changes? I have

(defstate wkr-setting
  :start (load-config :file (wkr-setting-filepath)))
I saw there is "ChangeListener". Might that the way to do such things in mount? (Apologies, I have a hard time understanding test files, where this isn't mentioned, btw.) 1000 Thanks, if you happen to have such a snippet code available, or hints!

bastilla10:10:28

I just read (github) it should be easily done via (mount/stop) and (mount/start). Nevermind. I give it a shot.

zilti11:10:55

Mount will automatically reload the namespace as soon as you re-evaluate / send to REPL the source.

bastilla17:10:33

(ops) Nevermind. Yes, it works.