-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Found during dogfooding v2.6.32-dev.4f08082
Severity: Medium
Command: codegraph build H:/Vscode/codegraph/.claude/worktrees/swift-jumping-quill
Reproduction
cd /tmp/test-dir
npx codegraph build H:/Vscode/codegraph/.claude/worktrees/swift-jumping-quill --verboseExpected behavior
Build should find and parse 164 files from the target directory, storing graph.db at H:/Vscode/codegraph/.claude/worktrees/swift-jumping-quill/.codegraph/graph.db.
Actual behavior
Build finds 0 files, creates an empty graph.db in the CWD (/tmp/test-dir/.codegraph/graph.db), and reports "No changes detected. Graph is up to date."
Using backslash paths (H:\Vscode\...) works correctly — finds 164 files and stores in the right location.
Root cause
The native engine's file discovery likely doesn't normalize forward-slash POSIX-style paths to Windows paths. When the build dir is passed with forward slashes, path resolution fails silently, causing the build to fall back to CWD or an empty directory.
Suggested fix
Normalize the dir argument in buildGraph() (or in the native engine's file collector) to use path.resolve() before passing to the Rust engine. This would handle both / and \ on Windows.