Fork me on GitHub
#tools-deps
<
2022-11-17
>
cjohansen07:11:38

What’s the reason paths can refer to paths above the current directory (“../“) but extra-paths can’t?

borkdude12:11:18

Paths outside the current directory are not support (anymore) @christian767

cjohansen12:11:59

Hmm, ok, that’s a shame. It works in the version I’m on now 😅 What’s the reason for dropping the support?

mpenet12:11:05

wait what? you mean for local/root for instance?

mpenet12:11:25

oh paths/extra-paths

Alex Miller (Clojure team)13:11:42

It doesn’t make sense and security implications if you are outside if your directory (someone using this project as a git dep could be referencing arbitrary parts of your file system). If you are in a sub dir of a git dep, you can refer relatively via a local dep

cjohansen13:11:49

aha, sounds like I want the latter then 👍

p-himik15:11:10

Is there the right way to solve this without creating a separate repo/branch for the tool? https://github.com/liquidz/antq/issues/108

Alex Miller (Clojure team)15:11:44

At the moment, you would need some kind of wrapper for the tool. You could either put that in a separate repo or put it in a subdir and use a git dep with a deps root and a local dep back to the root. I think that should work

Alex Miller (Clojure team)15:11:52

But I can think about it some more

p-himik15:11:20

> put it in a subdir and use a git dep with a deps root and a local dep back to the root Maybe I'm misunderstanding, but doesn't it require being able to use a Git dep that's in a subdir? Is it even possible? So e.g. suppose we have

antq
- tool
  - deps.edn
- deps.edn
with tool/deps.edn being
{:deps {org.slf4j/slf4j-nop     {:mvn/version "RELEASE"}
        com.github.liquidz/antq {:local/root  ".."}}}
How would one install antq using tool/deps.edn instead of deps.edn?

Alex Miller (Clojure team)15:11:09

You can add :deps/root to point to a subdir of a git dep

p-himik16:11:57

Ah, nice, thanks!

seancorfield16:11:09

FWIW, that's typically how Polylith-based libraries and tools are made available (with :deps/root).