Uh oh!
There was an error while loading. Please reload this page.
Use real rules_python - #17545
Conversation
47fd43e to
5fcef16CompareInitial motivation was to use py_proto_library from rules_python
11d9548 to
9fd53ebComparemeteorcloudy
commented
Feb 24, 2023
This is great, I guess we can delete https://github.com/bazelbuild/bazel/tree/master/third_party/rules_python after merging this one? |
comius
commented
Feb 24, 2023
Hey, @meteorcloudy, Fails: Succeeds: |
It doesn't look like a caching issue, did you try to reproduce in the docker container? This is also failing on other platforms without RBE enabled |
meteorcloudy
commented
Feb 24, 2023
I can reproduce the issue in the docker container ( |
meteorcloudy
commented
Feb 24, 2023
I guess this is because I do have the protobuf pip package installed on my workstation, but not in the docker container: |
meteorcloudy
commented
Feb 24, 2023
Do we expect users to have protobuf pip package preinstalled when using py_proto_library? |
ted-xie
commented
Feb 24, 2023
android-related changes LGTM (just //tools/python -> @rules_python replacement for tools/android/BUILD and tools/android/BUILD.tools). As long as presubmit passes then it should be fine. |
rickeylev
commented
Feb 24, 2023
No, that's a bug that was fixed but hasn't been released yet (see bazel-contrib/rules_python#1046). I'll do a 0.19 release Monday. To workaround it in the meantime...I'm not sure there's an easy way in the mock environment. The files are there in runfiles, the path to them just has to get onto sys.path. So either manually modify sys.path at runtime, or, maybe manually depend on the proto repo's py_library target (the bug causing the missing sys.path entry is in py_proto_library, so anything coming through that won't propagate the necessary sys.path entry) |
comius
commented
Feb 24, 2023
Thank @meteorcloudy for the analysis, it saved my day! I found out there is a bug, in py_proto_library. I worked around it and submitted a patch to rules_python. (bazel-contrib/rules_python#1091) |
comius
commented
Feb 24, 2023
Ups, I missed comment from @rickeylev. My fix is not actually needed. |
sgowroji
commented
Feb 27, 2023
Hi @comius, Could you please guide, Whether to import third-party changes first or the other changes in the CL. Thanks! |
comius
commented
Feb 27, 2023
Hey, I didn't realize before, but the import is more complex than I thought. I'll prepare separate parts for it. |
The file was removed in Bazel@HEAD in bazelbuild/bazel#17545 Addresses: bazelbuild/bazel#17874
Since bazelbuild/bazel#17545, bazel_tools apparantly requires rules_python and rules_proto to successfully parse under bazel (load lines only). We only use affected bazel_tools (src/main/protobuf) in persistentworkers. Import these repositories to reinstate downstream CI passing.
Since bazelbuild/bazel#17545, bazel_tools apparantly requires rules_python and rules_proto to successfully parse under bazel (load lines only). We only use affected bazel_tools (src/main/protobuf) in persistentworkers. Import these repositories to reinstate downstream CI passing. Ignore rules_oss_audit setup and invoke install_deps omitted from it in a generated.bzl (move maven here as well). Relocated all WORKSPACE-scope invocations to deps/defs/generated.
Since bazelbuild/bazel#17545, bazel_tools apparantly requires rules_python and rules_proto to successfully parse under bazel (load lines only). We only use affected bazel_tools (src/main/protobuf) in persistentworkers. Import these repositories to reinstate downstream CI passing. Ignore rules_oss_audit setup and invoke install_deps omitted from it in a generated.bzl (move maven here as well). Relocated all WORKSPACE-scope invocations to deps/defs/generated.
…1173) The file was removed in Bazel@HEAD in bazelbuild/bazel#17545 This fixes failures when using rules_python with Bazel@HEAD. Addresses: bazelbuild/bazel#17874
Initial motivation was to use py_proto_library from rules_python, but then a yak came along. Fixes: bazelbuild#9029Closesbazelbuild#17545. PiperOrigin-RevId: 513834100 Change-Id: I11a99381e1169a9fb7a7a3eaa733ddd348ebac2b
Initial motivation was to use py_proto_library from rules_python, but then a yak came along.
Fixes: #9029