You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python targets that do not share root with the workspace needs imports = [...] statements added for imports to work correctly. The gazelle plugin supports this through adding # gazelle:python_root directives in BUILD files that are at the root of python trees. This works great for source files in subfolders, they have attributes like imports = ["../.."], added. However the sources files in the root folder itself does not get any imports attribute, while they need to have imports = ["."] to work correctly.
🔬 Minimal Reproduction
🔥 Exception or Error
Target py_binary file fails on run due to missing import.
🐞 bug report
Affected Rule
Gazelle plugin target generation
Is this a regression?
No
Description
python targets that do not share root with the workspace needs
imports = [...]
statements added for imports to work correctly. The gazelle plugin supports this through adding# gazelle:python_root
directives inBUILD
files that are at the root of python trees. This works great for source files in subfolders, they have attributes likeimports = ["../.."],
added. However the sources files in the root folder itself does not get any imports attribute, while they need to haveimports = ["."]
to work correctly.🔬 Minimal Reproduction
🔥 Exception or Error
Target py_binary file fails on run due to missing import.
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: