Developers usually suffer from dependency conflict (DC) issues, i.e., package dependency constraints are violated when a project’s platform or dependencies are changed. This problem is especially serious in .NET ecosystem due to its fragmented platforms (e.g., .NET Framework, .NET Core, and .NET Standard). Fixing DC issues is challenging due to the complexity of dependency constraints: Multiple DC issues often occur in one project, solving one DC issue usually causes another DC issue cropping up, and the exponential search space of possible dependency combinations is also a barrier. In this chapter, we aim to help .NET developers tackle the DC issues. First, we empirically studied a set of real DC issues, learning their common fixing strategies and developers’ preferences in adopting these strategies. Based on these findings, we propose NuFix, an automated technique to repair DC issues. NuFix formulates the repair task as a binary integer linear optimization problem to effectively derive an optimal fix in line with the learnt developers’ preferences. The experiment results and expert validation show that NuFix can generate high-quality fixes for all the DC issues with 262 popular .NET projects. Encouragingly, 20 projects (including affected projects such as Dropbox) have approved and merged our generated fixes and shown great interests in our technique.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Diagnosing NuGet Dependency Conflicts

  • Ying Wang,
  • Shing-Chi Cheung,
  • Hai Yu,
  • Zhiliang Zhu

摘要

Developers usually suffer from dependency conflict (DC) issues, i.e., package dependency constraints are violated when a project’s platform or dependencies are changed. This problem is especially serious in .NET ecosystem due to its fragmented platforms (e.g., .NET Framework, .NET Core, and .NET Standard). Fixing DC issues is challenging due to the complexity of dependency constraints: Multiple DC issues often occur in one project, solving one DC issue usually causes another DC issue cropping up, and the exponential search space of possible dependency combinations is also a barrier. In this chapter, we aim to help .NET developers tackle the DC issues. First, we empirically studied a set of real DC issues, learning their common fixing strategies and developers’ preferences in adopting these strategies. Based on these findings, we propose NuFix, an automated technique to repair DC issues. NuFix formulates the repair task as a binary integer linear optimization problem to effectively derive an optimal fix in line with the learnt developers’ preferences. The experiment results and expert validation show that NuFix can generate high-quality fixes for all the DC issues with 262 popular .NET projects. Encouragingly, 20 projects (including affected projects such as Dropbox) have approved and merged our generated fixes and shown great interests in our technique.