3 ms·
The C++ world is keenly interested in having a package manager. I believe there are a few competing ones now. All I've seen in practice is "vendoring", which a
by JonChesterfield 3y ago
The C++ world is keenly interested in having a package manager. I believe there are a few competing ones now.
All I've seen in practice is "vendoring", which amounts to copy the source into your tree with some degree of review or patching, and then go on as before. After being initially indignant that we didn't use libboost from the OS that approach has really grown on me.
Dependency management is a horrendous mess. Moving the logic into package managers hides that mess from the day to day development which is very nice. However, following a debugger into the binaries that came from apt install is not a great time. Patching the source to behave differently while trying to work out what is going wrong is rather harder too.
If you do the vendored thing, you also get the interesting feature where you can checkout the source tree as it was eight months ago to correspond with whatever a customer is asking about and it builds and runs, instead of telling you that the dependencies no longer exist.
I'm now heading further in that direction. All the libraries should be built from source in the same repo, but preferably by tools that are also in that repo. I'm going to end up with a C compiler checked in as well, much like the embedded toolchain people are prone to doing.
- mhh__ 3y agoSome open source types really hate vendoring on some level (it's hard to say if it's genuinely technical or just an immune system turning on) — not everything supports it that well (e.g. python really doesn't, it's terrible), but when you have it working it's so nice for the things you mention. We had a build fail for a few days because a git commit with a given hash didn't exist upstream. Solution? Pin to a branch of course! Vendoring as that solution takes a surprisingly deep realignment.