fix: add tree-sitter-sql to base dependencies#1494
Open
GAURAV-1313 wants to merge 1 commit into
Open
Conversation
SQL files are classified as code (CODE_EXTENSIONS) and extract_sql() is registered in the dispatch table, but tree-sitter-sql was only in the [sql] optional extra. This meant .sql files extracted 0 nodes for default installs — they were invisible to the graph. tree-sitter-sql is a small, stable C extension (~341KB). extract_sql() already has an ImportError guard. All 9 SQL tests pass. Full test suite (2440 tests) has no regressions. Closes Graphify-Labs#1383
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.
Adds
tree-sitter-sqlto base dependencies so.sqlfiles are extracted via AST.What it extracts
Tables (
CREATE TABLE), views (CREATE VIEW), functions (CREATE FUNCTION), column definitions, primary keys, foreign keys (REFERENCES),ALTER TABLE ... ADD FOREIGN KEY, and schema-qualified names (Sales.Customer).Edges emitted
containsreferencesREFERENCES)reads_fromSELECTChanges
pyproject.toml—tree-sitter-sql>=0.3,<0.4added to basedependenciesuv.lock— updated withtree-sitter-sql==0.3.11Before
SQL files were classified as
code(.sqlwas already inCODE_EXTENSIONS) andextract_sql()was registered in the dispatch table (line 12790), buttree-sitter-sqlwas only in the[sql]optional extra. Default installs (uv tool install graphifyy) had 0 nodes extracted from.sqlfiles — they were invisible to the graph.After
tree-sitter-sqlis installed by default. All 9 SQL tests pass. Full test suite (2440 tests) has no regressions.Closes #1383