index: fix index entries for partial import stages

This commit is contained in:
Peter Rowlands
2023-02-08 15:34:15 +09:00
committed by Peter Rowlands (변기호)
parent 676b1e47e9
commit 93c556acdd
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -577,6 +577,8 @@ class Output:
if not dep.obj and dep.files:
dep.obj = dep.get_obj()
entry.obj = dep.obj
if not entry.hash_info and dep.obj:
entry.hash_info = dep.obj.hash_info
return entry
def changed_checksum(self):
+1 -1
View File
@@ -466,7 +466,7 @@ class IndexView:
workspace, key = out.index_key
if filter_info and out.fs.path.isin(filter_info, out.fs_path):
key = key + out.fs.path.relparts(filter_info, out.fs_path)
if out.meta.isdir:
if out.meta.isdir or out.stage.is_import and out.stage.deps[0].meta.isdir:
prefixes[workspace].recursive.add(key)
prefixes[workspace].explicit.update(key[:i] for i in range(len(key), 0, -1))
return prefixes