This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-25
Channels
- # announcements (4)
- # asami (26)
- # babashka (82)
- # beginners (27)
- # biff (6)
- # boot (1)
- # calva (42)
- # cider (2)
- # clj-commons (1)
- # clj-http-lite (2)
- # clj-kondo (37)
- # cljdoc (1)
- # clojure (46)
- # clojure-europe (34)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (2)
- # clojurescript (54)
- # code-reviews (18)
- # cursive (2)
- # datalevin (32)
- # datomic (7)
- # etaoin (1)
- # fulcro (9)
- # gratitude (3)
- # hyperfiddle (15)
- # introduce-yourself (1)
- # jobs (2)
- # lsp (32)
- # nrepl (1)
- # off-topic (18)
- # pathom (17)
- # pedestal (5)
- # polylith (89)
- # reitit (7)
- # releases (3)
- # remote-jobs (4)
- # shadow-cljs (52)
- # spacemacs (3)
- # squint (14)
- # tools-build (10)
- # tools-deps (18)
- # vim (4)
- # xtdb (34)
i. I have a tools.deps project
ii. that has a git dependency.
iii. tools.deps has previously downloaded the dependency foo/bar
.
iv. And it’s in my local /Users/foo/.gitlibs/_repos/ssh/foo.github.com/foo/bar
But trying to run a repl now, gives me the error. What am I missing?
Error building classpath. Unable to fetch /Users/foo/.gitlibs/_repos/ssh/foo.github.com/foo/bar
ssh: Could not resolve hostname : nodename nor servname provided, or not known
fatal: Could not read from remote repository.
I was previously able to run the same command, without access to that domain name.
What’s strange is that the message says... Unable to fetch /Users/foo/.gitlibs/_repos/ssh/foo.github.com/foo/bar
.
But that directory is there.
Looking at the source file... https://github.com/clojure/tools.gitlibs/blob/master/src/main/clojure/clojure/tools/gitlibs/impl.clj#L91-L92
it is shelling out to git --git-dir...
What stumps me is, if it worked previously (fetch from local git repo), what could cause it to break :thinking_face:
are you saying you never had access to http://foo.github.com or whatever the real domain name is?
tools.deps works by building a cache of deps -> classpath, which means the first time you run clj
it launches a java process that does a lot of stuff, then it figures out a classpath, and stores that in a file named by a hash of the deps.edn file (plus some other stuff)
then on subsequent runs of clj
if your deps.edn hasn't changed, it only launches your java process with your classpath
if you had access to http://foo.github.com sometime in the past, got on the code, then lost access, but nothing invalidated the cache, then you would never know
Ok then I’ll ask the question in a different way.
• Can tools.deps
download git deps in machine1:~/.gitlibs
• Then can I directly rsync that to machine2:~/.gitlibs
?
@U0NCTKEV8 From your breakdown, ~/.gitlibs
only works on the machine it was downloaded on.
Hmm… :thinking_face: So bottom line, ~/.gitlibs
is not portable in the way ~/.m2/repository
is.
(it might unconditionally fetch even if you aren't using tags if it gets to that point, I forget)
Do you know of any tools that can give me that portability? From the advertisement, git --git-dir...
should point to a local directory.
https://clojure.atlassian.net/browse/TDEPS-223 is maybe this, or at least related to it