facebook / buck2

Build system, successor to Buck
https://buck2.build/
Apache License 2.0
3.53k stars 215 forks source link

Migration path from Bazel to Buck2 #509

Open fud opened 10 months ago

fud commented 10 months ago

I'm looking for a howto or document on how to convert from Bazel to Buck2. We currently use Gazelle to generate our bazel files for our code, but I believe Buck2 does this automatically. Does something currently exist?

wendy728 commented 9 months ago

We don't have documentation/tools on how to do this. We've discussed this internally, but we don't have any concrete plans just yet. cc @ndmitchell

ndmitchell commented 9 months ago

There is no documentation yet - we're starting to produce wrappers that act a bit more like Bazel (#421), but nothing is ready yet.

For Gazelle, there are various uses. For things like using Gazelle to generate OCaml library internals, you don't really have to bother, since Buck2 has dynamic dependencies. But for other things, like generating Python dependencies based on import statements, you may wish to continue doing something similar, and we have nothing publicly available to make it easy. Are you using Gazelle to generate all bazel files? Which languages?

fud commented 9 months ago

Our project is using golang so gazelle is used to generate bazel files automatically using,

gazelle(name = "go_generate_build_files")

We also use it for proto path resolution in our proto files.

is used to keep bazel up to date from our mod files with update-repos

Because we're a mono repo we're also building some node for our frontend.