Reusing existing solutions in the form of third-party libraries is common practice when writing software. Package managers are used to manage dependencies to third-party libraries by automating the process of installing and updating the libraries. Library dependencies themselves can have dependencies to other libraries creating a dependency network with several levels of indirections. The library dependency network in the Swift ecosystem encompasses libraries from CocoaPods, Carthage and Swift Package Manager (PM). These package managers are used when developing, for example, iOS or Mac OS applications in Swift and Objective-C. We provide the first analysis of the library dependency network evolution in the Swift ecosystem. Although CocoaPods is the package manager with the biggest set of libraries, the difference to other package managers is not as big as expected. The youngest package manager and official package manager for Swift, Swift PM, is becoming more and more popular, resulting in a gradual slow-down of the growth of the other two package managers. When analyzing direct and transitive dependencies, we found that the mean total number of dependencies is lower in the Swift ecosystem compared to many other ecosystems. Still, the total number of dependencies shows a clear growing trend over the last five years.
翻译:以第三方库的形式复用现有解决方案是编写软件时的常见做法。包管理器通过自动化安装和更新库的过程来管理对第三方库的依赖。库依赖本身可能依赖于其他库,从而形成具有多个间接层次的依赖网络。Swift 生态系统中的库依赖网络涵盖了来自 CocoaPods、Carthage 和 Swift 包管理器 (PM) 的库。这些包管理器用于开发例如使用 Swift 和 Objective-C 的 iOS 或 Mac OS 应用程序。我们首次分析了 Swift 生态系统中库依赖网络的演变。尽管 CocoaPods 是拥有最多库的包管理器,但它与其他包管理器之间的差异并不像预期的那样大。最年轻且官方推荐的 Swift 包管理器 Swift PM 正变得越来越受欢迎,导致其他两个包管理器的增长速度逐渐放缓。在分析直接依赖和传递依赖时,我们发现与许多其他生态系统相比,Swift 生态系统中依赖总数的平均值较低。尽管如此,依赖总数在过去五年中显示出明显的增长趋势。