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 b4620f4
Browse filesBrowse the repository at this point in the historyBrowse files
perf: build the sqb binary and the extension from one set of compiled dependencies (#1179)
* perf: build the crates sqb shares with the extension once
The sqb build resolved several dependency features differently from the
extension build, so Cargo compiled polyglot-sql, sqlbuild-analysis,
sqlbuild-rules and their dependencies twice in every wheel and uv sync.
A new code-free sqlbuild-build-features crate enables the missing features
in the sqb build, and make check-build-features fails when the two builds
drift apart again.
* fix: read cargo tree without colour in the build features check
* ci: let the macOS sqb wheel build reuse the extension's crates
Copy file name to clipboardExpand all lines: crates/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ that can be tested and benchmarked with `cargo test` alone.
6
6
7
7
| Crate | Responsibility |
8
8
|---|---|
9
+
|`sqlbuild-build-features`| No code. Enables, in the `sqb` build, the dependency features the extension build resolves, so Cargo compiles the crates both builds share (polyglot-sql, `sqlbuild-analysis`, `sqlbuild-rules` and the rest) once. `make check-build-features` (part of `make check-ci`) fails when the two builds resolve a shared crate differently and names the features to add. |
9
10
|`sqlbuild-core`| Constants shared by several crates, the panic boundary that turns an unwinding native failure into a named compiler error, passive identity, diagnostic and SQL value types, text positions, a JSON emitter whose output matches Python's `json.dumps` and `orjson` byte for byte, and run-cost allocation with exact Python `decimal` default-context arithmetic and Snowflake query-history SQL. |
10
11
|`sqlbuild-cursor`| Microbatch cursor algebra: typed cursor values, grain flooring and stepping, half-open interval clamping, merging and batch splitting, timestamp text normalization and calendar durations, with Python `datetime` results and errors. Zones other than fixed offsets are resolved through a caller-supplied lookup. |
11
12
|`sqlbuild-state`| Append-only warehouse state rows: content-addressed migration event IDs, typed event SQL literals and statements, and source freshness data-version normalization, hashing, equivalence, age policy and latest-state read SQL, byte-compatible with the rows Python wrote. It also owns execution history: lifecycle event batch digests and conflicts, run projection, event and run cursors, filter and page validation, and the SQLite and PostgreSQL statements the native history backends run. |
description = "No code: makes the sqb build resolve dependency features exactly as the extension build does, so both builds share one compile of every common crate."
5
+
edition.workspace = true
6
+
license.workspace = true
7
+
publish.workspace = true
8
+
rust-version.workspace = true
9
+
10
+
# Cargo resolves features separately for each build, so without these entries the sqb build
11
+
# hashes the crates it shares with the extension differently and compiles polyglot-sql,
12
+
# sqlbuild-analysis and sqlbuild-rules a second time. The workspace entries enable in the sqb
13
+
# build exactly the features the extension build already resolves; sqlbuild-cli depends on this
14
+
# crate, so the extension build sees them too and stays unchanged. `make check-build-features`
15
+
# fails when the two builds resolve a shared crate differently.
16
+
[dependencies]
17
+
arrayvec.workspace = true
18
+
bstr.workspace = true
19
+
either.workspace = true
20
+
memchr.workspace = true
21
+
once_cell.workspace = true
22
+
regex-automata.workspace = true
23
+
thiserror.workspace = true
24
+
25
+
# Proc-macro dependencies resolve with build dependencies, so the syn features PyO3's macros use
26
+
# are enabled here. The empty build script makes Cargo resolve them.
0 commit comments