You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e87c96
Browse filesBrowse the repository at this point in the historyBrowse files
feat(native): report SQL test and scenario errors natively (#1046)
Scenario extraction, scope relationship scans and macro-test CTE scans
return Python's exact scanner and classification errors from one native
port of Python's top-level CTE scanner, under the adapter's lexical rules.
Scenario source checks no longer fall back to Python on a reference
error. Only Polyglot steps and non-ASCII classification still run in
Python.
Copy file name to clipboardExpand all lines: crates/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ that can be tested and benchmarked with `cargo test` alone.
11
11
|`sqlbuild-sqltext`| Lexical SQL text without polyglot: comment, quote and parenthesis scanning, the rules quote policy, model header tokenization and matching, static variable substitution, static reference extraction, and the general reference scan with table-function call arguments under each adapter's lexical rules. |
12
12
|`sqlbuild-config`| Configuration file reading without Python: `tomllib`-compatible TOML, PyYAML `safe_load`-compatible YAML 1.1, and typed project and local config readers for the fields discovery needs. Errors carry their kind and position; YAML outside the supported subset is an `Unsupported` error. |
13
13
|`sqlbuild-discovery`| Native project discovery and the only implementation of the model, SQL test, scenario, source and schema file collections and the declaration layout: the shared directory walk with Python's glob and sort semantics, file reading with Python's newline handling and read errors, and parsing of authored files with Python's exact discovery messages. Results are plain data the Python discovery facade materialises. |
14
-
|`sqlbuild-scopes`| Declaration scopes: the scope index with Python's record orders and diagnostics, declaration visibility, relationship grants, the scope lookup groups, and the dialect-aware scan of SQL tests and scenarios for their expected models. Anything it cannot reproduce exactly defers to Python. |
14
+
|`sqlbuild-scopes`| Declaration scopes: the scope index with Python's record orders and diagnostics, declaration visibility, relationship grants, the scope lookup groups, and the dialect-aware scan of SQL tests and scenarios for their expected models and top-level CTEs, with Python's scanner errors. Anything it cannot reproduce exactly defers to Python. |
15
15
|`sqlbuild-model-config`| Model configuration: MODEL header columns and audits, `${...}` template expansion with its environment and context reads, and the template and macro presence scans over authored config values, all read through a trait over the caller's values. Anything it cannot reproduce exactly defers to Python, which also raises every model config error. |
16
16
|`sqlbuild-render`| Native rendering: the macro call scanner (a byte-for-byte port of Python's), splicing of rendered calls with code-point spans, and the in-compile memo of recorded macro calls and their replayable events, which can carry results across compiles through the shared native store. Anything it cannot reproduce exactly defers to Python. |
17
17
|`sqlbuild-attachments`| Compile attachments for tests, audits, sources, functions, scenarios and seeds: attached generic audit argument merge, raw and quoted argument rendering, and severity and run scope resolution. Anything it cannot reproduce exactly defers to Python, which also raises every attachment error. |
18
-
|`sqlbuild-analysis`| SQL analysis over polyglot: SQL tokens, query analysis, the binding catalog, semantic validation and usage, column references, type normalization, and SQL-test extraction, planning and rendering. Type normalization defers to Python for anything it cannot reproduce exactly. |
18
+
|`sqlbuild-analysis`| SQL analysis over polyglot: SQL tokens, query analysis, the binding catalog, semantic validation and usage, column references, type normalization, and SQL-test and scenario extraction, planning and rendering. Type normalization defers to Python for anything it cannot reproduce exactly. |
19
19
|`sqlbuild-rules`| Built-in rules and the rules engine, the custom-rule host, SQL lint, quality checks and formatting, rules configuration and the request models. It also owns the build identity script. |
20
20
|`sqlbuild-python`| The only PyO3 crate: the `_native` module, its Python classes and functions, conversions from Python objects, and the process allocator. |
21
21
@@ -31,7 +31,7 @@ sqlbuild-python
31
31
```
32
32
33
33
`sqlbuild-config` and `sqlbuild-model-config` do not depend on the crates below them today, and
34
-
`sqlbuild-scopes` uses only `sqlbuild-sqltext`; their place in the order fixes which crates may
34
+
`sqlbuild-scopes` uses only `sqlbuild-sqltext` and `sqlbuild-core`; their place in the order fixes which crates may
35
35
use them. The JSON emitter
36
36
lives in `sqlbuild-core` so that any layer can produce text that must equal Python's
0 commit comments