Version: 1.8.x

Invocations

The Invocations component manages how build and test codelens actions are performed, and provides access to revent invocations.

Configuration

image

Use the settings to configure:

  • invokeWithBuildEventStreaming: whether to launch build and test invocations in an integrated terminal or via the gRPC streaming API (see below).
  • buildEventPublishAllActions: if enabled with invokeWithBuildEventStreaming, sets the --build_event_publish_all_actions flag.
  • hideOutputPanelOnSuccess: if true, a build invocation will open a terminal output window while running. If the operation succeeds, the window is automatically closed.

Usage

Clicking on a build codelens action link operates in one of two modes:

  1. In the default mode, an integrated terminal is launched that calls bazel build //:gazelle-protobuf:

    image

  2. In streaming mode, no integrated terminal is launched; the command is run directly via bazel's gRPC command API, and the build events are streamed back into vscode:

    image

Note the build events in the tree view on the left: A select subset of "interesting" events are surfaced here.

tip

The last build/test command is saved in your workspace; invoking the bsv.bzl.redo command (mac: shift+โŒ˜+space) allow you to quickly "slap" the last command; use it to rapidly iterate on build/test.

You can also use the Recent Invocations tree item to "replay" recent invocations, or visit the build results UI for that item.

image

caution

Streaming mode bypasses the typical bazel C++ frontend completely and performs independent parsing of your .bazelrc files. In certain cases, this can lead to slight differences in the options passed to the bazel server. If you have complex bazelrc files, it might cause "thrash" (incrementality degradation) switching back and forth form the command line and VSCode.