Fork me on GitHub
#tools-deps
<
2022-09-29
>
Adam Helins16:09:34

@alexmiller Okay, I finally understood what you meant by problems arising from git deps having the same local transitive deps. It wasn't so obvious at first. Turns ou you had the exact same discussion with @seancorfield before: https://clojurians.slack.com/archives/C6QH853H8/p1628884285236600 Did someone find a working alternative? 🙏

Alex Miller (Clojure team)16:09:21

I have not worked on it so nothing has changed since then

Adam Helins17:09:06

I've spent countless hours on related topics and tooling and I'm convinced this would really help in improving the ecosystem (for reasons I can happily discuss) 🙂 For the time being, I think I have worked out a hack. I'd be grateful if you could indicate me if this can work indeed or if I got somehow lucky trying. Instead of using :local/root , use :git/sha for transitive local dependencies with the actual production :git/url. Please don't think about development for now, I have a solution. Just about how those deps are consumed externally. When the monorepo is stable, point them all to the same SHA. Commit. New SHA is what user can use when importing one or several libs from the monorepo. Something like that will happen:

Checking out: https://... at e6fd4e17003af53e434e9d684d0b833af7aad2aa
Checking out: https://... at e6fd4e17003af53e434e9d684d0b833af7aad2aa
Checking out: https://... at e6fd4e17003af53e434e9d684d0b833af7aad2aa
Checking out: https://... at 2504dbfd3fd3c2ad605cec3fcc66ce093d57aaef
(Former identical SHAs are what those libs where using (transitively) ; latter one is what I used externally to get them) Does it always work?

Adam Helins18:09:38

Awesome, I think I got it fully working simply because such git deps can compare (always?) Thanks very much for the work you've put into git deps

Alex Miller (Clojure team)18:09:52

yep, git repos compare and prefer "most descendant" commit

💯 1