On the Use of Package Managers by the C++ Open-Source Community
Total Page:16
File Type:pdf, Size:1020Kb
On the Use of Package Managers by the C++ Open-Source Community André Miranda João Pimentel Department of Computer Engineering Universidade Federal Rural de Pernambuco University of Pernambuco Cabo de Santo Agostinho, Brazil Recife, Brazil [email protected] [email protected] ABSTRACT In some cases, the package manager is introduced in tandem with THIS IS A PRE-PRINT COPY a language, which leads to design decisions of the language being The use of package managers is commonplace for software devel- made with the specific purpose of supporting the management of opers working with programming languages such as Ruby, Python, code units, generally known as packages [17]. and JavaScript. This is not the case for C++ developers, which Unlike other languages such as Go and Rust, C++ appeared many present a low adoption rate of package managers. years before the first language-specific package managers, which The goal of this study is to understand what is preventing C++ helps explain the lack of a standard package format, the lack of developers from adopting package managers in the context of open- precise semantics for modules, and the lack of support for the large source software (OSS) projects. In order to achieve this goal, we amount of existing tooling and legacy code that was developed performed a questionnaire survey with 343 developers from 42 OSS prior to the initial package management proposals. projects. The survey participants answered a questionnaire with 29 The potential benefits of using third-party libraries are already questions. known: lower costs, reduced time to market, and higher quality After the analysis of the collected data, we could conclude that [13][7]. However, the lack of support for C++ modules and the het- 2 most participants are not reluctant to use C++ package managers erogeneous landscape of the C++ environment featuring: multiple and that Open-Source licensing, High Availability of Libraries, Good compilers for different architectures, a handful of build systems, Documentation, and Ease of Configuration can be considered cru- and dependencies on operating systems make the development cial factors for the successful adoption of C++ dependency man- and use of C++ package managers challenging. This complexity agement via language-specific package managers. is also noted by Neitsch et al. claiming that “C/C++ software has complicated configuration and construction phases because ofthe CCS CONCEPTS need to support enormous platform variation.” [11]. Additionally, Dos Reis and Hall [4] argue that the absence of • Software and its engineering → Software libraries and repos- direct language support for componentization of C++ libraries and itories; Software configuration management and version control sys- programs has led to serious impediments regarding compile-time tems; • Information systems → Open source software; scalability and programmer productivity. KEYWORDS These characteristics have brought to our attention the case of open-source C++ projects. In spite of being written in one of Open-source software; Software maintenance; Software tools; Em- the most popular programming languages [1], dependency man- pirical study; Software engineering agement in these projects is handled using several non-standard ACM Reference Format: methods, oftentimes resorting to system package managers for each André Miranda and João Pimentel. 2018. On the Use of Package Managers supported operational system. This is the case even though there by the C++ Open-Source Community. In Proceedings of ACM SAC Conference are at least nine language-specific package managers available for (SAC’18). ACM, New York, NY, USA, Article 4, 9 pages. https://doi.org/10. C++. Hence, the goal of this study is to identify what are the 1145/3167132.3167290 factors that prevent the adoption of language-specific pack- age management tools in open-source C++ projects, from the 1 INTRODUCTION point of view of software developers. Since the introduction of CTAN and CPAN as early language- In order to obtain information with the open-source community, specific package managers [10], developers of many programming a 29-questions questionnaire was designed and applied as an online languages have been taking advantage of this type of tool in order survey, centered on the following research questions: to facilitate the handling of dependencies. RQ1 Do developers use the existing C++ package managers? Package managers promote reuse by providing easy access to RQ2 What obstacles prevent the use of such tools? software packages, which may range from simple utility routines to full-blown frameworks. One of the most popular package managers, NPM, hosts more than 350.000 packages on its official registry, 2The C++ development environments are heterogeneous and this has been dis- cussed by developers throughout the web, some of them argue that the availabil- serving more than 2.5 billion package downloads per week as of ity of several tools, none of them being a de facto standard, as well as the large July 20171. legacy code base, make package management for C++ much harder than most lan- guages. Here is a discussion from a prominent Q&A software engineering forum: 1https://www.npmjs.com http://softwareengineering.stackexchange.com/q/170679 SAC’18, April 9-13, 2018, Pau,France André Miranda and João Pimentel RQ3 Currently what are the preferred methods to handle depen- Lastly, some studies (for instance, [3] and [6]) describe the ar- dencies in C++ projects? chitecture of operating systems package managers. While their RQ4 What is expected of a C++ package manager? discussion of technical challenges can be helpful for package mana- RQ5 What is the community’s opinion towards C++ package mana- gers developers, they do not address the topic of software adoption. gers? 3 METHODOLOGY RQ1 examines how much this development community is aware of the available tools. RQ2 aims to identify the most relevant fac- In this study, we intend to understand how dependencies are cur- tors that play a negative role in the low adoption of C++ package rently handled in C++ projects and what is preventing C++ devel- managers. RQ3 investigates the current methods employed in C++ opers from adopting C++ package managers. projects to handle external libraries. RQ4 summarizes the most This research was organized in four phases, as follows. In the wanted features of a C++ package manager. Finally, RQ5 surveys first phase, we mapped out the existing C++ package managers the opinion of the developers hoping to learn if they are favorable tools, so that we know which tools are currently available for C++ or against this kind of package managers and how has been their developers. In Phase 2 we identified candidate open-source C++ experience while using them. projects to be studied. We also analyzed how those projects handle In the next section, an overview of related work is presented. their dependencies and identified their contributors. In Phase 3we The methodology of this study is described in Section 3. The results designed and ran a survey pilot, collecting data and feedback to are presented in Section 4 and discussed in Section 5. Threats to improve the questionnaire. In Phase 4 the final survey was exe- its validity are presented in Section 6. Lastly, Section 7 presents cuted, and data was gathered. Finally, in Phase 5 we processed and conclusions and future work. analyzed the data gathered during the survey. These phases are further described in the following subsections. 2 RELATED STUDIES 3.1 Existing C++ Package Managers Muhammad et al. [10] have briefly surveyed the history of pack- Before starting the survey proper, we searched for language-specific age managers to compare and explain some design decisions for package managers meant for C++ projects on GitHub, SourceForge, LuaRocks, the standard package manager for Lua programming projects forums and on programming-related social networks, as language. Whereas that paper provides an overview on previously well as through general web search engines. The following pro- developed package managers, here the focus is on the current opin- jects were identified: Biicode, Build2, Conan, CPM, Hunter, Mason, ion of potential users of such tools. Meson, Pacm, and Yotta. A modular architecture for package managers is proposed in [2], All of these projects, except Biicode and CPM, were in active which might prove useful for a package manager dealing with the development during the year previous to the survey (July 15, 2015, complexities required by C++ projects. Whereas that paper may to July 15, 2016). Nonetheless, these two tools were also included in help with the technical challenges of developing package managers, the survey questionnaire, as we would like to hear from respondents it does not contribute to the understanding of adoption factors. their experience with C++ package management tools in general. We were able to find numerous surveys about open-source soft- ware development, primarily focused on social aspects and moti- vation [8][18]. Whereas not directly related to package managers, 3.2 Projects Selection and Current Practices these papers provide insights on the motivation of open-source soft- Nowadays, there are a diverse range of open-source software (OSS) ware developers and can assist the developers of package managers projects, from embedded systems to large, distributed systems. to understand their potential users further. Additionally, Sojer and Many of these projects are developed and managed openly