vscode-bazel
vscode-bazel copied to clipboard
how to specify my python path ?
i encounter a python problem:
ERROR: error loading package 'bazel-stage1/external/bazel_tools/third_party/def_parser': Label '//tools/python:private/defs.bzl' is invalid because 'tools/python' is not a package; perhaps you meant to put the colon here: '//:tools/python/private/defs.bzl'?
and i try this
it's not working
I am having the same error. And, I don't think that it's not coming from the python lib path.
If you copy and paste the command that failed in my case. bazel --output_base=/var/folders/ys/superlongpath query ...:* --output=package, I can reproduce the error.
The funny thing is when I open the project github.com/bazelbuild/rules_go.git the extension works well and there's no python there.
So, obviously something is missing. I will try to see what's missing in my VS project to make it work and I will let you know.
OK, FINALLY, I found a workaround that works for me
Please, go to your visual code setting and remove Bazel:Queries share folder. For some reason using an output_base makes bazel query ...:* fail which is so strange
is it because I am using Bazelisk?
bazel version Bazelisk version: 1.6.1 Build label: 3.5.0 Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Wed Sep 2 20:16:21 2020 (1599077781) Build timestamp: 1599077781
Anyway, I leave that to the vscode-bazel team.
OK, FINALLY, I found a workaround that works for me
Please, go to your visual code setting and remove Bazel:Queries share folder. For some reason using an output_base makes bazel query ...:* fail which is so strange
is it because I am using Bazelisk?
bazel version Bazelisk version: 1.6.1 Build label: 3.5.0 Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Wed Sep 2 20:16:21 2020 (1599077781) Build timestamp: 1599077781Anyway, I leave that to the vscode-bazel team.
@bbourbie
i could't use the vscode-bazel all the time ;did you try xcode or clion , i tried the xcode's external building and clion's custom build target, i could't debug the program by gdb or lldb

No, sorry, I only use VSCode and I don't use any debugger.
This is a duplicate of this issue AFAICT
https://github.com/bazelbuild/vscode-bazel/issues/216
Try this, it worked for me: https://github.com/bazelbuild/bazel/issues/10653#issuecomment-694230015
You'll need to ensure you name your workspace. To do that put workspace(name="UNIQUE_NAME_HERE") at the top of your projects WORKSPACE file.
Duplicate of #216