The documentation for lazy start makes it sound like something that's only supposed to be enabled for :cljc mode, but it seems to apply in the default :clj mode as well.
Making sure we're in :clj mode:
> @(var mount.core/mode)
#<Atom@102525ec: :clj>
W/ the following state in namespace foo:
(defstate test-state
:start 1)
And accessing from a different namespace:
> foo/test-state
#<DerefableState@6425c0d5: :not-delivered>
> @foo/test-state
#object[mount.core.NotStartedState 0x4ae19e09 "'#'foo/test-state' is not started (to start all the states call mount/start)"]
> foo/test-state
1
Looking at the code, it seems there's no mode check when dereferencing.
The documentation for lazy start makes it sound like something that's only supposed to be enabled for
:cljcmode, but it seems to apply in the default:cljmode as well.Making sure we're in
:cljmode:W/ the following state in namespace
foo:And accessing from a different namespace:
Looking at the code, it seems there's no
modecheck when dereferencing.