Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.deps by

Similar to this question https://ask.clojure.org/index.php/7848/transitive-paths-current-project-unspecified-transitive

I am not sure how to reliably reproduce this, but I had a problem with dependencies not being picked up from a :local/root dependency, and my colleague found the linked question, and it helped me find a workaround.

In my case my full deps in the dependency project was:

{:paths ["src"]}

Changing it to:

{:paths ["src"]
 :deps {}}

made things work.

I do have another project with the same dependency, and it was happy with the no-deps version.

This was in a dependency of a dependency. So I have both these cases:

  • Not working: project-a -> -dependency-1 -> dependency-2-path-only
  • Working: project-b -> -dependency-1 -> dependency-2-path-only

(”Not working/Working” as in dependency-2-path-only not being on the classpath of project-a, but on the classpath of project-b.)

Further... dependency-1 is in a sub directory of dependency-2-path-only. So in dependency-2-path-only/dependency-1/deps.edn:

{:paths ["src"]
 :deps {d2/dependency-2-path-only {:local/root ".."}}}

I realize now, after having described all this that I could have made a repro instead. Let me know if that is needed.

I'm currently on 1.10.3.967, btw.

1 Answer

+2 votes
by
selected by
 
Best answer

One thing that trips people up sometimes is that the Clojure CLI does not automatically pick up changes in local deps - you need to use clj -Sforce to force the local dep classpath to be refreshed. So if any of the above involved changing the deps.edn of your local deps, that's a necessary step. I would appreciate having the repro if you're using -Sforce and still seeing the issue.

by
Thanks! I can't reproduce it when having forced the classpath refresh.
...