Skip to content

refactor: move the compile layer of the Python bindings into sqlbuild-python-compile - #1526

Merged
kvlonge merged 1 commit into
mainfrom
refactor/python-compile
Nov 16, 2026
Merged

kvlonge merged 1 commit into
mainfrom
refactor/python-compile

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Why

sqlbuild-python is still over the crate size limit. This slice moves the compile layer into its own crate.

Changes

  • New crate sqlbuild-python-compile, above sqlbuild-python-project and beside sqlbuild-python-planner (neither depends on the other), holds the compile command and driver, input loops, compile-input attachment, project assembly, analysis and the analysis session, Rules, lineage, semantic checks, compile deltas and outputs, the DAG artifact, manifest, frontier, offline scope facts, SQL test glue and auditing. Old paths are deleted and callers updated; there are no re-exports. The command handlers that also reach the planner stay in sqlbuild-python.
  • main/ entries hold the bodies they forwarded to; 13 still forward because their bodies are over the entry size budgets.
  • fensu: the sqlbuild-python cap drops to 66,831 code lines and 93 buckets; XSB072/XSB073 budgets are re-keyed with unchanged totals. [dupes] entries cover clusters main already had whose members moved. The native field fallback list and the compiler-differential scan paths follow the moved files.

Code-line growth of the sqlbuild-python* crates:

before fold after
this PR vs main +3,446 +2,272
main/ entry functions +1,389 +3,805
use lines +1,541 +1,611
mod lines +359 +357
other item code +157 -3,501

No DuckShop case: this is a behaviour-neutral Rust move with no new project shape, value or lifecycle.

Verification

  • The _native surface is identical to main's build.
  • A dense 3,000-model compile gives identical JSON and identical files (11,175) to main.
  • Dense timing vs main, 7 alternating runs (wall, CPU): cold 9.41→9.19 s, 26.7→26.4 s; warm 0.58 s both, 0.62→0.60 s; edit 1.71→1.79 s, 2.05→2.07 s.
  • make check-ci passed. make test: 12,298 passed; the 3 failures need an installed sqb of this version or are interrupt timings that pass alone, as on main.

…-python-compile

sqlbuild-python is still over the crate size limit. The compile layer
(compile command and driver, input loops, compile-input attachment,
project assembly, analysis and the analysis session, Rules, lineage,
semantic checks, compile deltas and outputs, the DAG artifact, manifest,
frontier, offline scope facts, SQL test glue and auditing) moves into a
new crate above sqlbuild-python-project and beside
sqlbuild-python-planner. Neither depends on the other. Command handlers
that also reach the planner stay in sqlbuild-python.

Old paths are deleted and callers updated; there are no re-exports.
main/ entries hold the bodies they used to forward to, except 13 whose
bodies are over the entry size budgets. The sqlbuild-python cap drops
to its new size, XSB072/XSB073 budgets are re-keyed with unchanged
totals, and the native field fallback list and compiler-differential
scan paths follow the moved files.
@kvlonge
kvlonge enabled auto-merge November 16, 2026 22:23
@kvlonge
kvlonge added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 25ac381 Nov 16, 2026
32 checks passed
@kvlonge
kvlonge deleted the refactor/python-compile branch November 16, 2026 23:34
kvlonge added a commit that referenced this pull request Nov 17, 2026
Moves the compile layer from the bindings crate into the new
sqlbuild-python-compile crate, as the slice did, keeping the
large-project tree's behaviour.

Where the tree and the slice's base differ:
- the tree's build_effective_target_namespace stays registered, through
  a compile-crate wrapper; main's newer target-settings entries, which
  the tree does not have, are not carried over;
- integration_loaders stays deleted, as the tree removed the dlt and
  ingestr integrations;
- the model-loop compile pool keeps using sqlbuild-python-base, where
  the previous slice put it;
- rules_at_load stays in the bindings crate's compile_driver.

Validation: cargo check --workspace --all-targets passes with no
warnings, the layout matches the slice apart from the items above, and
every line the tree added to a moved file is still present. Nothing is
built or tested yet. fensu reports 346 faults, unchanged from the
previous slice.
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