-
-
Notifications
You must be signed in to change notification settings - Fork 660
Open
Copy link
Labels
core-rulesIssues concerning core bin/test/lib rulesIssues concerning core bin/test/lib rulestype: bug
Description
There are two bugs with the imports attribute:
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.
To fix:
- Fix docs
- Change py_library to treat it as target-relative
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
core-rulesIssues concerning core bin/test/lib rulesIssues concerning core bin/test/lib rulestype: bug