Open randomNinja1000 opened 3 months ago
I took at this issue and tried to debug it. It turns out this was already fixed. The fix was 862a4346fa250bbe88876e29101c9d6ac91a922e.
If you update the rules_py in your repro to 0.7.2 or later, it will succeed.
What happened?
It seems with rules_py imports do not "properly cross repos". When a source py_library is defined in a source repo1 and used in a target repo2, the sys.path does not get set up properly.
Version
Development (host) and target OS/architectures:
macos sonoma 14.2.1 M3 chip
Output of
bazel --version
:bazel 7.1.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:bazel_dep(name = "aspect_rules_py", version = "0.7.1") bazel_dep(name = "rules_python", dev_dependency = True, version = "0.31.0")
Language(s) and/or frameworks involved:
python
How to reproduce
Instructions
passes.
passes.
Comment / uncomment the load in repo1/python/BUILD.bazel
now fails and the sys.path does not contain repo1 anymore.
Unfortunately, it seems with rules_py imports do not "properly cross repos".
Any other information?
No response