vscode-bazel
vscode-bazel copied to clipboard
Command "Refresh Bazel Build Targets" fails with "ERROR: infinite symlink expansion detected"
trafficstars
When I run this, I get this msg:
Command failed: bazel --output_base=/tmp/20de9d54ae8f5a71cb5df6e40713bd6d query ...:* --output=package Another command (pid=9682) is running. Waiting for it to complete on the server... Loading: 0 packages loaded Loading: 1 packages loaded currently loading: foo/bar/baz ... (96 packages) Loading: 255 packages loaded ERROR: infinite symlink expansion detected [start of symlink chain] /home/koen.lekkerkerker/my_project/build/my_project/build /home/koen.lekkerkerker/.cache/bazel/_bazel_koen.lekkerkerker/20de9d54ae8f5a71cb5df6e40713bd6d/execroot/project_ws/build /home/koen.lekkerkerker/my_project/build [end of symlink chain] ERROR: Failed to get information about path, for build/my_project/build, skipping: Infinite symlink expansion ERROR: Infinite symlink expansion Loading: 255 packages loaded INFO: Build Event Protocol files produced successfully. Loading: 255 packages loaded
This used to work in the past, I'm not sure when and why it broke...
Running that same command in a regular terminal from the root of my bazel workspace (root of git clone, with the WORKSPACE file) gives the same errror:
# note: I'm using zsh
$ bazel --output_base=/tmp/20de9d54ae8f5a71cb5df6e40713bd6d query "...:*" --output=package
ERROR: infinite symlink expansion detected
[start of symlink chain]
/home/koen.lekkerkerker/my_project/build/my_project/build
/home/koen.lekkerkerker/.cache/bazel/_bazel_koen.lekkerkerker/20de9d54ae8f5a71cb5df6e40713bd6d/execroot/project_ws/build
/home/koen.lekkerkerker/my_project/build
[end of symlink chain]
ERROR: Failed to get information about path, for build/my_project/build, skipping: Infinite symlink expansion
ERROR: Infinite symlink expansion
Loading: 0 packages loaded
Loading: 0 packages loaded
I'm surprised to see the triple dot ... in that command. Why would it look 1 level up?
My setup:
- vs code 1.59.0 on macos (latest version at the moment of writing)
- Connected to ubuntu 18.04 using remote ssh plugin.
- My vscode remote ssh session is a folder workspace with the root being top-level of my git clone, which also has the WORKSPACE file.
- buildifier version 4.0.1, scm revision: f2aed9ee205d62d45c55cfabbfd26342f8526862
- vscode-bazel v0.4.1 (latest version at the moment of writing)
Interestingly, the codelens targets show up fine (only after I run "Refresh Bazel Build Targets"), but I need the Bazel Build Targets in the left to use the Starlark debugger. I've also tried "Build Target with Starlark Debugger", but that also fails (I don't get a very descriptive error in that case, but I assume it has a similar underlying cause).