A sound and optimal incremental build system with dynamic dependencies

A sound and optimal incremental build system with dynamic dependencies
复制标题

具有动态依赖关系的健全且优化的增量构建系统

DOI:
10.1145/2814270.2814316
复制
发表时间:
2015
期刊:
Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
影响因子:
--
通讯作者:
Manuel Weiel
Manuel Weiel
中科院分区:
--
文献类型:
--
作者:
Sebastian Erdweg;Moritz Lichter;Manuel Weiel

文献摘要

被引文献

相似文献

构建系统用于除最小的软件项目之外的所有项目,以便以正确的顺序在正确的文件上调用正确的构建工具。构建系统必须是健全的(在构建之后,生成的文件一致地反映最新的源文件)和高效(重新检查并重建尽可能少的构建单元)。当代构建系统提供的效率有限,因为它们缺乏对表达细粒度文件依赖关系的支持。我们提供了一个名为Pluto的构建系统,它支持可重用、参数化、互连的构建程序的定义。运行时,构建器向构建系统通知动态需要和生成的文件,以及需要其结果的其他构建器。为了支持细粒度的文件依赖关系,我们概括了传统的时间戳概念,以允许构建器声明他们对文件内容的实际需求。Pluto收集构建者的需求和产品,并在构建摘要中盖上他们的印章。这使冥王星能够提供可证明是合理和最佳的增量重建。为了支持动态依赖,我们的重建算法交织了依赖分析和构建器执行,并通过动态分析在依赖图上实施不变量。我们已经将Pluto开发为Java API,并使用它实现了超过25个构建器。我们描述了将较大的Ant构建脚本迁移到Pluto的经验,并比较了各自的构建时间。
Build systems are used in all but the smallest software projects to invoke the right build tools on the right files in the right order. A build system must be sound (after a build, generated files consistently reflect the latest source files) and efficient (recheck and rebuild as few build units as possible). Contemporary build systems provide limited efficiency because they lack support for expressing fine-grained file dependencies. We present a build system called pluto that supports the definition of reusable, parameterized, interconnected builders. When run, a builder notifies the build system about dynamically required and produced files as well as about other builders whose results are needed. To support fine-grained file dependencies, we generalize the traditional notion of time stamps to allow builders to declare their actual requirements on a file's content. pluto collects the requirements and products of a builder with their stamps in a build summary. This enables pluto to provides provably sound and optimal incremental rebuilding. To support dynamic dependencies, our rebuild algorithm interleaves dependency analysis and builder execution and enforces invariants on the dependency graph through a dynamic analysis. We have developed pluto as a Java API and used it to implement more than 25 builders. We describe our experience with migrating a larger Ant build script to pluto and compare the respective build times.