Automated Dependency Optimization for Artifact-Based Build Systems
Open Access
- 1 October 2026
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 3 (ISSTA) , 2294-2315
Abstract
As projects grow, the maintenance of intra- and inter-project dependencies becomes increasingly complex. If dependency maintenance is lax, redundant dependencies may accrue, inflating incremental build and test latencies. The heterogeneity of language- and tool-specific dependency expressions and the complexity of the dependency graphs that they specify exacerbate the challenge of identifying and removing redundant dependencies. To address these challenges, this paper introduces DepReduce, an automated approach for optimizing declared dependencies in artifact-based build systems. DepReduce operates directly on the dependency graph managed by the underlying build system, and formalizes the optimization objective as minimizing the cumulative rebuild cost triggered by changes to individual targets. To achieve this, DepReduce performs the dependency lifting and dependency flattening operations on the dependency graph in topological order, which we prove is both correct and optimal under the defined optimization objective. To empirically evaluate the approach, we implemented BazelDepReduce, an automated dependency optimization tool for Bazel. Bazel is an artifact-based build system with native support for multiple programming languages. We evaluated BazelDepReduce on 19 open-source Bazel projects written in seven programming languages. Among them, 16 projects across six languages achieved reductions in rebuild cost. In total, BazelDepReduce identified and removed 430 redundant dependencies, which we used to produce 16 Pull Requests (PRs). Twelve PRs have been merged by the target projects, including Angular and Apache RocketMQ, affecting up to 80.6% of subsequent commits, with a median of 26.3%. We also adapted BazelDepReduce to support Buck and Cargo, providing preliminary evidence that the implementation can be extended to other artifact-based build systems. Overall, these results show that our approach can effectively reduce rebuild cost on selected Bazel projects spanning multiple languages.Keywords
This publication has 27 references indexed in Scilit:
- Does using Bazel help speed up continuous integration builds?Empirical Software Engineering, 2024
- A comprehensive study of bloated dependencies in the Maven ecosystemEmpirical Software Engineering, 2021
- Detecting Incorrect Build Rules2019
- An empirical comparison of dependency network evolution in seven software packaging ecosystemsEmpirical Software Engineering, 2018
- A Large-Scale Empirical Study of the Relationship between Build Technology and Build MaintenanceEmpirical Software Engineering, 2014
- Build Predictor: More Accurate Missed Dependency Prediction in Build Configuration Files2014
- Build code analysis with symbolic evaluation2012
- The evolution of Java build systemsEmpirical Software Engineering, 2011
- Make — a program for maintaining computer programsSoftware: Practice and Experience, 1979
- On understanding laws, evolution, and conservation in the large-program life cycleJournal of Systems and Software, 1979