Skip to content

Commit

Permalink
Fix artifact list cache not working
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
expez committed Jun 24, 2021
1 parent a165f89 commit e0accea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/refactor_nrepl/artifacts.clj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

;; structure here is {"prismatic/schem" ["0.1.1" "0.2.0" ...]}
(defonce artifacts (atom (if (.exists (io/as-file artifacts-file))
(->> artifacts-file slurp edn/read-string (into (sorted-map)))
(->> artifacts-file slurp edn/read-string (into {}))
{})
:meta {:last-modified
(get-last-modified-from-file artifacts-file)}))
Expand Down Expand Up @@ -107,7 +107,7 @@
(defn- get-artifacts-from-clojars!
[]
(reduce #(update %1 (str (first %2)) conj (second %2))
(sorted-map)
{}
(get-clojars-artifacts!)))

(defn- update-artifact-cache!
Expand Down

0 comments on commit e0accea

Please sign in to comment.