vscode-bazel
vscode-bazel copied to clipboard
Refreshing 'Bazel Build Targets' fails when there is a problem in the build graph
Refreshing a the test of build targets tries to pull every target in the workspace using bazelisk query '//...:*' --output=package
. If any target in the graph fails then the targets are unable to refresh.
This can be fixed by adding --keep_going
to the command.
this is happening to me as well. every change that I make in the BUILD files makes the targets no longer "refreshable".
even after I fix the BUILD files, I have to manually delete the local bazel cache and then I can refresh the targets again
I've also found the same. If I run bazel clean --expunge
and then refresh the build targets it works. As soon as I run a build, the refresh targets stops working again... Until I do another bazel clean --expunge
(just doing bazel clean
isn't enough).
Command failed: bazel --output_base=C:\Users\derek\AppData\Local\Temp\6d3c01fb0e729517c66ebcceb7fa4943 query ...:* --output=package Another command (pid=10292) is running. Waiting for it to complete on the server (server_pid=20404)... Loading: 0 packages loaded ERROR: error loading package under directory '': error loading package 'bazel-hello/external/bazel_tools/src/conditions': Label '//tools/windows:windows_config.bzl' is invalid because 'tools/windows' is not a package; perhaps you meant to put the colon here: '//:tools/windows/windows_config.bzl'? Loading: 0 packages loaded currently loading: bazel-hello/external/local_config_cc ... (2 packages)
EDIT: I fixed this by adding the bazel-hello
directory to .bazelignore
. Not sure why it fails without that. I'm able to run a similar bazel query ...:* --output=package
without failure from the command line, but the vscode plugin seems to fail with the .bazelignore
change. Note that "hello" is the name of my workspace.
@derekwisong See #216