Skip to content

Commit 3c7b04a

Browse files
committed
Fix artifact list cache not working
The content of the artifact cache was stored in a sorted map and then written to disk. The default readeres for edn does not contain a reader capable of handling sorted maps. This caused the artifact cache to stop working. This commits drops the use of sorted maps, as we never rely on them being sorted anyway.
1 parent 0482038 commit 3c7b04a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/refactor_nrepl/artifacts.clj

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
;; structure here is {"prismatic/schem" ["0.1.1" "0.2.0" ...]}
2121
(defonce artifacts (atom (if (.exists (io/as-file artifacts-file))
22-
(->> artifacts-file slurp edn/read-string (into (sorted-map)))
22+
(->> artifacts-file slurp edn/read-string (into {}))
2323
{})
2424
:meta {:last-modified
2525
(get-last-modified-from-file artifacts-file)}))
@@ -107,7 +107,7 @@
107107
(defn- get-artifacts-from-clojars!
108108
[]
109109
(reduce #(update %1 (str (first %2)) conj (second %2))
110-
(sorted-map)
110+
{}
111111
(get-clojars-artifacts!)))
112112

113113
(defn- update-artifact-cache!

0 commit comments

Comments
 (0)