Harden indexing for large Node.js repositories - #8
Merged
Merged
Conversation
Tree-sitter requires CGo, but CI cross-compiles with CGO_ENABLED=0. Add //go:build cgo tags to all tree-sitter adapter files and split the parser registry into build-tagged variants: - registry_cgo.go: uses tree-sitter parsers (full AST parsing) - registry_nocgo.go: uses heuristic/regex parsers (fallback) Both modes build and pass all tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep the release matrix from canceling after the first failure and print build context before cross-compiling. This makes it easier to diagnose the Linux tar.gz failure and observe the remaining targets in CI.
- add hardcoded always-skip safeguards for heavy generated/tooling dirs (.git, node_modules, .next, .nuxt, .svelte-kit, .turbo, .pnpm-store, .yarn, .parcel-cache) - move dist/build/coverage/out/.cache to config-default excludes only - remove file-count guardrail in favor of early skip policy - clarify that .codegraphignore negation patterns do not override hardcoded skips - verify dynamic SQL path filtering remains bounded and safe - update tests for refined skip behavior
There was a problem hiding this comment.
Code Review
This pull request introduces conditional compilation for the parser registry, separating tree-sitter (CGO) from heuristic and native parsers (non-CGO). It also expands the default excluded directories list to include common web development and build artifacts like .next, .turbo, and .yarn. Feedback identifies dead code in the shouldSkipDir function due to the order of checks for dot-prefixed directories and recommends centralizing the duplicated list of excluded directories into a single constant to improve maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve indexing stability for large Node.js repositories.
Changes
.git,node_modules,.next,.nuxt,.svelte-kit,.turbo,.pnpm-store,.yarn,.parcel-cachedist,build,coverage,out,.cacheas config-default excludes only.codegraphignorenegation patterns do not override hardcoded skipsWhy
Large JS repos often include massive dependency/build trees that are not useful to index and can cause downstream SQLite complexity issues.
Result
More stable indexing, less unnecessary traversal, and a cleaner skip policy for modern Node.js repos.