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

0 votes
in tools.gitlibs by
closed by

Type: Enhancement
Summary: Expand tools.gitlibs support for local Git URLs
Description:
When specifying a local file-based URL for a Git repo containing a dependency, I encounter the following error when using an absolute URL:

`

java.lang.IllegalArgumentException: /path/to/my/repo is not a relative path

    at clojure.java.io$as_relative_path.invokeStatic(io.clj:414)
    at clojure.java.io$file.invokeStatic(io.clj:426)
    at clojure.java.io$file.invoke(io.clj:418)
    at clojure.lang.ArraySeq.reduce(ArraySeq.java:111)
    at clojure.core$reduce.invokeStatic(core.clj:6829)
    at clojure.java.io$file.invokeStatic(io.clj:418)
    at clojure.tools.gitlibs.impl$git_dir.invokeStatic(impl.clj:59)
    at clojure.tools.gitlibs.impl$ensure_git_dir.invokeStatic(impl.clj:80)
    at clojure.tools.gitlibs$procure.invokeStatic(gitlibs.clj:61)
    at clojure.tools.deps.alpha.extensions.git$fn__1317.invokeStatic(git.clj:98)
    at clojure.tools.deps.alpha.extensions.git$fn__1317.invoke(git.clj:96)
    at clojure.lang.MultiFn.invoke(MultiFn.java:239)
    at clojure.tools.deps.alpha$expand_deps.invokeStatic(alpha.clj:425)
    at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:495)
    at clojure.tools.deps.alpha$calc_basis.invokeStatic(alpha.clj:738)
    ...

`

The requirement of relative URLs makes specifying dependencies more difficult in certain contexts - the specific motivating use case for me is a WSL environment where the Clojure process is running in Ubuntu/WSL but the source code is in the Windows filesystem.

Alex Miller mentioned on the Clojurians Slack when I mentioned this problem that "that's really a subset of the problem - the code that translates git urls to cache dirs and libs doesn't handle either raw paths or relative urls."

closed with the note: Fixed in Clojure CLI 1.10.3.1029

1 Answer

0 votes
by
...