fix: rewrite preprocessor as standalone host exe, regenerate headers - #213
Open
samooth wants to merge 1 commit into
Open
fix: rewrite preprocessor as standalone host exe, regenerate headers#213samooth wants to merge 1 commit into
samooth wants to merge 1 commit into
Conversation
The build-time header preprocessor (which generates c/loadable-ext-*.h for loadable extensions) was broken in three ways: 1. readOriginalData used readAlloc(allocator, 1024*1024) on a ~691KB file. The new 0.16/0.17 Io.Reader API reads exactly N bytes or returns EndOfStream — always failed. 2. processor.dump() was never called in sqlite3()/sqlite3ext(), so the output header was just a 47-byte comment banner. 3. test_c_bindings didn't depend on the preprocess step, so zig build test never exercised the consumer path. Rewrite as a standalone host executable that reads paths via stdin (no argv — works on Windows/POSIX). Uses readFileAlloc for the full file. addPreprocessRun in build.zig builds and runs it via addRunArtifact + setStdIn. Also bumps build.zig.zon to SQLite 3.53.4 and regenerates the committed c/loadable-ext-*.h headers to match. Depends on the compat layer (feat/compat-0.16-0.17) for the cross- compile legs to pass.
Owner
|
Why exactly do you change it to a standalone executable ? |
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.
The header preprocessor (which generates c/loadable-ext-*.h) was broken since the 0.16 Io.
Reader migration — readAlloc always failed, dump() was never called, and CI never exercised the consumer path.
Rewrite as a standalone host executable that takes paths via stdin.
Also bumps SQLite to 3.53.4, regenerates the committed headers, and fixes the CI matrix.
Depends on PR2 (feat/compat-0.16-0.17) for the cross-compile legs.