CppCon 2018: “C++ Dependency Management: from Package Consumption to Project Development”

preview_player
Показать описание
__
Boris Kolpackov “C++ Dependency Management: from Package Consumption to Project Development”


TL;DR: Want to see what Cargo for C++ looks like? Then this talk is for you.

Existing C++ package managers focus primarily on consumption: there is a repository of released packages that we can download, build, and install. But what happens between releases of these packages? In other words, how are they developed, tested, and delivered? Currently, the answer is "painfully" (and rarely by mere mortals).

Meantime, as languages competing with C++ have shown (see Rust's Cargo, Go's dep/vgo), the state of the art has moved on and a "consumption manager" alone is no longer sufficient: we need support for managing dependencies of a project over its entire development lifecycle -- a tool commonly referred to as a project dependency manager.

In this talk I would like to show the C++ dependency management workflow focused on development as supported by the build2 toolchain. Specifically, we will create from scratch a cross-platform C++ project, add/manage a few dependencies (that can come both from a central package repository as well as individual git repositories), setup CI for all the major platform/compiler combinations, go through a couple of releases, and, finally, publish our package to a central repository and see how our users can reproduce the exact set of dependencies we used in our builds (the lockfile functionality).

And this won't be an entirely toy example either: in the process we will touch on quite a few real-world challenges, including continuous versioning between releases, how to depend on unreleased revisions in version control repositories, dependency auto-synchronization through build system integration, as well as how the upcoming C++ Modules will likely affect packaging.

Boris Kolpackov, Code Synthesis
Chief Hacking Officer

Boris Kolpackov is a founder and CHO (Chief Hacking Officer) at Code Synthesis, a company focusing on the development of open-source tools and libraries for C++. For the past 10 years Boris has been working on solving interesting problems in the context of C++ using domain-specific languages (DSL), C++ parsing, source-to-source translation, and code generation. His notable projects to date include ODB (ORM for C++), XSD and XSD/e (XML Schema to C++ compilers), as well as libstudxml (XML parser/serializer library for C++).


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

I am very open to adopting a new build chain, nothing we use is good anyway. The chain needs to be designed with consideration to how an IDE interacts with it.

cyberpunkspike
Автор

The bad thing about build systems is that if they don't have good IDE integration they are of very limited use. And the only build system that is providing this is "cmake". Unfortunately cmake has become a feature dumpster with a terrible language and documentation. I have a private project specific meta build system that for this reason build buildsystems (cmake, msbuild, packaging buildsystems for snap/flatpacks) that build buildsystems (makefile, ninja). Anyone see the problem we have here?

llothar