Closed lun-4 closed 2 years ago
Hm. CI's failing because it's using the system sqlite library, which means it fails on ubuntu who hasn't updated to 3.38, yet it works fine on my Void machine... what should be the best course of action here?
I don't think we can require a version that recent yet (Debian Bullseye is shipping 3.34.1, Fedora 35 is shipping 3.36.0).
But I think you can simply add a comptime check using the SQLITE_VERSION_NUMBER constant.
Something like this:
fn getErrorOffset(db: *c.sqlite3) i32 {
if (comptime c.SQLITE_VERSION_NUMBER >= 3038000) {
return c.sqlite3_error_offset(db);
}
return -1;
}
and then call that instead of sqlite3_error_offset
.
but actually there was another problem that I just fixed in #83.
In the build.zig
file we used to always add the c
directory to the include directories, but this would result in the comptime check passing (because we include the 3.38.0 version) even though the system library is not always 3.38.0.
If you rebase on master the CI should fail while compiling, not linking.
Thanks !
sqlite3_error_offset
API introduced on 3.38.0: