mount

tolitius 2016-07-05T15:59:05.000459Z

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

👍 1
tolitius 2016-07-05T15:59:07.000460Z

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

tolitius 2016-07-05T16:00:29.000461Z

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

tolitius 2016-07-05T16:01:40.000462Z

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

richiardiandrea 2016-07-05T17:43:17.000468Z

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

richiardiandrea 2016-07-05T17:44:04.000469Z

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

richiardiandrea 2016-07-05T17:44:35.000470Z

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