This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-08
Channels
- # announcements (42)
- # aws (2)
- # babashka (69)
- # beginners (38)
- # calva (18)
- # cider (39)
- # circleci (1)
- # clj-commons (10)
- # cljs-dev (2)
- # clojure (36)
- # clojure-australia (14)
- # clojure-europe (25)
- # clojure-gamedev (40)
- # clojure-losangeles (4)
- # clojure-nl (5)
- # clojure-sweden (1)
- # clojure-uk (5)
- # clojurescript (133)
- # core-logic (24)
- # cursive (7)
- # datalevin (4)
- # datascript (3)
- # figwheel-main (1)
- # fulcro (45)
- # honeysql (1)
- # integrant (43)
- # introduce-yourself (1)
- # jobs (4)
- # leiningen (3)
- # lsp (32)
- # nextjournal (9)
- # pathom (18)
- # polylith (21)
- # portal (65)
- # re-frame (6)
- # releases (1)
- # remote-jobs (1)
- # reveal (12)
- # rewrite-clj (1)
- # sci (84)
- # tools-deps (22)
https://clojurians.slack.com/archives/C015AL9QYH1/p1636403633022600
^^ if you use git deps and like to test things, would be happy for a :thumbsup: if this new CLI prerelease 1.10.3.1029 works as expected
b/c gitlibs repo dir structure has changed, you should see this as if gitlibs cache is stale (so will see downloads of git repos etc)
I can confirm that it re-downloads my git deps.
Just out of interest, do the gitlibs changes change how checked out git coord directories are exposed up via a lib-map (e.g. returned from clojure.tools.deps.alpha/resolve-deps
)?
Background is that some of my code is pulling out the :deps/root
key from the lib-map for each dependency, then scanning that directory using standard file I/O. So if that directory itself is still just a vanilla checkout of the git repo my code will be fine (even if it’s now stored within a different parent hierarchy).
While testing this and updating some of my projects, I noticed that the short SHA in the README for the test-runner
seems to be incorrect:
io.github.cognitect-labs/test-runner
{:git/tag "v0.5.0" :git/sha "b3fd0d2"}
that's the sha of the tag I think, which points to the commit (this is an annotated tag)
either is ok as they both unpeel to the same commit
% clj -Sdeps '{:deps {io.github.cognitect-labs/test-runner {:git/sha "b3fd0d2" :git/tag "v0.5.0"}}}' -Stree
Cloning:
Checking out: at 48c3c67f98362ba1e20526db4eeb6996209c050a
...
io.github.cognitect-labs/test-runner 48c3c67
...
the way the validation works, it checks that both the sha prefix and the tag unpeel to the same full commit sha, which they do
Weird. Looking on the tags page of the repo, it shows this short SHA: {:git/tag "v0.5.0" :git/sha "48c3c67"}
which is what I've been using.
and that's not wrong
annotated tags are objects in the git store, just like commits and that tag object itself is b3fd0d2, which points to commit 48c3c67
lightweight tags are NOT objects in the git store and won't have their own sha
they are just name refs that refer to a commit
b/c of how I usually look up the sha, I'm probably usually getting the tag sha, rather than the commit sha, which admittedly might be confusing
usually I do git rev-parse --short v0.5.0
but I can probably do git rev-parse --short v0.5.0^{commit}
to get the commit tag instead and then it will match what people see on gh
(the latter is closer to what gitlibs is doing)