@dhruv: thanks for reporting it, I'll look into it today
@richiardiandrea: ^{:on-reload :noop}
will disable stopping or starting the state on a namespace recompilation. however it would still obey (mount/start)
/ (mount/stop)
calls.
which means if any of the namespaces with (mount/start)
/ (mount/stop)
calls are reloaded, and these calls are executed (i.e. somewhere in dev namespace or anywhere else), the state's start/stop functions will be called.
@richiardiandrea: when you call clojure.tools/refresh
, most likely you call (mount/stop)
=> (mount/start)
as the result (this is my guess), hence all of your states are "restarted"
i.e. ^{:on-reload :noop}
says "whenever the app is started, in case a namespace that has me is recompiled, do nothing with me"
@tolitius: that's exactly what happens, as I call the classic (go)
function in :after
. I was not aware of the difference
I thought it was a "disable-it-for-real" kind of a thing, and mount/start
knew about it as well
now it's clearer that if I want to avoid that reloading, I also need to mount/start-without
that state