Skip to content
Permalink
Browse files

ensure projects can specify newer versions of analysis deps

  • Loading branch information
martinklepsch committed Sep 8, 2018
1 parent cf25264 commit 422f4636167d3534a9b636faf3d5c2ca7fa04eeb
Showing with 18 additions and 11 deletions.
  1. +18 −11 modules/shared-utils/src/cljdoc/util/deps.clj
@@ -18,6 +18,20 @@
deps-map
min-versions)))

(defn- ensure-required-deps [deps-map]
(merge {'org.clojure/clojure {:mvn/version "1.9.0"}
'org.clojure/java.classpath {:mvn/version "0.2.2"}
'org.clojure/tools.namespace {:mvn/version "0.2.11"}
'org.clojure/clojurescript {:mvn/version "1.10.238"}}
deps-map))

(defn- add-cljdoc-codox [deps-map]
(assoc deps-map 'codox/codox {:exclusions '[enlive hiccup org.pegdown/pegdown]
;; :mvn/version "0.10.4"
:git/url "https://github.com/martinklepsch/codox"
:sha "4b0720941083fda9643d905f0854fabea55b175f"
:deps/root "codox/"}))

(defn- hardcoded-deps [project]
(-> '{"clj-time" {"clj-time" {org.clojure/java.jdbc {:mvn/version "0.7.7"}}}
"com.taoensso" {"tufte" {com.taoensso/timbre {:mvn/version "4.10.0"}}}}
@@ -33,8 +47,6 @@
(keep (fn [{:keys [group-id artifact-id version]}]
(when-not (or (.startsWith artifact-id "boot-")
;; Ensure that tools.reader version is used as specified by CLJS
(and (= group-id "codox")
(= artifact-id "codox"))
(and (= group-id "org.clojure")
(= artifact-id "tools.reader"))
;; The version can be nil when pom's utilize dependencyManagement - this unsurprisingly breaks tools.deps
@@ -47,21 +59,16 @@
(defn deps [pom project version]
(-> (extra-deps pom)
(merge (hardcoded-deps project))
(merge {'org.clojure/clojure {:mvn/version "1.9.0"}
'org.clojure/java.classpath {:mvn/version "0.2.2"}
'org.clojure/tools.namespace {:mvn/version "0.2.11"}
'org.clojure/clojurescript {:mvn/version "1.10.238"}
'codox/codox {:exclusions '[enlive hiccup org.pegdown/pegdown]
;; :mvn/version "0.10.4"
:git/url "https://github.com/martinklepsch/codox"
:sha "4b0720941083fda9643d905f0854fabea55b175f"
:deps/root "codox/"}})
(ensure-required-deps)
(add-cljdoc-codox)
(ensure-recent-ish)
(assoc project {:mvn/version version})))

(comment
(deps "/Users/martin/.m2/repository/manifold/manifold/0.1.6/manifold-0.1.6.pom" 'manifold/manifold "0.1.6")

(deps "https://repo.clojars.org/lambdaisland/kaocha/0.0-113/kaocha-0.0-113.pom" 'lambdaisland/kaocha "0.0-113")

(with-deps-edn {:deps {}} (io/file "."))

)

0 comments on commit 422f463

Please sign in to comment.
You can’t perform that action at this time.