buck2
buck2 copied to clipboard
Third party dependencies?
What's the story for third party dependencies? As far as I can tell Buck2 supports http_archive() like Bazel, but that has various issues and is very unergonomic (in Bazel at least; I've never used Buck1).
Google developed Bzlmod as an improvement. Is there anything like this for Buck2, or plans to add support?
Probably better to do it sooner rather than later if you want Buck2 to be popular (it looks pretty great tbh so I hope it does become popular!). Bazel has a bit of a slow migration issue with bzlmod - there are loads of packages that still haven't migrated to it so it's not really that useful, which I imagine is causing people not to bother migrating their packages.
You can do the import and vendor approach like we do for Reindeer and bootstrapping Buck2. But we do want to do something better - we're just not sure what quite yet. We'll be having discussions internally, but if you have good ideas, please do share!
The buckaroo macros for Buck1 are pretty good, and predated bzlmod by some time. It's not perfect by any means, but since it was meant to interop with buck that might be a good place to start: https://github.com/LoopPerfect/buckaroo
How does this currently work inside facebook? Is everything except for rust vendored with build files written by hand?
Looking at nixpkgs and bazel-central-registry for inspiration, I think that in an ideal world maybe we could get to a starlark-central-registry (ie. something sharable with Bazel et al). Looking at the bazel-central-registry package coverage it doesn't seem like that idea has progressed too far. Maybe this is unnecessary, if it's easy enough to write the Reindeer-esque shim for other languages?
Is everything except for rust vendored with build files written by hand?
Not necessarily by hand, there are tools for this, but yes third-party packages get BUCK files (and those are often written by hand).
I'll close this assuming the answers above did address your question but feel free to follow up if not.