In articles and discussions about monorepos, there's one frequently alleged key benefit: atomic commits across the whole tree let you make changes to both a library's implementation and the clients in a single commit. Many authors even go as far to claim that this is the only benefit of monorepos.
I like monorepos, but that particular claim makes no sense! It's not how you'd actually make backwards incompatible changes, such as interface refactorings, in a large monorepo. Instead the process would be highly incremental, and more like the following:
- Push one commit to change the library, such that it supports both the old and new behavior with different interfaces.
- Once you're sure the commit from stage 1 won't be reverted, push N commits to switch each of the N clients to use the new interface.
- Once you're sure the commits from stage 2 won't be reverted, push one commit to remove the old implementation and interface from the library.
... Continue reading ...