tools-deps 2023-04-28

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.

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.

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

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

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

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

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

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.

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.

Yeah that's what I was thinking

But wanted to check here first

Perhaps it's intended

But I'll open an ask later

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"

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

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

Opened an ask at https://ask.clojure.org/index.php/12913/using-deps-root-with-local-root in case people want to check it out.

👍🏻 1