Fork me on GitHub
#tools-deps
<
2023-02-11
>
Jeff Evans20:02:54

Has anyone had the problem that trying to resolve a git coordinate project just seems to hang forever? This is both in Cursive (my current IDE, deps aware) and on the command line via clj

Jeff Evans20:02:16

Update: it turned out that it didn't like the :git/tag for some reason. I removed that and put the full value in :git/sha

Jeff Evans20:02:08

And that worked. Maybe there was something weird in this GitHub repo? confluentinc/kafka-streams-examples

Alex Miller (Clojure team)20:02:34

Tags are only used to validate the sha

Alex Miller (Clojure team)20:02:55

So if you had just the tag, that’s not allowed

Jeff Evans20:02:36

Sorry, to clarify, I had both a tag and short sha

Alex Miller (Clojure team)20:02:05

If you had the repro coords, happy to take a look

Jeff Evans20:02:47

This hangs clojure -Sdeps ‘{:deps {io.github.confluentinc/kafka-streams-examples {:git/tag “v7.1.6-18” :git/sha “d1311bc”}}}’ This works clojure -Sdeps ‘{:deps {io.github.confluentinc/kafka-streams-examples {:git/sha “a3a1b4a528fb205ec86d2bf309431d45fb6d3e9d”}}}’

Alex Miller (Clojure team)20:02:26

You can export GITLIBS_DEBUG=true to see the git commands being run

Jeff Evans20:02:08

Ah it's stuck on the tag --sort=v:refname for whatever reason

Jeff Evans20:02:03

Or after it anyway

Alex Miller (Clojure team)20:02:15

The GitHub page for that repo / tag https://github.com/confluentinc/kafka-streams-examples/tree/v7.1.6-18 says that commit is not in that repo

😮 2
Alex Miller (Clojure team)20:02:38

That can happen with a fork

Alex Miller (Clojure team)20:02:29

There are a very large number of tags in that repo, might actually be taking a very long time

Jeff Evans20:02:35

I tried running the command it printed on my local terminal and it finished instantly

Alex Miller (Clojure team)20:02:06

Well that’s weird then

Alex Miller (Clojure team)20:02:17

When I get a chance I will look at it

Jeff Evans20:02:31

Not urgent, I can work around, but I appreciate it

Jeff Evans20:02:54

By the way, do you happen to know if test code should be available when using the git resolution?

Jeff Evans20:02:02

Or is it only main?

Alex Miller (Clojure team)21:02:33

One thing I’m considering is whether to allow git deps to publish aliases for use externally which would allow this

Jeff Evans21:02:44

How does that work for a Maven project that's just hanging out on GitHub? I think I'm not quite understanding how :paths factors in there

Alex Miller (Clojure team)04:02:02

@U0183EZCD0D this is a bug in capturing large output from the git process. I've pushed a fix, will be in the next build of the CLI. Thanks!

👍 2