Fast and correct builds are important for developer happiness and productivity and the build system plays a central role in achieving both. However, achieving fast Haskell builds can be challenging for large projects. Module dependency order, template Haskell, package boundaries, and other features of the language and toolchain need to be handled by the build system, and can pose obstacles to build performance, parallelism, and incrementality.
In this talk we will present how we build Haskell with Buck2, a modern open source build system developed by Meta, that can accelerate builds via distributed computing and use distributed caching to avoid redundant builds. We will compare Buck2 to other relevant build systems and highlight what sets it apart. And we will explain how we applied Buck2’s features and how we extended Buck2 and GHC to optimize for fast and incremental builds. In particular, we will cover dynamic dependencies, and how we achieve module granular incremental builds across package boundaries and take library linking actions off the critical path for module compilation.
Andreas is a physicist turned software engineer. He leads the Scalable Builds Group at Tweag by Modus Create, which contributes to Bazel, Buck2, and Pants, is Google’s first Bazel Community Expert, maintains Bazel extensions, and provides professional services. Andreas is passionate about functional programming, and hermetic and reproducible builds. He lives in Zurich and is active in the local Haskell community.
Sat 7 SepDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
11:00 - 12:30 | |||
11:00 22mTalk | [HIW] Analysing the heap of uninstrumented Haskell programs using ghc-debug Haskell Zubin Duggal Well-Typed LLP | ||
11:22 22mTalk | [HIW] A zero-copy interface to compact regions powered by destinations Haskell Thomas BAGREL Tweag, LORIA/INRIA | ||
11:45 22mTalk | [HIW] Building Haskell with Buck2 Haskell Andreas Herrmann Tweag by Modus Create | ||
12:07 22mTalk | [HIW] The JavaScript FFI feature in GHC Wasm backend Haskell Cheng Shao Modus Create |