This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-24
Channels
- # aws (2)
- # babashka (27)
- # beginners (97)
- # calva (1)
- # cherry (12)
- # cider (6)
- # clara (12)
- # clj-kondo (24)
- # clj-on-windows (4)
- # cljfx (14)
- # clojure (54)
- # clojure-australia (3)
- # clojure-europe (26)
- # clojure-nl (1)
- # clojure-norway (4)
- # clojure-uk (9)
- # clojurescript (65)
- # conjure (5)
- # cursive (7)
- # datomic (18)
- # emacs (6)
- # helix (2)
- # honeysql (1)
- # jobs (1)
- # joyride (15)
- # kaocha (2)
- # lsp (10)
- # malli (5)
- # nbb (12)
- # observability (5)
- # off-topic (5)
- # reitit (2)
- # releases (4)
- # ring (1)
- # sci (17)
- # shadow-cljs (34)
- # testing (29)
- # tools-deps (45)
- # vim (7)
- # xtdb (6)
Realizing this is actually a question about deps, I’m still posting here.
I recently discovered on an airplane without WiFi access that this in my deps.edn
file prevented me from running tests because of: io.github.cognitect-labs/test-runner {:git/tag "v0.5.0" :git/sha "48c3c67"}
Is there a way to get :git
deps to be cached to .m2
directory, or something, to enable running offline? Thank you!
Git deps are cached to ~/.gitlibs
but I think t.d.a still has to check the tag/short-SHA match. I think if you just use the full SHA and no tag it might not check? (but Alex would be able to confirm)
Thank you, @U04V70XH6 — I would love to know how to do this. @U064X3EF3, is such a thing possible? Thank you!! (And sorry to bug!!)
Look at the repo on GH for the tag/sha and click on the sha to see the full SHA in the URL...
https://github.com/cognitect-labs/test-runner/commit/dfb30dd6605cb6c0efc275e1df1736f6e90d4d73 for 0.5.1
https://github.com/cognitect-labs/test-runner/commit/48c3c67f98362ba1e20526db4eeb6996209c050a for 0.5.0
Then remove :git/tag
and update :git/sha
with the full SHA.
I'm not saying that will prevent the online check, but I think it might...
Here's a thread in #clojure where Alex suggested that: https://clojurians.slack.com/archives/C03S1KBA2/p1663253553125709
“:git/tag” ?!? I didn’t even see that (just copied and pasted), and actually didn’t even know that existed — okay, I’ll try it out and report! Thx again!
So you'll go from {:git/tag "v0.5.0" :git/sha "48c3c67"}
(what you showed) to {:git/sha "48c3c67f98362ba1e20526db4eeb6996209c050a"}
https://www.clojure.org/news/2018/01/05/git-deps -- :sha
(now :git/sha
) used to be the full SHA until :git/tag
was added.
See https://clojure.org/reference/deps_and_cli#_git for current docs/deets.
OMG, @U04V70XH6 — thanks for your help, but I didn’t intend to make my problems yours!!! 😱😱😂😂 sorry to intrude upon your day!!!
LOL! Happy to help!
You are amazing. Will report back in next day! (Amazing how motivated I am — i made sure test runner was running before I got onto plane!! 😂
Safe travels! Hope you're going somewhere fun?
Was in Las Vegas last week, did three DevOps Enterprise Summit — with amazing help of tools created from @U07FP7QJ0 and team!!
@U04V70XH6 Thank you — it worked, as per your instructions here: https://clojurians.slack.com/archives/C08LK2DH7/p1666634022257409?thread_ts=1666630065.392139&cid=C08LK2DH7
Just curious: do you think it’s worth suggesting changing the docs to recommend using :git/sha
, or caveat on using :git/tag
? Not sure how to log this somewhere, so the next person will know how to solve this problem…
Thx again!! (And I’m also watching the LA Clojure Meetup meetup with you and Nate, describing Polylith. I’m 25% thru, and it’s great!!!)
If you use :git/tag
and :git/sha
together, you get verification that the tag and the commit actually match and it's much easier to see which version you're using (via the tag) and you only have to use the short (7-character) SHA. If you use :git/sha
on its own, you have to use the full SHA and it's kind of meaningless in your deps.edn
file.
So I use tag+sha when I'm depending on an officially released version and the full SHA when I'm depending on a fork or pull request (or a gist! did you know you can depend on a gist?? 🙂 )
See https://gist.github.com/seancorfield/6e8dd10799e9cc7527da5510c739e52f for an example of a Clojure-library-as-a-Gist!
Re: LA Meetup -- you'll get to see some World Singles code and our repo structure (and my VS Code setup). But it was recorded ages ago and we're up to 108 components
now 🙂
HOLY COW!! What incredible timing! There’s now three or so .clj files I’ve been thinking of splitting out into a library, and just today, I was pondering whether I could just put it into a gist. I kid you not. Thanks again! (One is a bunch of JS code that I use over and over again in front end, and one is all the time related calls I use, converting possible time format to inst and back again.) Looking forward to buying you drinks sometime, Sean!!
Super looking forward to watching the rest of the video. Polylith is fascinating. I’ll move this conversation to the right channel. 🙂
Will you be at Conj in April?