r/cpp • u/TheRavagerSw • Feb 28 '26
Language specific package managers are a horrible idea
Package managers should only deal with package cache and have a scripting interface.
Package managers trying to act smart only makes our jobs harder as evidenced by looking at the issue pages of global package registries.
I recommend everyone here to switch to Conan and not use any abstractions for the build systems, disable remote and use a deployment script or using full deploy as an option. It is not ideal, but it doesn't stand in your way.
0
Upvotes
View all comments
Show parent comment
0
u/TheRavagerSw Mar 02 '26
A language agnostic package manager doesn't need to be a system package manager, you can just have your own package cache.
Vendoring libraries is evil, to give an example SDL bundles audio and compression libs. However if I want to build another library that depends on the same libs now I have two different zlib versions on the same staticly linked binary.
Please assume a project that uses zig, rust and c++, the correct approach is for each language's build system to deal with itself and C bindings. Having cmake call cargo or language specific package manager calling cargo without the user knowing what cargo is a bad idea.
It is precedent even in stuff like meson and xmake, no your build system doesn't need to compile zig sources or rust sources. It just bloats the build system and causes bugs.
I have made 3 PR's to cmake, the source is extremely hard to read, I'm honestly surprised why you think language specific package managers are a good idea.