Pick prioritized value in add-repo if there is one
This commit is contained in:
parent
cd52531897
commit
120c54ab3c
1 changed files with 5 additions and 4 deletions
|
@ -171,11 +171,12 @@
|
|||
(meta repos)))
|
||||
|
||||
(defn- add-repo [repos [id opts :as repo]]
|
||||
;; TODO - we completely ignore metadata here. Should follow
|
||||
;; ^:replace/^:displace conventions and merge metadata
|
||||
(update-first repos #(= id (first %))
|
||||
(fn [[_ existing]]
|
||||
[id (meta-merge existing opts)])))
|
||||
(fn [[_ existing :as original]]
|
||||
(if (different-priority? repo original)
|
||||
(pick-prioritized repo original)
|
||||
(with-meta [id (meta-merge existing opts)]
|
||||
(merge (meta original) (meta repo)))))))
|
||||
|
||||
(def empty-dependencies
|
||||
(with-meta [] {:reduce add-dep}))
|
||||
|
|
Loading…
Reference in a new issue