Skip to content

[Bug]: incremental update keeps an unchanged importer's imports/calls edges on the old module after its JS/TS barrel re-exports from another one #5632

In progress

Description

@0xkaushik-ai

Pre-flight checks

  • I have checked the Troubleshooting section in the README

What happened?

When a JS/TS barrel is edited to re-export from a different module, an incremental update leaves the unchanged files that import through it on the old module. They keep EXTRACTED imports and calls edges a full build of the same tree does not have.

The edges belong to app.ts (their source_file), but only the barrel is re-extracted. Nothing re-resolves app.ts, and lib_x_x still exists, so the old edges never dangle and are kept.

It also happens through a second barrel (api.ts: export * from './lib', app.ts importing from ./api). The Python equivalent (lib/__init__.py switching from lib.x to lib.z) matches a full build.

Steps to reproduce

mkdir -p p/lib && cd p
echo "export function x() { return 1; }" > lib/x.ts
echo "export function x() { return 9; }" > lib/z.ts
echo "export * from './x';" > lib/index.ts
printf "import { x } from './lib';\nexport function main() { return x(); }\n" > app.ts
graphify update .
echo "export * from './z';" > lib/index.ts
graphify update .

Then compare with a fresh graphify update . of the same tree. A repeated graphify extract . --code-only --no-cluster behaves the same.

Error output or graph output

update:     app -> lib_x_x imports EXTRACTED,  app_main -> lib_x_x calls EXTRACTED
full build: app -> lib_z_x imports EXTRACTED,  app_main -> lib_z_x calls EXTRACTED

Graphify version

0.9.123 (v8 5d962d2d)

Operating System

Linux

Python Version

3.12.13

Installation Method

From source (uv sync --all-extras on v8)

Activity

  1. github-actions commented on Nov 29, 2026

    @github-actions

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions