Fork me on GitHub
#tools-deps
<
2023-04-28
>
imre20:04:00

Should the following work?

{:deps {my.monorepo/foo {:local/root "../monorepo" :deps/root "subprojects/foo"}}}
It doesn't look like it does but reading https://clojure.org/reference/deps_and_cli I'm not sure whether it should.

imre21:04:05

And by work, I mean the deps.edn that my.monorepo/foo is going to point to will be at "../monorepo/subprojects/foo/deps.edn"

seancorfield05:04:20

Does it work? What in the documentation makes you think it shouldn't work?

seancorfield05:04:02

I've never used :deps/root with :local/root, only with git deps so those are honest questions.

imre14:04:54

It doesn't look like it does. I'm mucking about with a project referencing libs from a monorepo and temporarily changed the references in the project to a local copy of the monorepo and hoped it would work.

imre14:04:40

From the doc: Common coordinate attributes (all optional): ... :deps/root - relative directory path within a file based dep to search for the manifest file

imre14:04:09

And: Local project attributes: :local/root (required) - directory path (will auto detect whether a deps or pom project, also see :deps/manifest)

imre14:04:07

Reading the above, local/root can qualify as a file based dep, which to me implies that deps/root should work as it isn't stated otherwise

imre14:04:45

But it's quite possible that I'm missing something

imre14:04:44

Thanks for the Qs, Sean, I was watching the conj as I wrote this yesterday and couldn't fully concentrate 😅

seancorfield14:04:40

Ah, yes... now I think about this, I've run into the same thing when I've been working with Polylith locally, and my test runner. :local/root is the full path to the folder containing deps.edn and tools.deps ignores :deps/root in that case.

seancorfield15:04:23

Might be worth posting something on Ask about it -- it would make life easier, switching between local and git deps when developing a library or tool.

imre15:04:40

Yeah that's what I was thinking

imre15:04:47

But wanted to check here first

imre15:04:55

Perhaps it's intended

imre15:04:06

But I'll open an ask later