This repository uses Aspect Workflows to provide an excellent Bazel developer experience.
It was generated from the Aspect Workflows template — create your own with aspect init
(see https://aspect.build/docs/cli) or from a starter at https://github.com/aspect-starters.
-
Install the Aspect CLI — see https://aspect.build/docs/cli/install. The
aspectcommand pins this workspace's CLI version (via.aspect/version.axl) and wraps Bazel, so use it in place ofbazel. -
Set up a Bazel-based developer environment with direnv: run
direnv allowand follow the prompts tobazel run //tools:bazel_env(puts the project's tools — includingaspectitself — on your PATH, so anaspectinstalled in step 1 isn't required once direnv is active). -
Build and test everything:
aspect build //... aspect test //...
For developers to be able to run additional CLI tools without needing manual installation:
- Add the tool to
tools/tools.lock.json - Run
bazel run //tools:bazel_env(following any instructions it prints) - When working within the workspace, tools will be available on the PATH
See https://aspect.build/blog/run-tools-installed-by-bazel for details.