Add native TCL extension for in-process SQLite test harness#5497
Open
aalhour wants to merge 2 commits intotursodatabase:mainfrom
Open
Add native TCL extension for in-process SQLite test harness#5497aalhour wants to merge 2 commits intotursodatabase:mainfrom
aalhour wants to merge 2 commits intotursodatabase:mainfrom
Conversation
Replace the subprocess-per-statement TCL test shim with a native C extension (bindings/tcl/turso_tcl.c) backed by the existing SQLite C ABI in sqlite3/src/lib.rs. This closes three capability gaps in the test harness: 1. db errorcode now returns real engine error codes (was always 0) 2. db changes / db total_changes track actual DML counters (were always 0) 3. db func registers Tcl callbacks into the SQL engine (previously crashed) The extension is loaded automatically by tester.tcl when present, with transparent fallback to the subprocess shim when absent. Closes tursodatabase#2408
8821835 to
44e0b14
Compare
Collaborator
|
Hey @aalhour, so we are actually moving away from TCL completely. We have the new test runner in |
Contributor
Author
|
@PThorpe92, thanks for letting me know. Should I close this PR or refactor it to add tests to the new location? |
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.
Description
Replace the subprocess-per-statement TCL test shim with a native C extension (bindings/tcl/turso_tcl.c) backed by the existing SQLite C ABI in sqlite3/src/lib.rs. This closes three capability gaps in the test harness:
The extension is loaded automatically by tester.tcl when present, with transparent fallback to the subprocess shim when absent.
Motivation and context
Closes #2408
Description of AI Usage
Guided problem exploration with GPT-5.3 Codex, prompt here.