...
Code Block |
---|
# Build dev ./dev build dev # Build crlfmt ./dev build crlfmt # Build roachprod ./dev build roachprod # Run acceptance tests ./dev acceptance # Run compose tests ./dev compose # Run benchmarks for pkg/sql/parser ./dev bench pkg/sql/parser # Generate code and docs (run this before submitting your PR). ./dev generate # Generate changes to `BUILDBUILD.bazel`bazel files ./dev generate bazel --short # Run lints ./dev lint # logic tests! ./dev testlogic --files=$FILES --subtests=$SUBTESTS --config=$CONFIG # Open a container running the "bazelbuilder" image. Requires Docker. ./dev builder # Remove artifacts from building the UI ./dev ui clean --all # Start the Bazel cache server after rebooting ./dev cache |
...
Code Block |
---|
./dev gen protobuf ./dev generate js # start a cockroach node, e.g. ./dev build && ./cockroach start-single-node # in separate window, start UI watch for incremental UI builds ./dev ui watch # now you're ready to write UI code! |
4. Write some code!
If you don’t have crlfmt already, you’ll need to
./dev build crlfmt
to use it for formatting.If you add new files or imports, run
./dev gen bazel
before compiling or running a test.compilepkg: missing strict dependencies:
is usually the indicator that./dev gen bazel
needs to be re-run.to skip this step, see tip below on
ALWAYS_RUN_GAZELLE
Build the binary:
./dev build short
...