This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-21
Channels
- # announcements (10)
- # aws (10)
- # babashka (23)
- # beginners (111)
- # biff (8)
- # calva (25)
- # clj-kondo (9)
- # cljsrn (4)
- # clojure (72)
- # clojure-belgium (6)
- # clojure-europe (50)
- # clojure-germany (2)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-uk (1)
- # datahike (3)
- # emacs (10)
- # graalvm (19)
- # graphql (3)
- # juxt (7)
- # kaocha (9)
- # malli (23)
- # nbb (20)
- # pathom (17)
- # pedestal (6)
- # polylith (11)
- # portal (8)
- # remote-jobs (3)
- # shadow-cljs (18)
- # sql (3)
- # tools-deps (20)
I have a project that has a dependency on a git lib with a deps/root. That deps/root project has a local/root dependency on another project in that git repo. That should work right?
But it doesn't unless I'm doing something wrong here:
clj -Sdeps '{:deps {io.github.squint-cljs/cherry {:git/sha "0d7ef527ea983cbe4a0f8ee95e388e78d80d14f4"}}}'
"doesn't work" == ??
io.github.squint-cljs/compiler-common has two libs in the tree, one as a local coord, one as a git coord - version selection doesn't know how to compare those
yes, the local is actually in the context of a git coord, but you've lost that context
we have a ticket for this general problem at https://clojure.atlassian.net/browse/TDEPS-132
@alexmiller
I see the problem, I shouldn't have used the compiler-common
name twice. So the top level dep is a deps/root in the git repo which then requires the other project via local/root via a different name. I think that ought to work.
{:paths ["src" "resources"]
:deps {io.github.squint-cljs/compiler-common-cherry
{:git/sha "45a6d93d20869183d922041f109124f5625cad39"
:deps/root "cherry"}}}
I pushed that to
under :git/sha "2f323066cbc74147991c2f33148075af83088057"
But I'm now getting:
$ clj -Sdeps '{:deps {io.github.squint-cljs/cherry {:git/sha "2f323066cbc74147991c2f33148075af83088057"}}}'
Cloning:
Error building classpath. Unable to clone /Users/borkdude/.gitlibs/_repos/https/github.com/squint-cljs/compiler-common-cherry
fatal: could not read Username for '': terminal prompts disabled
Looks like you're referring to a private repo there
i.e. https://github.com/squint-cljs/compiler-common-cherry is not publicly readable
it works now:
$ clj -Sdeps '{:deps {io.github.squint-cljs/cherry {:git/sha "14e0a95e0c01129f3967b9419fd4799376e23d09"}}}'
Checking out: at 14e0a95e0c01129f3967b9419fd4799376e23d09
Checking out: at 45a6d93d20869183d922041f109124f5625cad39
Clojure 1.11.0
user=> (require '[cherry.compiler :as cherry])
private repos are fine of course (but you have to auth). useful things to know: • set GITLIBS_DEBUG=true to see git commands being executed • set GITLIBS_TERMINAL=true to get terminal prompts
This isn't private, I just forgot to add the git/url, I only changed the io.github.* name to avoid the conflict but of course that wasn't sufficient since it's also used to derive the git/url
so it actually works like expected now, I just shouldn't have used the same libname for different purposes
I don't love it, but should work
what I (kind of non-seriously) proposed was that $cherry
should be ignored for derivation of git/url but would still count as a different lib (cause different name)
it works now:
$ clj -Sdeps '{:deps {io.github.squint-cljs/cherry {:git/sha "14e0a95e0c01129f3967b9419fd4799376e23d09"}}}'
Checking out: at 14e0a95e0c01129f3967b9419fd4799376e23d09
Checking out: at 45a6d93d20869183d922041f109124f5625cad39
Clojure 1.11.0
user=> (require '[cherry.compiler :as cherry])