tools-deps

imre 2023-04-28T20:12:00.554439Z

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.

imre 2023-04-29T14:13:54.933169Z

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.

imre 2023-04-29T14:14:40.332229Z

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

imre 2023-04-29T14:15:09.658089Z

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

imre 2023-04-29T14:16:07.692429Z

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

imre 2023-04-29T14:17:45.761689Z

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

imre 2023-04-29T14:18:44.110819Z

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

seancorfield 2023-04-29T14:59:40.572749Z

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.

seancorfield 2023-04-29T15:00:23.281719Z

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.

imre 2023-04-29T15:00:40.383959Z

Yeah that's what I was thinking

imre 2023-04-29T15:00:47.451029Z

But wanted to check here first

imre 2023-04-29T15:00:55.073219Z

Perhaps it's intended

imre 2023-04-29T15:01:06.858029Z

But I'll open an ask later

imre 2023-04-28T21:16:05.105439Z

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"

seancorfield 2023-04-29T05:06:20.800219Z

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

seancorfield 2023-04-29T05:08:02.893189Z

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

imre 2023-05-04T12:46:58.357989Z

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