buck2 icon indicating copy to clipboard operation
buck2 copied to clipboard

Migration path from Bazel to Buck2

Open fud opened this issue 2 years ago • 3 comments

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?

fud avatar Nov 28 '23 04:11 fud

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

wendy728 avatar Dec 15 '23 18:12 wendy728

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?

ndmitchell avatar Dec 17 '23 20:12 ndmitchell

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.

fud avatar Dec 19 '23 01:12 fud