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

0 votes
in tools.deps.alpha by
If you have a A/deps.edn with

{:paths ["src/main/clojure"]
 :deps {something/else {:local/root "/Wherever"}

Then in /Wherever/deps.edn:

{:deps {...}}  ;; no paths, just deps.

When you run clj -Spath within A, the dependency will accidentally pick up :paths from the A: /Wherever/src/main/clojure
whereas when you run clj -Spath from within the dependency, it will pick up paths from the system default deps.edn

Always specify :paths

4 Answers

0 votes

Comment made by: matthias.margush

Hi. I've uploaded a patch for discussion on this bug.

The approach proposed in the patch is:
- A default-paths configuration is added that will have a fallback value. Multiple definitions of default-paths are merged similarly to extra-paths.
- paths are no longer combined when resolving deps. Instead, the paths of a dep is used directly. If there is no path, then the merged default-paths is used.

This would be a breaking change if any configs out there were relying on the accumulative nature of the existing logic.

0 votes

Comment made by: matthias.margush

(I don't see a way to remove the first attachment I uploaded. The more recent one has a small tweak. Thanks.)

0 votes
_Comment made by: kommen_

Running into the same issue, easily reproducible:

This works:

clj -Srepro -Sdeps '{:deps {com.bhauman/figwheel-core {:git/url "https://github.com/mfikes/figwheel-core" :sha "f05c62bba743d16f1fc4d16814365db726dc97b7"}}}' -e "(require 'figwheel.core)"

This raises an {{java.io.FileNotFoundException: Could not locate figwheel/core__init.class, figwheel/core.clj or figwheel/core.cljc on classpath.}}:

clj -Srepro -Sdeps '{:paths ["foo/src"] :deps {com.bhauman/figwheel-core {:git/url "https://github.com/mfikes/figwheel-core" :sha "f05c62bba743d16f1fc4d16814365db726dc97b7"}}}' -e "(require 'figwheel.core)"

0 votes
Reference: https://clojure.atlassian.net/browse/TDEPS-52 (reported by gshayban)