Fork me on GitHub

I should have known better

Alex Miller (Clojure team)00:12:02

Error could be more informative for sure

seancorfield00:12:52 updated now that 1.10 has dropped:

(! 528)-> clj -A:master
Clojure 1.11.0-master-SNAPSHOT


Does :deps/root work for both local and git deps?


It appears it doesn't.


Which doesn't it work for? It doesn't make sense for local dependencies really.

Alex Miller (Clojure team)21:12:19

should work for both

👍 4
Alex Miller (Clojure team)21:12:45

in the case of a local dep it’s a directory relative to :local/root


It doesn't appear to work for local/root. I get the following message:

Error resolving /home/kenny/compute_software/app-ions: Manifest type not detected when finding deps for compute/alerts-api in coordinate {:local/root "../alerts", :deps/root "api", :sha "ca8f741dd264fa13a900cb1d283e32a21f4c21c8"}


If I change :local/root to ../alerts/api it works as expected.

Alex Miller (Clojure team)22:12:36

the message is saying that it’s looking for a manifest file (deps.edn or pom.xml) at the specified location and not finding one


Which location is it looking in? Does it consider deps/root when searching?

Alex Miller (Clojure team)22:12:59

it’s looking at <:local/root>/<:deps/root>

Alex Miller (Clojure team)22:12:28

so it should be looking for ../alerts/api/deps.edn here


That wouldn't explain it working with local/root alone?

Alex Miller (Clojure team)22:12:00

well, the question is where .. is relative to

Alex Miller (Clojure team)22:12:19

currently, it’s always relative to the current directory of wherever you are running

Alex Miller (Clojure team)22:12:41

not the relative directory of whatever is depending on it

Alex Miller (Clojure team)22:12:58

this is a known issue with local roots and relative dirs

Alex Miller (Clojure team)22:12:58

I feel like I’m missing important parts of the problem description here so just kind of guessing


Oh, right - that's gotta be it. This message is coming from a Cursive project. It's gotta be running it in the root directory instead of sub-directory where the project's deps.edn is located.


Actually that's not correct.


clj -A:dev -Spath
Error building classpath. Manifest type not detected when finding deps for compute/alerts-api in coordinate {:local/root "../alerts", :deps/root "api", :sha "ca8f741dd264fa13a900cb1d283e32a21f4c21c8"}


> so it should be looking for ../alerts/api/deps.edn here And that file exists:

ls ../alerts/api/deps.edn


I am not sure, but I suspect that coordinate results in it looking for /home/kenny/compute_software/app-ions/api/../alerts/


no I am not right, just confused


unless I am confused again would need to include :deps/root in path (instead of the empty string) in order to detect the deps.edn in :deps/root

Alex Miller (Clojure team)22:12:50

you’re not using that function


oh, yep, further confusion, that looks like it does that kind of resolution, but then doesn't appear to actually be called anywhere in tools.deps

Alex Miller (Clojure team)23:12:17

but I will actually go back and say it’s not combining the two paths - it’s really just using :local/root

Alex Miller (Clojure team)23:12:26

I was misremembering the code that’s in the git extension