Skip to content

fix: skip invalid repo-map tree-sitter queries#5138

Open
pragnyanramtha wants to merge 1 commit into
Aider-AI:mainfrom
pragnyanramtha:codex/skip-invalid-repomap-query
Open

fix: skip invalid repo-map tree-sitter queries#5138
pragnyanramtha wants to merge 1 commit into
Aider-AI:mainfrom
pragnyanramtha:codex/skip-invalid-repomap-query

Conversation

@pragnyanramtha
Copy link
Copy Markdown

Summary

  • catch tree-sitter QueryError while running repo-map tag queries
  • keep affected files in the repo map as filename-only entries instead of crashing
  • add a regression test that forces an invalid tags query

Motivation

A bundled tags query can drift out of sync with the installed tree-sitter grammar. Julia files currently hit this path with Invalid node type ... module, which aborts repo-map generation before Aider can answer the next prompt.

Fixes #4867
Fixes #4888

Validation

  • .venv/bin/python -m pytest tests/basic/test_repomap.py::TestRepoMap::test_get_repo_map_skips_invalid_tree_sitter_query -q
  • .venv/bin/python -m pytest tests/basic/test_repomap.py -q
  • .venv/bin/pre-commit run --files aider/repomap.py tests/basic/test_repomap.py
  • git diff --check
  • manual hello.jl repo-map smoke test now returns hello.jl instead of raising tree_sitter.QueryError

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 16, 2026

CLA assistant check
All committers have signed the CLA.

@pragnyanramtha pragnyanramtha marked this pull request as ready for review May 16, 2026 19:00
Copilot AI review requested due to automatic review settings May 16, 2026 19:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

Uncaught QueryError in repomap.py line 302 Julia crashes aider

3 participants