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

Unable to get bazel 7 py_proto_library example working outside of rules_python dir #1935

Closed
Ryang20718 opened this issue May 31, 2024 · 1 comment · Fixed by #1933
Closed

Comments

@Ryang20718
Copy link

Ryang20718 commented May 31, 2024

🐞 bug report

Affected Rule

Bazel 7.1.2 + rules_python 0.32.2 seems to be unable to import python proto libraries

Description

I've created a minimal repro here https://github.com/Ryang20718/bazel_rules_python_proto/tree/main

git clone https://github.com/Ryang20718/bazel_rules_python_proto.git
cd bazel_rules_python_proto
USE_BAZEL_VERSION=7.1.2 bazelisk test //foxglove:all --noenable_bzlmod --announce_rc -s --sandbox_debug

will result in failures. however, the same exact directory structure inside the example folder of rules_python will succeed

git clone https://github.com/Ryang20718/bazel_rules_python_proto.git
cd bazel_rules_python_proto/rules_python_working/examples/py_proto_library
USE_BAZEL_VERSION=7.1.2 bazelisk test //foxglove:all --noenable_bzlmod --announce_rc -s --sandbox_debug

I've been staring at differences for days, but I'm unsure of what could possibly be the difference?

🌍 Your Environment

Operating System:

ubuntu 20.04

Output of bazel version:
7.1.2
Rules_python version:

0.32.2

@Ryang20718 Ryang20718 changed the title Bazel 7 + Rules_python no longer creating __init__.py files in runfiles_dir Bazel 7 + Rules_python no longer creating __init__.py files in runfiles_dir for python_proto_library Jun 1, 2024
@Ryang20718 Ryang20718 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
@Ryang20718 Ryang20718 changed the title Bazel 7 + Rules_python no longer creating __init__.py files in runfiles_dir for python_proto_library Unable to get bazel 7 py_proto_library example working outside of rules_python dir Jun 1, 2024
@Ryang20718 Ryang20718 reopened this Jun 1, 2024
@aignas
Copy link
Collaborator

aignas commented Jun 2, 2024

Given #1933 and the proto rules moving out of the rules_python repo, I think the best course of action would be to look at the new home. And see how to get the new version of the py proto rule warking.

github-merge-queue bot pushed a commit that referenced this issue Jun 5, 2024
Protobuf team is taking ownership of `py_proto_library` and the
implementation was moved to protobuf repository.

Remove py_proto_library from rules_python, to prevent divergent
implementations.

Make a redirect with a deprecation warning, so that this doesn't break
any users.

Expected side effect of this change is also that the protobuf version is
sufficiently updated that there is no more use of legacy struct
providers.

Closes #1935 
Closes #1924 
Closes #1925 
Closes #1703 
Closes #1707 
Closes #1597 
Closes #1293 
Closes #1080
Fixes #1438
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

Successfully merging a pull request may close this issue.

2 participants