-
-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Description
Hello,
When the files of a module are not all in the same directory, then one seem to shadow the others even with correct "imports" arguments.
For example, in this structure, sub1 and sub2 are meant to be abstracted by the import, and the full my_module module is expected to have both a.py and b.py. However, only one of those can be used at the same time.
- sub1: BUILD.bazel (py_library with "imports = ["sub1"])
- sub1/my_module: a.py
- sub2: BUILD.bazel (py_library with "imports = ["sub2"])
- sub2/my_module: b.py
Basic reproduction here.
bazel run //:mainfails with missing module- However, if I set the PYTHONPATH to "sub1;sub2" (or "sub1:sub2" on Linux),
python main.pysucceeds. - If I remove the dependency and import to
//sub1:athen it works - If I remove the dependency and import to
//sub2:bthen it works
Bazel version: 3.0.0 and 3.3.0
OS: Seen on Windows 10 and Linux
Rules version: 0.0.2
Python version: Python 3.7.6 and 3.6.3
Actual use case: Mixing generated and non generated files, or generated rules putting the files in a subfolder like with this code generation: rules_proto_grpc
Metadata
Metadata
Assignees
Labels
No labels