fix(ui): show synthesis as a 'Linking dynamic dispatch' phase; mute node:sqlite warning spam (#1299)
Two first-run UX bugs surfaced by indexing a real 1,342-file C repo: 1. After 'Resolving refs' hit 100%, the ~40 dynamic-dispatch synthesis passes ran with no progress surface, so the bar sat frozen at 100% long enough to read as a hang (the C fn-pointer pass alone can hold for a while on C-heavy repos). Synthesis now reports per-pass progress through a new 'linking' IndexProgress phase, rendered as 'Linking dynamic dispatch'. The step total is pinned by a test to the synthesizer's actual __mark() count so adding a pass without bumping it fails loudly. 2. node:sqlite's ExperimentalWarning is emitted once per THREAD, so the main process plus every parse worker printed it mid-index, interleaved with the progress UI. All launch paths now pass --disable-warning=ExperimentalWarning: both bundle launchers, the Windows npm-shim invocation, and the CLI self-relaunch (NODE_RUNTIME_FLAGS, deliberately excluded from the re-exec gate so an older installed launcher never triggers a pointless re-exec, and version-gated off nodes older than the flag). Verified end-to-end on the same repo: zero warnings, live linking bar, byte-identical graph (50,520 nodes / 148,232 edges). Full suite green. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,7 @@ rm -f "$STAGE/lib/package-lock.json"
|
||||
# runs are covered too; passing it here avoids that extra spawn.)
|
||||
if [ "$OSFAM" = "win32" ]; then
|
||||
cp "$NODE_BIN" "$STAGE/node.exe"
|
||||
printf '@"%%~dp0..\\node.exe" --liftoff-only "%%~dp0..\\lib\\dist\\bin\\codegraph.js" %%*\r\n' \
|
||||
printf '@"%%~dp0..\\node.exe" --liftoff-only --disable-warning=ExperimentalWarning "%%~dp0..\\lib\\dist\\bin\\codegraph.js" %%*\r\n' \
|
||||
> "$STAGE/bin/codegraph.cmd"
|
||||
else
|
||||
cp "$NODE_BIN" "$STAGE/node"
|
||||
@@ -104,7 +104,9 @@ DIR="$(cd "$(dirname "$SELF")/.." && pwd)"
|
||||
CODEGRAPH_HOST_PPID="${CODEGRAPH_HOST_PPID:-$PPID}"
|
||||
export CODEGRAPH_HOST_PPID
|
||||
# --liftoff-only: avoid the V8 turboshaft WASM Zone OOM (issues #293/#298).
|
||||
exec "$DIR/node" --liftoff-only "$DIR/lib/dist/bin/codegraph.js" "$@"
|
||||
# --disable-warning=ExperimentalWarning: mute node:sqlite's per-thread
|
||||
# "experimental feature" warning that otherwise interleaves with the progress UI.
|
||||
exec "$DIR/node" --liftoff-only --disable-warning=ExperimentalWarning "$DIR/lib/dist/bin/codegraph.js" "$@"
|
||||
LAUNCH
|
||||
chmod +x "$STAGE/bin/codegraph"
|
||||
fi
|
||||
|
||||
+5
-1
@@ -98,8 +98,12 @@ function launcherIn(dir) {
|
||||
// --liftoff-only keeps tree-sitter's WASM grammars off V8's turboshaft tier to
|
||||
// avoid the Zone OOM on Node >= 22 (issues #293/#298). The unix bin/codegraph
|
||||
// launcher already passes it; on Windows we invoke node.exe directly so add it.
|
||||
// --disable-warning=ExperimentalWarning mutes node:sqlite's per-thread
|
||||
// "experimental feature" warning, which otherwise prints once per parse worker
|
||||
// mid-index, shredding the progress UI. The bundled node.exe is always new
|
||||
// enough for both flags.
|
||||
function liftoff(entry) {
|
||||
return ['--liftoff-only', entry].concat(process.argv.slice(2));
|
||||
return ['--liftoff-only', '--disable-warning=ExperimentalWarning', entry].concat(process.argv.slice(2));
|
||||
}
|
||||
|
||||
// Download + cache the platform bundle from GitHub Releases. Returns
|
||||
|
||||
Reference in New Issue
Block a user