Closed vizanto closed 8 years ago
@vizanto You are right, and I know where this issue is caused (here). I will supply a fix soon. For now, a restart (of the JVM) or an (ns-unmap 'my-namespace 'thing)
will do the trick.
true, no rush :+1: thanks
@vizanto The defstate
macro now disallows defining a defstate for an existing non-defstate var, explicitly. If you really need to introduce a new defstate that has dependents, while keeping the JVM running, try this:
;; Unmap the existing var, if it exists.
(ns-unmap 'my-namespace 'thing)
;; Create the defstate.
(defstate thing ...)
;; Ensure the correct order sequence number.
(alter-meta! *1 assoc :mount.lite/order <an-order-number-that-is-between-its-dependents-and-dependencies>)
The mount-library has been incrementing the order sequence number by 10 for some time now, in order to support this scenario.
The explicit disallowance will be released in 0.9.8.
Steps to reproduce
1) Create file
2) Edit: