Live data from Hacker News

Buck: A high-performance build tool

buckbuild.com

21–30 of 71 posts

Re: Buck: A high-performance build tool

#23
post #8

Can anyone who's used both compare Buck to Blaze/Bazel?

Uber is migrating away from Buck to Bazel. One major reason is poor support for a variety of languages (Go being one big one, where fixing issues was historically slow due to a need to upstream fixes to Buck core).

I haven't worked with Buck myself, but colleagues who evaluated it for JS have expressed concerns with lack of support/ecosystem there as well. In comparison, there are various Bazel rulesets for JS/Typescript, and I've had some pretty good experience w/ implementing rules myself. The Starlark docs are good.

Another thing going for Bazel is its ability to embed external codebases into a build system. This mechanism allows rules to be shared among repositories in a reusable fashion.

Re: Buck: A high-performance build tool

#24

> Buck looks at the contents of your inputs, not their timestamps to figure out what needs to be built. As a result, incremental builds should always be correct, so there's no need to perform a clean build. At least one of these new-fangled tools gets at least one part right. The salient point is now of course whether Buck considers the correct set of dependencies as well as negative dependencies.

Buck makes you declare every dependency explicitly. A particular target must specify exactly what files it uses, and when it makes a build, it copies those files from the target and all its dependencies into an empty sandbox and builds there. It's wonderful.

Re: Buck: A high-performance build tool

#25
post #5

Earlier quoted context omitted.

It's a hard thing to do right despite looking deceptively simple.

Well many build systems don't even try to work properly, many new ones included. E.g. anything using timestamps is unequivocally an incorrect build system.

Can you explain why? I’d be interested to learn more.

Re: Buck: A high-performance build tool

#26

> Buck looks at the contents of your inputs, not their timestamps to figure out what needs to be built. As a result, incremental builds should always be correct, so there's no need to perform a clean build. At least one of these new-fangled tools gets at least one part right. The salient point is now of course whether Buck considers the correct set of dependencies as well as negative dependencies.

Redo enhances the timestamp approach instead: https://apenwarr.ca/log/20181113

Re: Buck: A high-performance build tool

#27
post #25

Earlier quoted context omitted.

Well many build systems don't even try to work properly, many new ones included. E.g. anything using timestamps is unequivocally an incorrect build system.

Can you explain why? I’d be interested to learn more.

In principle, you want the output of a build to always be the same if the inputs are the same. In terms of correctness, you want "sameness" to be defined in terms of the contents of the input, not their timestamp, since timestamps can be easily be changed inadvertently by things like `touch`, 3rd party tools, etc. Also, relying on timestamps could pose problems for caching/checksums/etc if they are printed into any transitive dependency of a build pipeline.

Re: Buck: A high-performance build tool

#29
post #8

Can anyone who's used both compare Buck to Blaze/Bazel?

There is also Redo https://redo.readthedocs.io/en/latest/ Very different, never used it, but very interesting nonetheless.

Redo is an awesome replacement for make - way better in many ways, while being much simpler.

However, it doesn’t do things buck and Bazel do such as making sure only declared files are indeed used, or tracking compiler and toolset versions on its own.

Re: Buck: A high-performance build tool

#30
Also (bazel already mentioned, so no need to), but:

Pants - https://www.pantsbuild.org/index.html

Please.Build - https://please.build/

Closely related, but functioning bit different:

Gn - https://gn.googlesource.com/gn/ (targets ninja). Used by Chromium, Fuchsia, and others

Soong - https://android.googlesource.com/platform/build/+/master/REA... (targeting Kati?)

Post reply on HN