Fork me on GitHub
#polylith
<
2023-05-17
>
imre17:05:45

I'd appreciate a few upvotes on https://ask.clojure.org/index.php/12913/using-deps-root-with-local-root This should make it easier to work with libraries being referenced from monorepos like a poly workspace

seancorfield17:05:03

I +1'd it as soon as you wrote it 🙂

imre17:05:27

Thanks Sean, I had a feeling it was you 😁

imre17:05:15

I am hoping that adopting this style within monorepos would also help with the dep comparison problem

imre17:05:38

When depending on multiple libs from a monorepo

2
pavlosmelissinos17:05:47

I've upvoted because it sounds like a good idea but I also feel there's some context here that I'm missing 🙂 > As tools.deps currently appears to ignore :deps/root for :local/root dependencies, developers currently have to combine the two into :local/root Why is this a bad thing? It doesn't seem very inconvenient since you're going to write the local/root path anyway, adding a couple of directory levels doesn't seem too bad It does kinda mix up semantics: local/root should be pointing to the "repo" and deps/root should point to a relative path into a repo.

imre17:05:44

> Why is this a bad thing? I've 2 reasons: 1. when switching back and forth between git and local dep, you need to do extra work, cannot just "replace all git urls pointing to this repo with this local root value" 2. it might be contributing to https://clojure.atlassian.net/browse/TDEPS-132 2 is in relation to what you're pointing out: local/root identifies a "repo" and if monorepo-internal references use different local/roots, they are pointing to "different repos" between which comparisons might be meaningless. On the other hand if all of those just referenced their common root plus a deps/root (which in my reading identifies the location of the root deps.edn of the lib being referenced) then tools.deps could correctly identify those as being "the same repo"

👍 2
seancorfield17:05:14

I've tripped over #1 repeatedly while debugging Polylith stuff and my own test runner, and switching back and forth between git deps and local deps has a friction because of this.

👍 2
pavlosmelissinos17:05:44

I see, thanks for explaining! 🙂

seancorfield21:05:36

The upvotes need to be over on Ask, not here 🙂

seancorfield21:05:56

(just in case there's any confusion)

Eugen21:05:46

I did vote on Ask + shared the link in our team

2