LaForge: Always-Correct and Fast Incremental Builds from Simple Specifications

08/27/2021
by   Charlie Curtsinger, et al.
0

Developers rely on build systems to generate software from code. At a minimum, a build system should produce build targets from a clean copy of the code. However, developers rarely work from clean checkouts. Instead, they rebuild software repeatedly, sometimes hundreds of times a day. To keep rebuilds fast, build systems run incrementally, executing commands only when built state cannot be reused. Existing tools like make present users with a tradeoff. Simple build specifications are easy to write, but limit incremental work. More complex build specifications produce faster incremental builds, but writing them is labor-intensive and error-prone. This work shows that no such tradeoff is necessary; build specifications can be both simple and fast. We introduce LaForge, a novel build tool that eliminates the need to specify dependencies or incremental build steps. LaForge builds are easy to specify; developers write a simple script that runs a full build. Even a single command like gcc src/*.c will suffice. LaForge traces the execution of the build and generates a transcript in the TraceIR language. On later builds, LaForge evaluates the TraceIR transcript to detect changes and perform an efficient incremental rebuild that automatically captures all build dependencies. We evaluate LaForge by building 14 software packages, including LLVM and memcached. Our results show that LaForge automatically generates efficient builds from simple build specifications. Full builds with LaForge have a median overhead of 16.1 incremental builds consistently run fewer commands, and most take less than 3.08s longer than manually-specified incremental builds. Finally, LaForge is always correct.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/26/2020

Empirical Study of Restarted and Flaky Builds on Travis CI

Continuous Integration (CI) is a development practice where developers f...
research
05/14/2020

Identifying Bugs in Make and JVM-Oriented Builds

Incremental and parallel builds are crucial features of modern build sys...
research
02/18/2021

Smart Build Targets Batching Service at Google

Google has a monolithic codebase with tens of millions build targets. Ea...
research
02/10/2022

Forward Build Systems, Formally

Build systems are a fundamental part of software construction, but their...
research
07/24/2020

Build Scripts with Perfect Dependencies

Build scripts for most build systems describe the actions to run, and th...
research
01/22/2019

Towards Predicting the Impact of Software Changes on Building Activities

The pervasive adoption of Continuous Integration practices -- both in in...
research
12/19/2017

Built to Last or Built Too Fast? Evaluating Prediction Models for Build Times

Automated builds are integral to the Continuous Integration (CI) softwar...

Please sign up or login with your details

Forgot password? Click here to reset