This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-13
Channels
- # announcements (12)
- # babashka (88)
- # beginners (60)
- # biff (10)
- # calva (56)
- # clerk (9)
- # clj-kondo (5)
- # clojure (70)
- # clojure-austin (3)
- # clojure-conj (2)
- # clojure-dev (69)
- # clojure-europe (53)
- # clojure-nl (1)
- # clojure-norway (28)
- # clojure-uk (1)
- # clojurescript (27)
- # copenhagen-clojurians (3)
- # cursive (10)
- # datascript (1)
- # datomic (10)
- # fulcro (3)
- # funcool (1)
- # garden (7)
- # helix (5)
- # holy-lambda (5)
- # hyperfiddle (39)
- # introduce-yourself (6)
- # jobs-discuss (15)
- # lsp (3)
- # malli (5)
- # membrane (19)
- # missionary (1)
- # nrepl (6)
- # off-topic (44)
- # pathom (17)
- # pomegranate (3)
- # react (7)
- # releases (1)
- # shadow-cljs (39)
- # tools-deps (16)
- # xtdb (28)
Question… I think I’ve seen here that :git/tag
for dependencies will NOT work without an associated :git/sha
.
however, this command seems to work fine:
clojure -Ttools install io.github.seancorfield/deps-new '{:git/tag "v0.4.13"}' :as new
while this one fails:
clojure -Sdeps '{:deps {io.github.mentat-collective/clerk-utils {:git/tag "v0.3.0"}}}' \
-Tnew create \
:template clerk-utils/custom \
:name myusername/my-notebook-project
with
Error building classpath. Library io.github.mentat-collective/clerk-utils has coord with missing sha
is there something about -Ttools install
that allows you to forgo the :git/sha
?got it, makes sense after digging through the code
I wish there were some easy way to have github inject the current SHA into a README.md
tools like #C03KCV7TM6F allow you to add a dependency by tag:
neil add dep io.github.mentat-collective/clerk-utils --git/tag v0.3.0
for README: I sometimes work with templates that I re-generate, but the downside of this is that I regularly receive PRs that update the generated README instead of the template :)
In deps.edn
, the SHA acts as a check on the tag -- to make sure they match and you're not picking up some random version because someone moved the tag (tags are mutable in git, SHAs are not).
tools install
is kind of odd that way so I assume the thinking is that picking up some random version of an installed "dev tool" is less important/less risky than your production code picking up some random version? @U064X3EF3?
Hi is there a way to use tools.deps to load a dependency programmatically, quite similar to https://insideclojure.org/2018/05/04/add-lib/, but not using the repl? I want to calculate the git hash and then add an dependency in runtime, quite similar of what borkdude does in neil + deps-new, but only using clojure tools.deps.
The add-lib stuff is a function
Yes, but I saw it uses DynamicClassLoader's addURL and this only works on repl right?
It depends on the context. You can "easily" set up that context yourself programmatically.
My :add-libs
alias includes the code via -e
but you could just add this into your code: https://github.com/seancorfield/dot-clojure/blob/develop/deps.edn#L128
Interesting thanks!