Most active commenters

    ←back to thread

    392 points mfiguiere | 11 comments | | HN request time: 0.655s | source | bottom
    1. oggy ◴[] No.35472845[source]
    Great to see this. I hope it takes off - Bazel is useful but I really like the principled approach behind it (see the Build Systems a la Carte paper), and Neil is scarily good from my experience of working with him so I'd expect that they've come up with something awesome.

    One thing I find annoying with all of these general, language-agnostic build systems though is that they break the "citizenship" in the corresponding language. So while you can usually relatively easily build a Rust project that uses crates.io dependencies, or a Python project with PyPi dependencies, it seems hard to make a library built using Bazel/Buck available to non-Bazel/Buck users (i.e., build something available on crates.io or PyPi). Does anyone know of any tools or approaches that can help with that?

    replies(7): >>35473199 #>>35473216 #>>35474513 #>>35475152 #>>35475192 #>>35476072 #>>35476950 #
    2. marcyb5st ◴[] No.35473199[source]
    Regarding bazel, the rules_python has a py_wheel rule that helps you creating wheels that you can upload to pypi (https://github.com/bazelbuild/rules_python/blob/52e14b78307a...).

    If you want to see an approach of bazel to pypi taken a bit to the extreme you can have a look at tensorflow on GitHub to see how they do it. They don't use the above-mentioned building rule because I think their build step is quite complicated (C/C++ stuff, Vida/ROCm support, python bindings, and multiOS support all in one before you can publish to pypi).

    replies(1): >>35476200 #
    3. dnsco ◴[] No.35473216[source]
    If I'm understanding, for the rust specific case, this generates your BUCK files from your Cargo.toml:

    https://github.com/facebookincubator/reindeer

    4. kccqzy ◴[] No.35474513[source]
    I have a lot of respect for Neil, but I've been burned by the incompleteness and lack of surrounding ecosystem for his original build system Shake (https://shakebuild.com/). This was in a team where everyone knows Haskell.

    I'm cautiously optimistic with this latest work. I'm glad at least this isn't some unsupported personal project but something official from Meta.

    replies(1): >>35481833 #
    5. jpdb ◴[] No.35475152[source]
    Bazel now has a module system that you can use.

    https://bazel.build/external/module

    This means your packages are just Git repos + BUILD files.

    6. lopkeny12ko ◴[] No.35475192[source]
    > One thing I find annoying with all of these general, language-agnostic build systems though is that they break the "citizenship" in the corresponding language

    I mean, this is kind of the whole point. A language agnostic build system needs a way to express dependencies and relationships in a way that is agnostic to, and abstracts over, the underlying programming language and its associated ecosystem conventions.

    replies(1): >>35481337 #
    7. rvcdbn ◴[] No.35476072[source]
    These kinds of tools are designed to work in monorepos so you don’t really rely on package management like you do with separate repos. This works really well for sharing close inside companies/entities. Doesn’t work as well for sharing code between entities.
    8. dfinninger ◴[] No.35476200[source]
    I use py_wheel to build packages to be consumed by data scientists in my company. It works well and is reasonably straightforward. Although the packages are pure Python so I haven’t had to deal with native builds.
    9. klodolph ◴[] No.35476950[source]
    The “citizenship” point is really interesting. I’ve found these build systems to be really useful for solving problems in multi-language repos. They make it super easy to create all the build artifacts I want. However, in many ways, they make the source more difficult to consume for people downstream.
    10. jen20 ◴[] No.35481337[source]
    That is only true if the output is an application.

    If the output is libraries for some ecosystem (perhaps with bindings to something written in Rust or C), one needs to be able to build packages that others not invested in that build system can consume.

    11. ndmitchell ◴[] No.35481833[source]
    I think of Shake as a library for implementing build systems, and was hoping that libraries would emerge that described how to implement rules like C++, and how they should compose together so you can compile C++/Haskell/Python all together happily. A few libraries emerged, but the overall design never emerged. Sorry you got burned :(

    Buck2 is at a higher level than Shake - the rules/providers concepts pretty much force you into a pattern of composable rules. The fact that Meta has lots of languages, and that we were able to release those rules, hopefully means it's starting from the point of view of a working ecosystem. Writing those rules took a phenomenal amount of effort from a huge range of experts, so perhaps it was naive that Shake could ever get there on only open source volunteer effort.