Merge pull request #107 from krajj7/fix_106

prevent reloading of mount.core ns - fix https://github.com/tolitius/mount/issues/106
This commit is contained in:
Anatoly 2019-01-28 10:32:51 -05:00 committed by GitHub
commit 5fab543501
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View file

@ -1,4 +1,4 @@
(defproject mount "0.1.15"
(defproject mount "0.1.16-SNAPSHOT"
:description "managing Clojure and ClojureScript app state since (reset)"
:url "https://github.com/tolitius/mount"
:license {:name "Eclipse Public License"

View file

@ -1,4 +1,5 @@
(ns mount.core
#?(:clj {:clojure.tools.namespace.repl/load false}) ; prevent reloading of this ns
#?(:clj (:require [mount.tools.macro :refer [on-error throw-runtime] :as macro]
[mount.tools.macrovich :refer [deftime]]
[mount.tools.logger :refer [log]]
@ -17,10 +18,6 @@
(defonce ^:private meta-state (atom {}))
(defonce ^:private running (atom {})) ;; to clean dirty states on redefs
;; supporting tools.namespace: (disable-reload!)
#?(:clj
(alter-meta! *ns* assoc ::load false)) ;; to exclude the dependency
(defn- make-state-seq [state]
(or (:order (@meta-state state))
(swap! state-seq inc)))