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
fix: iterate barrel re-parse discovery to stop dropping chained-barrel edges
Closes#1174
Stage 6b's barrel candidate discovery was single-pass: it only looked at
the originally changed files' imports. When a hybrid barrel (file with
≥1 reexport + many local defs, e.g. src/domain/parser.ts) was re-parsed,
its outgoing edges were wiped — but the barrel-through edges from that
barrel to leaf files (via a second-level barrel like src/extractors/
index.ts) could not be re-emitted because the second barrel was never
loaded into file_symbols. Result: 32 imports edges (native) / 37 (WASM)
silently dropped per incremental rebuild, and they never came back
without --no-incremental.
The Rust orchestrator and the JS WASM-fallback pipeline now iterate the
barrel-candidate discovery until file_symbols is stable. JS-side, three
related defects were exposed once parser.ts started being processed
correctly:
* reparseBarrelFiles was marking every re-parsed file as barrel-only
even when it was a hybrid (the isBarrelFile heuristic returns true
for reexports >= ownDefs); only mark the actual barrel-only files.
* build-edges' lazy fallback queried kind != 'file', broader than
the upfront load's specific definition kinds, leaking parameters
and properties into call resolution.
* resolve-imports' delete-outgoing-edges had no kind filter, wiping
contains/parameter_of that insertNodes only emits for changed
files — aligned with the Rust orchestrator's filter.
Verification on the dogfooded repo: full=1371, incremental=1371 imports
edges on both engines (was -32 / -37 on main). Every edge kind is
identical between full and incremental on the native engine; only minor
imports-type / contains stragglers remain on WASM (separate concerns).
Regression test parameterized over both engines:
tests/integration/issue-1174-chained-barrel-incremental.test.ts.
0 commit comments