Get the latest tech news

Why use a monorepo build tool?


Use a Monorepo Build Tool? Li Haoyi, 17 December 2024 Software build tools mostly fall into two categories: One question that comes up constantly is why do people use Monorepo build tools? Tools like Bazel are orders of magnitude more complicated and hard to use than tools like Poetry or Cargo, so why do people use them at all? Are they stupid? It turns out that Monorepo build tools like Bazel or Mill do a lot of non-obvious things that other build tools don’t, that become important in larger codebases (100-10,000 active developers). These features are generally irrelevant for smaller projects, which explains why most people do not miss them.

This helps ensure your custom tasks are written in concise type-checked code with automatic caching and parallelism, which are all things that are lacking if you start implementing your logic outside of your build tool in ad-hoc scripts. But a large codebase may have multiple RPC IDL code generators (e.g. protobuf, thrift, static resource pre-processors, and other custom tasks that not caching and parallelizing these causes visible slowdowns and inconvenience. Resource sandboxing: Bazel also has the ability to limit CPU/Memory usage ( https://github.com/bazelbuild/bazel/pull/21322), which eliminates the noisy neighbour problem and ensures a build step or test gets the same compute footprint whether run alone during development or 96x parallel on a CI worker.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of monorepo build tool

monorepo build tool