Fork me on GitHub
#tools-deps
<
2023-04-29
>
jumar05:04:32

I don't use deps.edn that much so I forgot if this is a thing: can you use branch name as a git dependency version specification, as opposed to using commit sha? Looking at the https://clojure.org/guides/deps_and_cli#_using_git_libraries and the https://clojure.org/reference/deps_and_cli#_git it doesn't seem possible.

seancorfield05:04:20

No, you can use tag and short sha or just full sha. You can resolve a branch to get the last sha tho'...

seancorfield05:04:58

For example:

;; (require '[clojure.tools.gitlibs :as gitlibs])
  ;; (defn load-master [lib]
  ;;   (let [git (str "" lib ".git")]
  ;;    (add-libs {lib {:git/url git :sha (gitlibs/resolve git "master")}})))

jumar06:04:34

I see, thanks!