Fork me on GitHub
#tools-deps
<
2018-12-18
>
aaelony00:12:14

I should have known better

Alex Miller (Clojure team)00:12:02

Error could be more informative for sure

seancorfield00:12:52

https://github.com/seancorfield/dot-clojure updated now that 1.10 has dropped:

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

kenny20:12:34

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

kenny20:12:30

It appears it doesn't.

dominicm21:12:51

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

kenny21:12:32

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"}

kenny21:12:13

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

dominicm22:12:29

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

dominicm22:12:31

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

kenny22:12:16

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.

kenny22:12:04

Actually that's not correct.

pwd
/home/kenny/compute_software/app-ions

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"}

kenny22:12:00

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

ls ../alerts/api/deps.edn
../alerts/api/deps.edn

hiredman22:12:33

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

hiredman22:12:05

no I am not right, just confused

hiredman22:12:46

unless I am confused again https://github.com/clojure/tools.deps.alpha/blob/master/src/main/clojure/clojure/tools/deps/alpha/extensions/local.clj#L27-L31 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

hiredman23:12:34

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