...
You can also build the full cockroach
binary which includes the Javascript build.
Code Block |
---|
bazel build pkg/cmd/cockroach --config=with_ui |
./dev build
(or equivalently, ./dev build cockroach
) will do the same and will stage the binary at ./cockroach
like above.
...
Warning |
---|
If you encounter build errors related to the |
Info |
---|
To build |
Run ./dev help build
for more information about what you can do with dev build
. Note that you can pass additional arguments directly to bazel build
by adding them after --
:
...
You should still ask
dev doctor
if your machine is up-to-snuff before you try tobazel build
. The checks it performs aren’tdev
-specific.dev doctor
also sets up a local cache for you.dev
prints out the (relevant) calls tobazel
it makes before it does so. You can therefore rundev
once just to learn how to ask Bazel to perform your build/test and then just directly call intobazel
on subsequent iterations.When running tests under stress, race, or
--rewrite
,dev
does the legwork to invoke with the necessary flags with bazel. This involves running under another binary (stress
), running with certain gotags (race
), or allowing certain paths outside the bazel sandbox to be written to (testdata
). Feel free to see the actualbazel
command invoked and tweak as necessary.
--config with_ui
argument tobazel build
. (dev
takes care of this for you if you are using it.)If you want to build a test without running it, you must include the the
--config test
argument tobazel build
. (dev
takes care of this for you if you are using it.)