3 ms·
> If have not seen a problem on monorepos that does not exist on multirepo How do you refer to a library in a monorepo from a different repo? The workflow see
by yokaze 6y ago
> If have not seen a problem on monorepos that does not exist on multirepo
How do you refer to a library in a monorepo from a different repo?
The workflow seems to me to entail an all-or-nothing approach.
- beagle3 6y agoI never tried it, but if I needed it, I would easier use sparse submodule checkout (if it’s possible - I don’t know if that’s true), or submodule the entire repo, and the symbolic link into the internal part I need. If all else fails (e.g. you need 50 files out of a 100GB repo, which makes things too slow), I would set up a git subtree extract as a checkin hook, which would mean there exists another repo/branch automatically updated on checkin - and which you could use any way you want, e.g, simple submodule. Do note that’s just what I said: the problem, “I only need a small part of the repo” is independent of it being a monorepo or multirepo. You would only avoid this problem in a multirepo if you cut it to pieces in exactly the right places. it’s just a matter of whether the parts of the repo you don’t need are too large to make this comfortable — more likely in a monorepo as it is larger - but will happen in a big enough multirepo as well.