Skip to content

.sql files skipped as "tree_sitter_sql not installed" while the module loads and parses fine #2602

Closed

Description

.sql files are skipped with "tree_sitter_sql not installed" while the module is installed and parses fine — and the suggested fix is a no-op.

What happens

Indexing a repo that contains .sql files prints:

warning: 32 .sql file(s) contributed nothing to the graph because a dependency is
missing: tree_sitter_sql not installed. Install it with: pip install "graphifyy[sql]" (#1745)

The suggested command is a no-op — the dependency is already there:

Requirement already satisfied: tree-sitter-sql in .../site-packages (from graphifyy[sql]) (0.3.11)

The module is not just importable, it works

Run with the same interpreter graphify uses:

import tree_sitter, tree_sitter_sql
lang = tree_sitter.Language(tree_sitter_sql.language())
tree = tree_sitter.Parser(lang).parse(b'SELECT 1;')
print(tree.root_node.type)   # -> program

The language loads and parses SQL. The warning still fires on the next run.

Not a subprocess/environment issue either

My first hypothesis was that the AST workers don't inherit the environment, since
extraction runs with [8 workers]. Ruled out — the warning is identical with:

graphify <path> --update --max-workers 1 --max-concurrency 1

Why the message matters beyond the missing files

The wording sends you to install something that is already installed, so the natural
reaction is "done, fixed" and moving on. In my case the repo is a financial system whose
core is its SQL migrations (row-level security, SECURITY DEFINER functions, CHECK
constraints). The resulting graph describes the application and silently omits the layer
where the security lives — and the consumers of that graph are agents, which have no way
to know half the system is missing.

A message like "SQL grammar found but failed to load: <actual exception>" would have
saved the whole investigation.

Environment

  • graphifyy 0.8.39
  • tree-sitter-sql 0.3.11
  • Python 3.14 (Windows)
  • Backend: ollama (local)

Happy to run any diagnostic that would help pin down where the detection fails — I can
reproduce it on demand.

Activity

  1. safishamsi commented on Aug 13, 2026

    @safishamsi
    Member

    Fixed in v0.9.42 (graphifyy==0.9.42 on PyPI). A .sql file that fails to parse with tree-sitter-sql installed-but-broken now reports the real load failure instead of the misleading "not installed" message. Thanks @ousamabenyounes (PR #2686).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions