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
{{ message }}
Repository navigation
bug: imports attr misdocumented and misinterpretered when venv mode activated #3565
First, the docs say it is a "repo root relative" path -- this is incorrect. It is a target-relative path. i.e. //foo:bar setting . means add $repo/foo to sys.path. This is evident from reading the code, it essentially does:
join(main_repo, runfiles_short_path(ctx.label), imports_attr_value), e.g. join("_main", "../+somerepo/foo", ".")
Second, when the experimental_venvs_site_packages setting is enabled, py_library treats the value as a repo-relative path, not a target-relative path.
This makes using the same imports value unnecessarily difficult.
Activity
docs: doc the imports attribute as a target-relative path (#3571)
fix: make imports attribute target-relative for venv mode (#3572)
docs: doc the imports attribute as a target-relative path (bazel-cont…
fix: make imports attribute target-relative for venv mode (bazel-cont…