Table of Contents
Fetching ...

Detecting Build Dependency Errors in Incremental Builds

Jun Lyu, Shanshan Li, He Zhang, Yang Zhang, Guoping Rong, Manuel Rigger

TL;DR

The paper addresses the challenge of detecting build dependency errors, particularly MDs and RDs, during incremental development without costly clean builds. It introduces EChecker, which infers actual build dependencies from commit-driven changes to preprocessor directives and Makefile commands and augments this with incremental build traces to cover hidden dependencies. Empirical evaluation on 12 projects across 240 commits shows EChecker achieves higher precision, recall, and F1 than the state-of-the-art Buildfs, while delivering up to an ~85x speedup in detection time by avoiding repeated clean builds. The approach demonstrates practical value for continuous integration and large-scale C/C++ projects, with generality to other build systems via analogous monitoring and analysis. Overall, EChecker enables faster, more reliable detection of build dependency errors with minimal false positives, supporting developers in timely maintenance of build scripts.

Abstract

Incremental and parallel builds performed by build tools such as Make are the heart of modern C/C++ software projects. Their correct and efficient execution depends on build scripts. However, build scripts are prone to errors. The most prevalent errors are missing dependencies (MDs) and redundant dependencies (RDs). The state-of-the-art methods for detecting these errors rely on clean builds (i.e., full builds of a subset of software configurations in a clean environment), which is costly and takes up to multiple hours for large-scale projects. To address these challenges, we propose a novel approach called EChecker to detect build dependency errors in the context of incremental builds. The core idea of EChecker is to automatically update actual build dependencies by inferring them from C/C++ pre-processor directives and Makefile changes from new commits, which avoids clean builds when possible. EChecker achieves higher efficiency than the methods that rely on clean builds while maintaining effectiveness. We selected 12 representative projects, with their sizes ranging from small to large, with 240 commits (20 commits for each project), based on which we evaluated the effectiveness and efficiency of EChecker. We compared the evaluation results with a state-of-the-art build dependency error detection tool. The evaluation shows that the F-1 score of EChecker improved by 0.18 over the state-of-the-art method. EChecker increases the build dependency error detection efficiency by an average of 85.14 times (with the median at 16.30 times). The results demonstrate that EChecker can support practitioners in detecting build dependency errors efficiently.

Detecting Build Dependency Errors in Incremental Builds

TL;DR

The paper addresses the challenge of detecting build dependency errors, particularly MDs and RDs, during incremental development without costly clean builds. It introduces EChecker, which infers actual build dependencies from commit-driven changes to preprocessor directives and Makefile commands and augments this with incremental build traces to cover hidden dependencies. Empirical evaluation on 12 projects across 240 commits shows EChecker achieves higher precision, recall, and F1 than the state-of-the-art Buildfs, while delivering up to an ~85x speedup in detection time by avoiding repeated clean builds. The approach demonstrates practical value for continuous integration and large-scale C/C++ projects, with generality to other build systems via analogous monitoring and analysis. Overall, EChecker enables faster, more reliable detection of build dependency errors with minimal false positives, supporting developers in timely maintenance of build scripts.

Abstract

Incremental and parallel builds performed by build tools such as Make are the heart of modern C/C++ software projects. Their correct and efficient execution depends on build scripts. However, build scripts are prone to errors. The most prevalent errors are missing dependencies (MDs) and redundant dependencies (RDs). The state-of-the-art methods for detecting these errors rely on clean builds (i.e., full builds of a subset of software configurations in a clean environment), which is costly and takes up to multiple hours for large-scale projects. To address these challenges, we propose a novel approach called EChecker to detect build dependency errors in the context of incremental builds. The core idea of EChecker is to automatically update actual build dependencies by inferring them from C/C++ pre-processor directives and Makefile changes from new commits, which avoids clean builds when possible. EChecker achieves higher efficiency than the methods that rely on clean builds while maintaining effectiveness. We selected 12 representative projects, with their sizes ranging from small to large, with 240 commits (20 commits for each project), based on which we evaluated the effectiveness and efficiency of EChecker. We compared the evaluation results with a state-of-the-art build dependency error detection tool. The evaluation shows that the F-1 score of EChecker improved by 0.18 over the state-of-the-art method. EChecker increases the build dependency error detection efficiency by an average of 85.14 times (with the median at 16.30 times). The results demonstrate that EChecker can support practitioners in detecting build dependency errors efficiently.
Paper Structure (46 sections, 14 figures, 4 tables)

This paper contains 46 sections, 14 figures, 4 tables.

Figures (14)

  • Figure 1: Dependency errors form Clib Makefile
  • Figure 2: Tracing Build of the Example Projects
  • Figure 3: Overview of EChecker
  • Figure 4: Inferring Actual Build Dependencies for Changes to Pre-processor Directives
  • Figure 5: Inferring Actual Build Dependencies for Changes to Files
  • ...and 9 more figures