Invocations
The Invocations component manages how build
and test
codelens actions are
performed, and provides access to revent invocations.
Configuration
Use the settings to configure:
invokeWithBuildEventStreaming
: whether to launchbuild
andtest
invocations in an integrated terminal or via the gRPC streaming API (see below).buildEventPublishAllActions
: if enabled withinvokeWithBuildEventStreaming
, sets the--build_event_publish_all_actions
flag.hideOutputPanelOnSuccess
: if true, abuild
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:
In the default mode, an integrated terminal is launched that calls
bazel build //:gazelle-protobuf
: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:
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.
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.