The workspace root is implicitly an import root

This commit is contained in:
Reid 'arrdem' McKenzie 2021-08-12 14:11:48 -06:00
parent 2f7295ba9e
commit 69fb81e317

View file

@ -73,6 +73,9 @@ def _zapp_impl(ctx):
# Find the list of directories to add to sys # Find the list of directories to add to sys
import_roots = [ import_roots = [
r for r in ctx.attr.src[PyInfo].imports.to_list() r for r in ctx.attr.src[PyInfo].imports.to_list()
] + [
# The workspace root is implicitly an import root
ctx.workspace_name
] ]
for r0 in import_roots: for r0 in import_roots: