Fork me on GitHub
#testing
<
2022-10-24
>
genekim16:10:45

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!

seancorfield17:10:23

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)

genekim17:10:44

Thank you, @U04V70XH6 — I would love to know how to do this. @U064X3EF3, is such a thing possible? Thank you!! (And sorry to bug!!)

genekim17:10:10

I’ll ask in the #clojure channel, since he’s not in here. (Is that right channel?)

seancorfield17:10:28

Look at the repo on GH for the tag/sha and click on the sha to see the full SHA in the URL...

seancorfield17:10:38

Then remove :git/tag and update :git/sha with the full SHA.

seancorfield17:10:05

I'm not saying that will prevent the online check, but I think it might...

genekim17:10:37

“: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!

seancorfield17:10:42

So you'll go from {:git/tag "v0.5.0" :git/sha "48c3c67"} (what you showed) to {:git/sha "48c3c67f98362ba1e20526db4eeb6996209c050a"}

seancorfield17:10:47

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.

genekim17:10:51

OMG, @U04V70XH6 — thanks for your help, but I didn’t intend to make my problems yours!!! 😱😱😂😂 sorry to intrude upon your day!!!

seancorfield17:10:13

LOL! Happy to help!

genekim17:10:00

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!! 😂

seancorfield17:10:43

Safe travels! Hope you're going somewhere fun?

genekim17:10:09

Was in Las Vegas last week, did three DevOps Enterprise Summit — with amazing help of tools created from @U07FP7QJ0 and team!!

genekim17:10:29

No more planes for a couple of weeks, if all goes well!!!

1
🙏 1
genekim03:10:27

@U04V70XH6 Thank you — it worked, as per your instructions here: https://clojurians.slack.com/archives/C08LK2DH7/p1666634022257409?thread_ts=1666630065.392139&amp;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!!!)

seancorfield04:10:14

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.

seancorfield04:10:08

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?? 🙂 )

seancorfield04:10:04

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 🙂

genekim04:10:56

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!!

genekim04:10:22

Super looking forward to watching the rest of the video. Polylith is fascinating. I’ll move this conversation to the right channel. 🙂

seancorfield04:10:41

Will you be at Conj in April?

genekim15:10:42

80% probable yes — it’s close to manuscript deadline, so thus the 20% risk of not being able to attend. Very much looking forward to meeting you, if not there, sometime soon!