Repository navigation
feat(native): make native discovery the default compiler engine - #1003
Merged
Merged
Conversation
Native discovery deferred to Python whenever the running Python's Unicode data differed from the one table it carried (CPython 3.12), so 3.13 and 3.14 never ran natively. Generate a `str.isalnum()` table for the Unicode version of each supported CPython (15.0.0, 15.1.0, 16.0.0), select it by `unicodedata.unidata_version` per call, and reproduce `inspect.cleandoc` per Python minor version (3.13 strips spaces only). Unknown Python or Unicode versions still defer to Python.
With SQLBUILD_COMPILER_ENGINE unset, compiles now discover project inputs natively. The differential harness is byte-identical on the per-PR corpus (on Python 3.12, 3.13 and 3.14), the dense corpus and a private real project, and cold, edit and no-change compiles are no slower. SQLBUILD_COMPILER_ENGINE=python keeps the Python discovery as the oracle, and CI keeps comparing both engines. Compiler and Rules stores stay namespaced by engine, so the first compile after upgrading is cold once; semantic fingerprints do not change. Tests that hardcoded the Python engine's cache paths now resolve the active engine's directories, and an E2E test proves the unset default runs native discovery with output identical to the Python engine.
…very on Python 3.13 and 3.14 Docs now name the native engine's compile reuse and Rules cache directories, the unused Python-engine reuse path constant is removed, and a CI job runs the native text oracles and a bounded engine differential on Python 3.13 and 3.14.
kvlonge
enabled auto-merge (squash)
October 7, 2026 10:36
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
Native discovery matches Python discovery byte for byte on every corpus checked, and it is faster on cold and edit compiles. It still deferred to Python on Python 3.13 and 3.14, because it carried only the 3.12 Unicode table and the 3.12
inspect.cleandoc. This change makes it exact on every supported Python and makes it the default.Changes
str.isalnum()table per Unicode version of a supported CPython (15.0.0, 15.1.0, 16.0.0). Select the table byunicodedata.unidata_versionon each call. Reproduceinspect.cleandocper minor version: 3.13 changed it to strip spaces only. An unknown Python or Unicode version still defers to Python.SQLBUILD_COMPILER_ENGINEnow defaults tonative.pythonremains available as the oracle, and the CI differential still compares the two engines.Verification
make rust-check,make check-ciandmake test.