...
If you’re interested in watching or contributing to the progress of the Bazel migration, you can check out the project tracker on GitHub.
How can I build CockroachDB with Bazel?
Currently, only the buildshort
target fully builds with Bazel. From the root of the cockroach
repo, you can build CockroachDB with bazel build pkg/cmd/cockroach-short
.
CI is failing because the Bazel build is broken. What do I do?
...
We use an open-source tool called Gazelle which automatically fixes up all the dependencies in the workspace for all our Go and protobuf code. You can run Gazelle with ./dev generate bazel
. (bors will not let you merge unless this command can be run cleanly, so you may want to make running this a part of your normal workflow.) If Gazelle notices changes, this will result in updates to BUILD.bazel
files in tree, or to the root-level WORKSPACE
or DEPS.bzl
files. Then, re-run the Bazel build to ensure this fixes the failure. Note that ./dev generate bazel --mirror
is required when vendoring new dependencies.
Updating dependencies for protos
...