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]: incremental update drops an importer's edge to a deleted file instead of leaving the unresolved-import placeholder #5633
I have checked the Troubleshooting section in the README
What happened?
After deleting a file that an unchanged file imports, an incremental rebuild drops the importer's edges into it, because they dangle. A full build of the same tree keeps the broken import visible: an unresolved-import placeholder node and the importer's edge to it.
Seen in Python, TypeScript (also through an export * barrel) and C. Related to #5544, which is the same loss for import() on the graphify extract path.
Steps to reproduce
mkdir p &&cd p
printf'def f():\n return 1\n'> a.py
printf'from a import f\n\ndef g():\n return f()\n'> b.py
graphify update .
rm a.py
graphify update .
Then compare with a fresh graphify update . of the same tree.
Error output or graph output
nodes, update: b, b_g
nodes, full build: a, b, b_g
only in full build: b -> a imports_from
TypeScript: deleting m.ts imported by n.ts loses ref_m and n -> ref_m.
Barrel: deleting lib/x.ts behind lib/index.ts (export * from './x') loses lib_index -> ref_x, the unresolved_reexport_* node and app -> lib_index_x.
C: deleting foo.h loses main -> foo (imports).
For reference, #5635 (opened earlier, linked with "Fixes #5633") already covers this one: it re-extracts the unchanged importers of a deleted file so they keep the unresolved-import placeholder a full build has, on both update and extract. It also handles the reverse case from #5631 (adding a file an unchanged importer was waiting on), with 8 regression tests comparing each incremental build against a full build.
Happy for the maintainers to pick whichever approach fits best. @Aadithya-kl, thanks for jumping on it too; if anything in #5638 covers a case #5635 misses, I'd be glad to fold it in.
Activity
github-actions commentedon Nov 29, 2026
Thanks for opening this issue, @0xkaushik-ai. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
Aadithya-kl commentedon Nov 29, 2026
Opened a PR for this: #5638
0xkaushik-ai commentedon Nov 30, 2026
For reference, #5635 (opened earlier, linked with "Fixes #5633") already covers this one: it re-extracts the unchanged importers of a deleted file so they keep the unresolved-import placeholder a full build has, on both
updateandextract. It also handles the reverse case from #5631 (adding a file an unchanged importer was waiting on), with 8 regression tests comparing each incremental build against a full build.Happy for the maintainers to pick whichever approach fits best. @Aadithya-kl, thanks for jumping on it too; if anything in #5638 covers a case #5635 misses, I'd be glad to fold it in.