Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to specify my python path ? #219

Closed
CaichaoGitHub opened this issue Sep 22, 2020 · 6 comments
Closed

how to specify my python path ? #219

CaichaoGitHub opened this issue Sep 22, 2020 · 6 comments

Comments

@CaichaoGitHub
Copy link

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

截屏2020-09-22 下午5 02 20

it's not working

@bbourbie
Copy link

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.

@bbourbie
Copy link

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.

@CaichaoGitHub
Copy link
Author

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.

@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

image
image

@bbourbie
Copy link

No, sorry, I only use VSCode and I don't use any debugger.

@nfisher
Copy link

nfisher commented Oct 7, 2020

This is a duplicate of this issue AFAICT

#216

Try this, it worked for me:
bazelbuild/bazel#10653 (comment)

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.

@cameron-martin
Copy link
Collaborator

Duplicate of #216

@cameron-martin cameron-martin marked this as a duplicate of #216 Jan 23, 2024
@cameron-martin cameron-martin closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants