4 ms·
I don't see how build2 can be in the same spirit as Bazel when it misses the main advantage of Bazel
by rienbdj 7y ago
I don't see how build2 can be in the same spirit as Bazel when it misses the main advantage of Bazel
- boris 7y agoI never said build2 is "in the same spirit" as Bazel (whatever that means). I said it fixes the same problems as OP listed.
- weberc2 7y ago> I said it fixes the same problems as OP listed. The OP listed noted that hermeticity is required for fast builds, and that humans can't be relied upon to provide hermeticity as a property. How does build2 guarantee hermeticity or otherwise support fast builds without a clean room solution a la bazel?
- boris 7y agoThe OP was vague on why exactly hermetic builds are required to achieve fast builds. The only concrete thing they mentioned is caching which doesn't require hermetic builds (in the strict sense, as in preventing any outside changes) provided you can detect changes accurately. To give a specific example, Bazel may prevent you from accidentally using a different version of the compiler while build2 will detect that you are attempting to use a different version.
- weberc2 7y agoCaching depends on a correct model of the dependency tree. If a dependency isn't included in the model, then a non-hermetic tool will silently succeed, incorrectly while a hermetic tool will do the correct thing and fail the build. Keeping the model accurate is too hard for humans, so in practice, non-hermetic build tools can't cache correctly.