Hacker News new | ask | show | jobs
by _huayra_ 1254 days ago
A sane build system + package management solution for C++. I have to cobble it together via CMake + Conan every time and I'm praying I get put on a new Rust project someday, but my position and sizeable comp are mainly for being a "legacy janitor".
3 comments

We've been a CMake shop from the beginning, but have recently been testing out Meson to see if it could work for us and we've been pleasantly surprised by how nice it is.
It can't be done for C++ unless you massively constrain the problem.

Trivial example: libfftw3 has --enable-threads and --enable-float configure/compile time options. Your project may need/want both, one or neither of these options (it may, in fact, want two different versions of the library).

Rust "proposes" to deal with this by essentially compiling its libraries as a part of building your project (ie. "vendoring" every 3rd party library dependency).

Most C++ developers don't consider vendoring in this way to be particularly sane, even though many of us do it anyway.

I have tried to figure out how to use Nix as a package manager to deal with this, but it is still too much wizardry for me to wrap my head around.
Have you tried gn or bazel?
I have advocated to at least try bazel (or even buck), but the higher-ranking devs all say that it's too much "organizational knowledge risk", i.e. if I force something unfamiliar onto the team and they only shakily know how to work with it with my help and then I leave, they're screwed. Therefore, it usually boils down to trusty old crusty tools.

Crabs in a bucket.

They're not wrong though; if you want to introduce a new tool - especially one as large and complicated as Bazel - you need to also take ownership of training and hiring not just yourself (assuming you're not already a Bazel expert) but all your current and future colleagues yourself. The management has to make a cost / benefit analysis and it's not in Bazel's favor.

Bazel is a tool by and for Google scale companies, which 99% of tech companies aren't. Make and co are good enough for most use cases.