Large Builds and Monorepos

This section walks through Mill features and techniques used for managing large builds. While Mill works great for small single-module projects, it is also able to work effectively with large projects with hundreds of modules. Mill’s own build for the com-lihaoyi/mill project has ~400 modules, and other proprietary projects may have many more.

Mill modules are cheap. Having more modules does not significantly impact performance or resource usage, build files are incrementally re-compiled when modified, and modules are lazily loaded and initialized only when needed. So you are encouraged to break up your project into modules to manage the layering of your codebase or benefit from parallelism.

Apart from Mill’s basic scalability and performance, Mill also comes with many features that can be utilized to help you manage the build system of a large project or codebase: