|
|
|
|
|
by jitl
875 days ago
|
|
Submodule workflows have a lot of overhead at review time. During development it's fine, you work with the fully materialized tree just like it's a monorepo. But once you need to submit your changes for review, how does that workflow look? 1. Commit in submodule A, then get it reviewed and merged as SHA 123 2. Update submodule A to 123, get it reviewed 3. Reviewer has feedback on usage of new API in submodule A 4. Make another PR on A, at commit 457. This time don't merge it since reviewer on main repo might have more feedback. Monorepo: 1. Make PR to monorepo 2. Get review feedback 3. Push changes to PR branch 4. Merge 5. Update submodule to 456, push to existing PR ...?? |
|
1. Post PR to submoduke A. Get it merged.
2. Post PR to the main repo updating it to point to subproject A.
Done.
The only difference between a monorepo and splitting the repo into submodules is that the main repo's history is coarser and basically tracks the output of integration tests. There is no need to overcomplicate things, and if you need to overthink them anyway then you have far more degrees of freedom to worry about in monorepos.