Fork me on GitHub
#tools-deps
<
2023-11-16
>
simon19:11:22

Hi all, I saw that when downloading dependencies the repositories are tried in order, from src/main/clojure/clojure/tools/deps/alpha/util/maven.clj

(defn remote-repos
  [{:strs [central clojars] :as repos}]
  ;; always return central, then clojars, then other repos
  (->> (concat [["central" central] ["clojars" clojars]] (dissoc repos "central" "clojars"))
    (remove (fn [[_name config]] (nil? config)))
    (mapv remote-repo)))
There are some libraries though which use a different id for maven central and then the ordering is not applied (`maven-central` instead of central). One of these libraries is https://github.com/googleapis/google-cloud-java/blob/main/google-cloud-pom-parent/pom.xml. Is this something that has changed or is it just a loose convention to use central as id? And do you think it's a good idea to include maven-central in this ordering?

Alex Miller (Clojure team)21:11:49

central and clojars are built in to the root deps.edn and so are "special"

simon23:11:21

ah ok, that’s why they’re hardcoded, got it, thank you