Skip to content

Lazy start in :clj mode #126

@xiongtx

Description

@xiongtx

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions