Skip to content

Commit

Permalink
undo whitespace change
Browse files Browse the repository at this point in the history
  • Loading branch information
bendlas committed Jun 16, 2023
1 parent cad45c8 commit c0f0e7f
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions src/cljnix/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -338,52 +338,52 @@
:as opts}]
(fs/with-temp-dir [cache-dir {:prefix "clj-cache"}]
(transduce
(comp
;; NOTE: the globbing below return $PREFIXdeps.edn paths, we need to filter still
(filter #(= "deps.edn" (fs/file-name %)))
(remove #(some (partial fs/ends-with? %) deps-ignore))
(map fs/file)
(map (juxt identity #(-> % deps/slurp-deps :aliases keys
(->> (remove (set aliases-ignore))))))
(mapcat aliases-combinations)
(map (fn [[deps-path aliases]] (get-deps! deps-path cache-dir aliases))))
(completing
(fn [acc {:keys [mvn git]}]
(-> acc
(comp
;; NOTE: the globbing below return $PREFIXdeps.edn paths, we need to filter still
(filter #(= "deps.edn" (fs/file-name %)))
(remove #(some (partial fs/ends-with? %) deps-ignore))
(map fs/file)
(map (juxt identity #(-> % deps/slurp-deps :aliases keys
(->> (remove (set aliases-ignore))))))
(mapcat aliases-combinations)
(map (fn [[deps-path aliases]] (get-deps! deps-path cache-dir aliases))))
(completing
(fn [acc {:keys [mvn git]}]
(-> acc
(update :mvn into mvn)
(update :git into git)))
(fn [{:keys [mvn git]}]
(when lein?
(download-lein-deps cache-dir))
(sorted-map-by
map-comparator
:lock-version LOCK-VERSION
:mvn-deps (->> (concat mvn (missing-mvn-deps mvn cache-dir))
(sort-by :mvn-path)
(map add-to-nix-store!)
(map #(into (sorted-map-by map-comparator)
(select-keys % [:mvn-repo :mvn-path :hash :snapshot])))
(distinct)
(into []))
:git-deps (->> (concat git (missing-git-deps git cache-dir))
(map #(update % :lib str))
(sort-by :lib)
(map #(cond-> %
(nil? (:tag %))
(dissoc :tag)))
(map add-to-nix-store!)
(map #(into (sorted-map-by map-comparator)
(select-keys % [:tag :lib :rev :url :git-dir :hash])))
(distinct)
(reduce (fn [acc v]
(if (same-git-dep? (peek acc) v)
(conj (pop acc) (merge v (peek acc)))
(conj acc v)))
[])))))

{:mvn extra-mvn
:git extra-git}
(fs/glob project-dir "**deps.edn")))))
(fn [{:keys [mvn git]}]
(when lein?
(download-lein-deps cache-dir))
(sorted-map-by
map-comparator
:lock-version LOCK-VERSION
:mvn-deps (->> (concat mvn (missing-mvn-deps mvn cache-dir))
(sort-by :mvn-path)
(map add-to-nix-store!)
(map #(into (sorted-map-by map-comparator)
(select-keys % [:mvn-repo :mvn-path :hash :snapshot])))
(distinct)
(into []))
:git-deps (->> (concat git (missing-git-deps git cache-dir))
(map #(update % :lib str))
(sort-by :lib)
(map #(cond-> %
(nil? (:tag %))
(dissoc :tag)))
(map add-to-nix-store!)
(map #(into (sorted-map-by map-comparator)
(select-keys % [:tag :lib :rev :url :git-dir :hash])))
(distinct)
(reduce (fn [acc v]
(if (same-git-dep? (peek acc) v)
(conj (pop acc) (merge v (peek acc)))
(conj acc v)))
[])))))

{:mvn extra-mvn
:git extra-git}
(fs/glob project-dir "**deps.edn")))))

(defn- check-main-class
[& [_ value & more :as args]]
Expand Down

0 comments on commit c0f0e7f

Please sign in to comment.