Fork me on GitHub
#mount
<
2016-07-05
>
tolitius15:07:05

@dhruv: thanks for reporting it, I'll look into it today

tolitius15:07:07

@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.

tolitius16:07:29

@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"

tolitius16:07:40

i.e. ^{:on-reload :noop} says "whenever the app is started, in case a namespace that has me is recompiled, do nothing with me"

richiardiandrea17:07:17

@tolitius: that's exactly what happens, as I call the classic (go) function in :after. I was not aware of the difference

richiardiandrea17:07:04

I thought it was a "disable-it-for-real" kind of a thing, and mount/start knew about it as well

richiardiandrea17:07:35

now it's clearer that if I want to avoid that reloading, I also need to mount/start-without that state