Skip to content

refactor: move compile-input preparation to Rust - #1092

Merged
kvlonge merged 6 commits into
mainfrom
feat/native-compile-inputs
Oct 12, 2026
Merged

kvlonge merged 6 commits into
mainfrom
feat/native-compile-inputs

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Why

Phase 1 of the Rust-hosted migration moves compiler logic into Rust and deletes the Python it replaces. This milestone covers the compile-input stage: preparing each model before the native model loop, plus the public declaration indexes, required column reads, and default layering that sit around it.

Changes

  • The native model loop now does @@ interpolation and declaration scans itself, builds the known resource names from the discovered inputs, and indexes SQL hook definitions.
  • Public enum, constant, and reusable model schema indexes (extends resolution, cycle and override errors) are built in Rust.
  • Required column reads used by fixture completion run on the polyglot crate directly. This replaces a Python walk over the polyglot wheel and keeps the wheel's accessor semantics.
  • Project default layering and the description resolution used by lint run in Rust.
  • Deleted the unreachable legacy schema.yml model-entry attachment checks (discovery always rejects models: content), plus dead compiler Python.
  • New goldens: three differential failure cases cover model schema extends errors. Each golden is added for a new case; no existing goldens change.

Movable Python: 143,789 → 141,910 lines.

Verification

  • Compiler differential: 371 projects pass, and the goldens only add the three new failure cases.
  • Python vs native required column reads agree on 4,000 model/dialect pairs and 204 edge-case queries.
  • Compile output is identical to main on a 1k-model project and a real project, both cold and after an edit.
  • make test (11,572 passed), make check-ci, and the public-repository scan all pass.

@kvlonge
kvlonge enabled auto-merge (squash) October 12, 2026 18:30
@kvlonge
kvlonge merged commit 201d6a1 into main Oct 12, 2026
76 of 78 checks passed
@kvlonge
kvlonge deleted the feat/native-compile-inputs branch October 12, 2026 19:17
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