arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2505.04834cs.SE
收藏

跨包管理器的锁文件设计空间

The Design Space of Lockfiles Across Package Managers

Université de Montréal(蒙特利尔大学);KTH Royal Institute of Technology(瑞典皇家理工学院)

Yogya Gamage, Deepika Tiwari, Martin Monperrus, Benoit Baudry

AI总结:

本文研究了7种流行包管理器的锁文件设计,通过访谈揭示开发者在使用锁文件时的挑战,并提出改进建议以提升开发体验。

摘要:

软件开发者重用托管在包注册表中的第三方包。在构建时,包管理器解析并获取项目的直接和间接依赖。大多数包管理器还会生成锁文件,记录解析的依赖版本集合。锁文件用于减少构建时间;验证解析包的完整性;并支持跨环境和时间的构建可重复性。尽管这些有益功能,开发者在维护、使用和解释锁文件时仍面临困难。在本研究中,我们揭示了锁文件的主要挑战,以便未来研究人员和工程师能够解决这些问题。我们对7种流行的包管理器(npm、pnpm、Cargo、Poetry、Pipenv、Gradle和Go)进行了首次全面研究。首先,我们强调了包管理器在生成过程和锁文件内容方面的广泛设计决策。接着,我们基于半结构化访谈对15名开发者进行了定性分析,捕捉了开发者对锁文件的感知好处以及管理这些文件的挑战。在这些观察之后,我们提出了5条建议,以进一步改进锁文件,从而提升开发体验。

英文摘要:

Software developers reuse third-party packages that are hosted in package registries. At build time, a package manager resolves and fetches the direct and indirect dependencies of a project. Most package managers also generate a lockfile, which records the exact set of resolved dependency versions. Lockfiles are used to reduce build times; to verify the integrity of resolved packages; and to support build reproducibility across environments and time. Despite these beneficial features, developers often struggle with their maintenance, usage, and interpretation. In this study, we unveil the major challenges related to lockfiles, such that future researchers and engineers can address them. We perform the first comprehensive study of lockfiles across 7 popular package managers, npm, pnpm, Cargo, Poetry, Pipenv, Gradle, and Go. First, we highlight the wide variety of design decisions that package managers make, regarding the generation process as well as the content of lockfiles. Next, we conduct a qualitative analysis based on semi-structured interviews with 15 developers. We capture first-hand insights about the benefits that developers perceive in lockfiles, as well as the challenges they face to manage these files. Following these observations, we make 5 recommendations to further improve lockfiles, for a better developer experience.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑