Bazel | beLow - Technical documentation

This method should also be used on Linux, in case your Bazel setup involves some server-side build cache.

Using beLow with Bazel requires an intermediate representation of the compilation, called Bazel acyclic query graph, which is a specific JSON representation of a Bazel build. beLow transforms this representation into a compilation database.

To generate the requested file, use the aquery Bazel subcommand.

If your usual build command is:

bazel build //...

Generating the JSON graph to standard output is done by running:

bazel aquery //...

This output must be written to a file called bazel_action_graph.json during project configuration for beLow to understand the context. For example:

bazel aquery //... > bazel_action_graph.json

Note: On Windows, the encoding of the output graph could be incompatible with beLow because the output format depends on the system language. To force the output encoding using PowerShell:

bazel aquery //... | Out-File -Encoding ASCII -FilePath ./bazel_action_graph.json

Configuration for beLow

Configure

  • Script content:

bazel aquery //... > bazel_action_graph.json
  • Script execution path: In the target directory

  • Shell: Bash

  • Direct link to tab: https://docs.wedolow.com/below-technical-documentation/compatibility-guide/bazel#tab-linux

Clean

  • Script content:

bazel clean //...
  • Script execution path: In the target directory

  • Shell: Bash

  • Direct link to tab: https://docs.wedolow.com/below-technical-documentation/compatibility-guide/bazel#tab-linux-1

Build

  • Script content:

bazel build //...
  • Script execution path: In the target directory

  • Shell: Bash

  • Direct link to tab: https://docs.wedolow.com/below-technical-documentation/compatibility-guide/bazel#tab-linux-2