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

0 votes
in tools.deps.alpha by
When resolving a {{:git/url}} dependency with {{:deps/manifest :pom}} the resulting vector for {{:paths}} is a list where the first entry consists of the {{sourceDirectory}} of the pom of the dependency. This path is nonexistent since the {{sourceDirectory}} is (most likely) relative to the dependency but it is made absolute in the current directory which is in the dependent project.

An example usage of [{{coord-paths}}|https://github.com/clojure/tools.deps.alpha/blob/433965a532e9f2433edcb42d783d5e20f69cd01a/src/main/clojure/clojure/tools/deps/alpha/extensions/pom.clj#L99] to make it more clear:
user=>(coord-paths 'some/dependency
                       {:deps/root "/Users/user/.gitlibs/libs/some/dependency/hash" :deps/manifest :pom}
                       {:mvn/repos {"central" {:url "https://repo1.maven.org/maven2/"}
                                    "clojars" {:url "https://clojars.org/repo/"}}})


Here {{$\{project.basedir\}/src/main/java}} is the default value, when no {{sourceDirectory}} is specified in the pom.xml.
It is clear that that path, which finds it's way into the classpath, is not valid. If a (relative) path would be present in the pom.xml, the first entry of the list could be something like {{"/path/to/dependent/project/src/main/clojure"}} which might exist, but is not the path to the sources of the dependency.

Also note that the output of {{coord-paths}} is a seq and not a vector.

1 Answer

0 votes
Reference: https://clojure.atlassian.net/browse/TDEPS-96 (reported by alex+import)