Skip to content

Commit a1e81c0

Browse files
committed
Avoid defonce
It hinders interactive development, while not having a difference in final deliverables.
1 parent 2be2177 commit a1e81c0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/refactor_nrepl/artifacts.clj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
(if (zero? lm) nil lm)))
2020

2121
;; structure here is {"prismatic/schem" ["0.1.1" "0.2.0" ...]}
22-
(defonce artifacts (atom (if (.exists (io/file artifacts-file))
23-
(->> artifacts-file slurp edn/read-string (into {}))
24-
{})
25-
:meta {:last-modified
26-
(get-last-modified-from-file artifacts-file)}))
22+
(def artifacts (atom (if (.exists (io/file artifacts-file))
23+
(->> artifacts-file slurp edn/read-string (into {}))
24+
{})
25+
:meta {:last-modified
26+
(get-last-modified-from-file artifacts-file)}))
2727

2828
(def millis-per-day (* 24 60 60 1000))
2929

src/refactor_nrepl/ns/libspecs.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
;; The structure here is {path {lang [timestamp value]}}
1010
;; where lang is either :clj or :cljs
11-
(defonce ^:private cache (atom {}))
11+
(def ^:private cache (atom {}))
1212

1313
(defn- aliases [libspecs]
1414
(->> libspecs

0 commit comments

Comments
 (0)