4 ms·
Bazel generates reproducible builds by default and is very cache friendly. It forces hermetic build and test environments; each build/test gets it's own sandbox
by gravypod 6y ago
Bazel generates reproducible builds by default and is very cache friendly. It forces hermetic build and test environments; each build/test gets it's own sandbox that only contains and preserves deps and outputs.
It's not magically different than CMake and Meson, it just works in a way that I never every think "maybe make clean will fix this".
I can trust it to work regardless of the changes.
You can also, out of the box, use remote build/test execution & remote caching shared between Devs and CI.
It's also VCS aware and uses that to help prune down change sets to make builds faster.
- jcelerier 6y ago> It forces hermetic build and test environments; how would that ever work if you want to build software to be packaged in a linux distro where your software has to comply with $VERSION of every library provided by the distro ?
- steeve 6y agoIt is focused on producing static (or mostly static) binaries. Obviously not everything can be in the sandbox, but in the Bazel world, it takes over the build of all your dependencies (as it is also a package overlay).
- gravypod 6y agoBazel isn't really designed for dynamic linking applications. You can include system libraries if you need: https://groups.google.com/g/bazel-discuss/c/Ndd820uaq2U https://groups.google.com/g/bazel-discuss/c/Ndd820uaq2U You'd also need to make sure everything is marked as `linkstatic=false`, but I'm not sure if that would work correctly. But, in the end of the day, you're going against the grain of bazel here. Bazel expects to statically link everything to make distribution to heterogeneous environments simpler.
- jcelerier 6y agoright, but then understand that if someone wants to create a software for which a goal is to be packaged & distributed by e.g. Debian, homebrew, msys2, Fedora, CentOS..., this is an absolute non-starter.