Advanced Dependencies Model in Conan 2.0 C, C++ Package Manager @ ACCU 2022
October 24, 2022
2 min read
Advanced Dependencies Model in Conan 2.0 C, C++ Package Manager – Diego Rodriguez-Losada – ACCU 2022
Slides & Materials:https://accu.digital-medium.co.uk/wp-… Website: https://accu.org/conf-main/main/ Conan C, C++ package manager has been running the 1.X stable version, up to recent 1.43, for the last 4 years. One of its limitations was the relatively simple dependencies model, with “requires” to model “library” dependencies and “build_requires” to model “build time tools” dependencies. While this model works well in some of the most typical scenarios, like applications linking all static libraries, it can be limited in some advanced scenarios, like mixing shared and static libraries in different topologies, or the (dreaded, but still happening in real life projects) case of depending on different versions of the same static library in the same project, via isolation of shared libraries. Conan 2.0 introduces a new dependencies model with requirements “traits” like visibility, definition and propagation of headers and libraries independently, and more that allow modeling all these advanced use cases. This talk will present this new model, and apply it to solve different advanced use cases, with real life examples. It will also describe the ABI compatibility implications, and how it can affect and be leveraged while building large C and C++ projects at scale in CI.