Repository navigation
refactor: call Rust-only planner functions directly and move selector tests to Rust - #1221
Merged
Merged
Conversation
… through bindings Planner, plan output, freshness, lifecycle and selection functions that only Rust calls lose their `#[pyfunction]` attributes, registrations, stub entries and the module-attribute checks that kept them registered; Rust keeps calling them directly. Eleven of them had no caller at all and are removed. Selector parsing, resolution, model-selector names and unit-test selector splitting are now tested in Rust over the analysis functions that implement them, with every case the Python tests of the removed bindings asserted; those Python tests and their helpers are removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Many planner, plan-output, freshness, lifecycle and selection functions were registered on the native module only so Rust could call them or so Python tests could reach pure Rust logic. Each binding costs build time, stub surface and a module-attribute check, and keeps tests in Python for logic that lives in Rust.
Changes
#[pyfunction]attributes, registrations, stub entries and module-attribute checks; Rust calls them directly. 11 had no caller at all and are removed.sqlbuild-analysisfunctions that implement them. Every case the removed Python tests asserted is ported.path:selector through the real binding (folder, translation and exclusion of other folders).No behaviour, output or diagnostics change.
Verification
plan --jsonbyte-identical on two large synthetic projects.-D warnings, fensu andmake check-cipass.