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
sync: retargeting a barrel's re-export (export { foo } from './a' -> './b') leaves importers on the old module #2978
When a barrel's re-export points at a different module, sync() leaves the importers bound to the old module.
// a.ts export function foo(){ return 1 }// b.ts export function foo(){ return 2 }// index.ts export { foo } from './a';// c.ts import { foo } from './index'; export function bar(){ return foo(); }
Index, change index.ts to export { foo } from './b';, then sync().
bar calls
after sync()
a.ts:foo ✗
fresh index
b.ts:foo
A reviewer run also found that export * from retargeted the same way and a scoped (watcher) sync behave the same, while a Python __init__.py re-export retarget converges. I re-ran only the named-re-export case above.
Reproduced on main at 77ee348, Linux/WSL2, Node 22.23.2, CODEGRAPH_KERNEL=0.
#2744 and #2665 cover a barrel that gains a name. Here an export that already resolved changes its source. Since c.ts didn't change and index.ts declares nothing that c.ts's edge targets, nothing marks c.ts's import for re-resolution.
Expected. When a file's re-export clauses change, re-resolve the references in files that import through it, as the gained-name case already does.
Fixed by #3059 (from @danusha2345's #2985): codegraph sync and the file watcher now re-link the files importing through a barrel when one of its re-exports is pointed at another module, moved with export *, taken away, or loses a name. It's on main and ships in the next release. Thanks @inth3shadows for the clear report!
Activity
colbymchenry commentedon Oct 30, 2026
Fixed by #3059 (from @danusha2345's #2985):
codegraph syncand the file watcher now re-link the files importing through a barrel when one of its re-exports is pointed at another module, moved withexport *, taken away, or loses a name. It's on main and ships in the next release. Thanks @inth3shadows for the clear report!fix(sync): a barrel whose re-export points elsewhere re-links its imp…