|
|
|
|
|
by kazlock
2490 days ago
|
|
> two modules will tend to grow ever more dependent on each other unless separated by hard ('physical') boundaries This is especially true in monorepos. Code resuse has it's benefits, but left unchecked the dependency graph can turn into a huge highly-connected glob. Modules end up accidentally importing code they have no business importing because of sneaky transitive dependencies. The blast radius of even small simple changes becomes enormous, and testing/debugging becomes more and more complex. A great way to keep this in check is to have apply code isolation in the test environment. When you checkout the entire repo for a build or test, its easy for these kinds of dependencies to grow unnoticed. But if you require build/test targets to explicitly declare what code they depend on (and only make that code present when running them), changes to the dependency structure must be explicitly acknowledged in code review. This is one of the core principles behind build tools like Bazel. |
|
Not in my monorepo.
I have compile time boundaries between modules and I cannot make them particularly entangled with each other.
Maybe the problem you have in mind, is more likely to happen in dynamically typed languages? Where there's no compiler who can say "No."