Skip to content

feat: build sqlbuild's SQL crates from SQLBabel 0.39.0 - #1735

Queued
kvlonge wants to merge 8 commits into
mainfrom
feat/sqlbabel-rust-crates-2
Queued

kvlonge wants to merge 8 commits into
mainfrom
feat/sqlbabel-rust-crates-2

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Why

sqlbuild's Rust SQL crates (tokenizers, syntax trees, parsers, semantics and fingerprints) still came from an older SQLQuack git pin, while the Python package already installs SQLBabel. Two sources for the same parser can drift apart silently, and sqlclean still pulled SQLQuack into the build.

Changes

  • Build every SQL crate from SQLBabel's v0.39.0 tag, the release pyproject.toml pins, with the same dialect features as before.
  • Move sqlclean to v0.12.3, which reads SQLBabel, so no SQLQuack crate remains in Cargo.lock.
  • Rename the use paths, the stub and the custom-rule docs to SQLBabel.
  • Add make check-sqlbabel-pin, part of check-ci. It fails when a Cargo rev, any locked SQLBabel or SQLQuack crate's source, or the Python pin does not name the same release tag.

Verification

  • cargo check --locked --workspace --all-targets, cargo fmt --check and workspace clippy with -D warnings pass. Native tests for analysis, rules and orchestration pass (orchestration: 351 against a disposable PostgreSQL).
  • The pin check's unit tests cover a crate on another commit or a branch, a missing tag, a range pin, a lock source that still builds SQLQuack or another commit, and a second build of one crate.
  • Same machine, generated DuckShop Scale (2,746 models), release builds of main and this branch, cold compile --no-cache, runs alternating:
    • Compiled SQL: 0 of 3,075 files differ; compile JSON is identical apart from timings.
    • Diagnostics: 0 and 0 as generated. With SQLCLEAN, SQBRGRAPH, SQBRCONTRACT and SQBRTEST on: 12,572 and 12,572, the same count for every code.
    • Medians of 15 pairs, load 1.3 on 8 cores: wall 2.34 s and 2.34 s, CPU 4.37 s and 4.30 s, peak RSS 407 and 404 MiB.

… match the Python package's release

Not ready: pinned to sqlbabel main (00b2bd31), not the v0.39.0 tag; sqlclean still links
SQLQuack, so the new pin check fails until sqlclean moves too; no compile measurements yet.
Checked locally: sqlbuild-analysis, sqlbuild-rules and sqlbuild-orchestration tests pass
(882), pin check unit tests pass, parse-guard check passes.
…the build

Checked: cargo check of the workspace passes; Cargo.lock has no sqlquack crate
and one sqlbabel source, the v0.39.0 tag; the SQLBabel pin check passes.
@kvlonge
kvlonge disabled auto-merge November 30, 2026 16:05
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 30, 2026
Any commits made after this event will not be merged.
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 30, 2026
…ates-2

# Conflicts:
#	crates/sqlbuild-analysis/src/compiler/_helpers/sql_tests/expected_columns.rs
#	crates/sqlbuild-analysis/src/compiler/tests/test_types.rs
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 30, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
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.

1 participant