Skip to content

Harden indexing for large Node.js repositories - #8

Merged
isink17 merged 4 commits into
masterfrom
node_errors
Apr 16, 2026
Merged

Harden indexing for large Node.js repositories#8
isink17 merged 4 commits into
masterfrom
node_errors

Conversation

@isink17

@isink17 isink17 commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

Improve indexing stability for large Node.js repositories.

Changes

  • hard-skip common heavy generated/tooling directories:
    .git, node_modules, .next, .nuxt, .svelte-kit, .turbo, .pnpm-store, .yarn, .parcel-cache
  • keep dist, build, coverage, out, .cache as config-default excludes only
  • remove the file-count guardrail
  • clarify that .codegraphignore negation patterns do not override hardcoded skips
  • keep/test bounded path-filter behavior

Why

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.

isink17 and others added 3 commits March 27, 2026 22:35
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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread internal/indexer/indexer.go Outdated
Comment thread internal/config/config.go Outdated
Comment thread internal/cli/app.go Outdated
@isink17
isink17 merged commit a0994af into master Apr 16, 2026
3 checks passed
@isink17
isink17 deleted the node_errors branch April 16, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant