Automatic Fixing of Missing Dependency Errors
Jun Lyu, He Zhang, Lanxin Yang, Yue Li, Chenxing Zhong, Manuel Rigger
Abstract
Many build systems, such as Make, rely on build scripts that are written by users to specify dependencies. As a serious dependency error in Makefiles, Missing Dependencies (MDs) can result in compiling and linking outdated artifacts in incremental builds, preventing software project updates from being applied correctly. Many studies have explored the detection of MDs. Automatically fixing those missing build dependency errors has become an apparent but challenging task. The challenges mainly result from Makefiles having complex semantics and project maintainers declaring dependencies in a variety of ways. To address these challenges, we propose a new approach to fixing MDs called MDfixer. The core idea of MDfixer is to identify the dependency declaration style in a Makefile and generate patches for the same declaration style based on declaration graphs and automatic prompt generation. Specifically, MDfixer locates dependency declarations for targets that have errors in the Makefile based on error reports, and then builds a declaration graph for each build target with errors and identifies the target’s declaration style based on a distance metric between the target and the dependencies. Based on the declaration graph and automatic prompt generation, MDfixer generates patches with the same style for the dependencies that need to be added. We evaluated the effectiveness and efficiency of MDfixer with 35 well-known projects. The evaluation results show that MDfixer can fix all MDs. We submitted fixes for 2,786 individual dependency issues across 17 projects, with 11 of them merging our pull requests, resulting in a total of 2,099 errors being fixed. MDfixer consumes an average time of 3.31 min for fixing a project, with a median of 62.999s. It can assist practitioners in the effective and efficient fixing of MDs.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get eb5a8049-c904-4593-b3bb-d85fd85aa2e5Related papers
- Detecting Build Dependency Errors in Incremental BuildsJun Lyu, Shanshan Li, He Zhang, Yang Zhang et al.ISSTA 2024 · 3 citations
- Escaping dependency hell: finding build dependency errors with the unified dependency graphGang Fan, Chengpeng Wang, Rongxin Wu, Xiao Xiao et al.ISSTA 2020 · 37 citations
- Efficient Build Dependency Verification Using eBPF and Incremental AnalysisYuta Saito, Kazunori Sakamoto, Hironori WashizakiICSE 2026
- A model for detecting faults in build specificationsThodoris Sotiropoulos, Stefanos Chaliasos, Dimitris Mitropoulos, Diomidis SpinellisOOPSLA 2020 · 16 citations
- Accelerating Build Dependency Error Detection via Virtual BuildRongxin Wu, Minglei Chen, Chengpeng Wang, Gang Fan et al.ASE 2022 · 6 citations
