Skip to content

.sql files silently extract 0 nodes when the [sql] extra is missing #1745

Closed

Description

@bbqboogiedwonsen

Summary

When the [sql] extra is not installed, .sql files are counted as code and scanned, but silently produce 0 nodes — no warning, no error. The graph looks successfully built while the entire SQL corpus is missing.

Environment

  • graphifyy 0.9.7 (pipx), Python 3.14.5, macOS (arm64)

Reproduction

pipx install graphifyy            # note: no [sql] extra
graphify extract <dir-with-213-sql-files> --no-cluster

Output reports found 227 code, 0 docs, ... and writes a graph — but it contains only the non-SQL nodes (in our case a handful of TypeScript files). The per-file zero-node warning (#1666-style) listed only 2 JSON files; the 213 .sql files vanished without a trace.

After pipx install --force "graphifyy[sql]" the exact same command extracts tables, FK references and triggers correctly (single test file: 12 nodes / 35 edges).

Expected

Either a hard gate like the existing LLM-key check ("A code-only corpus needs no key") — e.g. "N .sql files need the [sql] extra: pip install 'graphifyy[sql]'" — or at minimum, the .sql files should appear in the zero-node warning list.

Impact

Users reasonably believe their database corpus is indexed when it isn't; we lost an evaluation pass to this before finding the extra by searching the README.

Activity

  1. ZubairAli999 commented on Jul 9, 2026

    @ZubairAli999

    Problem: Graphify detects .sql files but silently skips them when the graphifyy[sql] extra isn't installed. The graph is generated successfully, making users believe their SQL schema was indexed.

    Recommended fix: Before extraction, detect .sql files and check whether SQL support is installed. If it's missing, show a clear error or warning such as:

    Found 213 SQL files, but SQL support is not installed.
    
    Install it with:
    
    pip install "graphifyy[sql]"
    

    If extraction should continue, at least include all skipped .sql files in the existing "0 nodes extracted" warning instead of silently ignoring them. This approach prevents silent data loss and provides a much better user experience.

    If you need any further assistance, feel free to reach out. I'm happy to help.

  2. safishamsi commented on Jul 9, 2026

    @safishamsi
    Member

    Fixed on v8 in 8b7ffc5 (credited to @rithyKabir from #1750), shipping in 0.9.12. extract() now surfaces files that skipped extraction due to a missing optional dependency, grouped by extension and naming the extra (e.g. pip install "graphifyy[sql]"). Your 213 .sql files would now print a warning instead of vanishing silently. Thanks for the clear report.

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