-
Notifications
You must be signed in to change notification settings - Fork 107
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
file '@rules_python//python:repositories.bzl' does not contain symbol 'python_register_toolchains' #160
Comments
Hey Sambhav! That's no good--sorry. We just redid a bunch of python stuff to use Bazel's hermetic python and that might have messed things up. Are you using via bzlmod or WORKSPACE? Could I ask you to make sure you're using the latest commit? And in the meantime, to unblock you, could you hop on back to f41ec09 to make sure things work? |
Also, I see Stanford in your username and am smiling :) (I'm a Stanford grad.) |
Hmm, was just running some tests to try to narrow this down, but things are working for me with both Bzlmod and WORKSAPCE. Maybe some other dependency is bringing in an old version of rules_python? Maybe try loading this tool first in your WORKSPACE to narrow that down? |
Hey, thanks for the quick response. I'm using the WORKSPACE method. I will try your suggestions and get back shortly. Appreciate it. |
You're right. I was loading hedron_compile_commands towards the end of our WORKSPACE (here). Moving it to before bazel's buildifier definition seems to work around the initial issue with rules_python. I get the following now, which probably means it worked? Excited to try it out! :D
|
Yep! Yay! |
Might be worth poking them to update. This is one of the annoying things pre-bzlmod |
@cpsauer happy to open a separate issue, but wanted to discuss here before doing that:
|
Hello again, Sambhav :) Docker: I think I've heard of folks using it with (e.g. in issues), but I'm afraid I don't have personal experience yet. Would you be down to pioneer it, since you're using firsthand and can experiment and test (and I'm slammed, sorry :/). See the ImplementationReadme.md--it's easy to hack on this repo and test changes live. Missing symbols: Is it that headers aren't being found or that they're the wrong headers (or something else)? A couple possible culprits: (1) If top-level rules are configuring their dependencies, e.g. to cross-compile or put something into the docker container, you'll want to use a refresh_compile_commands rule to list the top level targets you build, like in the readme, rather than :refresh_all. Otherwise things won't be configured correctly, so it might look for the headers in the wrong places. (2) Might they be generated files that haven't been built yet (or are in the docker container)? I'm guessing from the warnings in the log you posted above, but I really don't have enough information yet here. Thanks for sticking with the tool! I know how tricky bazel setup can be! |
Hey Chris. I didn't get a chance to look into the docker issue yet. On the bright side, the missing symbols issue is resolved after adding all the top-level targets to the |
Great! Delighted to hear :) |
Hi, I'm trying to set up clangd on a repo that is built using bazel (https://github.com/cruise-automation/mlir-tcp) and was giving this a shot. However, I get the following error when running
bazel run @hedron_compile_commands//:refresh_all
. Any pointers are appreciated.The text was updated successfully, but these errors were encountered: