4 ms·
I wonder: in what files were the monorepo merge conflicts happening? For any language with explicit imports the typical hotspots are the top parts of large, sh
by gorgoiler 4y ago
I wonder: in what files were the monorepo merge conflicts happening?
For any language with explicit imports the typical hotspots are the top parts of large, shared files. Git can resolve all the mid file edits but needs a diaper change when it encounters conflicts in the header.
For example: if two people edit stripe/utils/common.py to add def f(x) and def g(y) then you’re likely to encounter a merge conflict not in the function definitions, but in any new imports each function requires. The solution is to break this file up into many smaller modules.
The same goes for any overly large bazel dependency, or common go file, etc.
- mcqueenjordan 4y agoThe problem the author is describing is not really intrinsic to monorepos, and it’s probably a symptom of a specific problem that Stripe has in its implementation. As the saying goes, the only thing worse than a monorepo is two monorepos.