Dynamicer builds (#13074)

Fixes https://github.com/zed-industries/zed/issues/13073

Note that, contrary to the issue's text, we're still shipping a
statically bundled sqlite3 after this PR. We use enough new features of
sqlite, like `sqlite3_error_offset` and `STRICT`, that our minimum
version (v3.38.0) is higher than is presumably accessible on Ubuntu.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin 2024-06-21 17:32:32 -06:00 committed by GitHub
parent edca195e3c
commit fe7d53cb96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 42 additions and 20 deletions

View file

@ -12,7 +12,12 @@ lazy_static::lazy_static! {
pub fn sql(tokens: TokenStream) -> TokenStream {
let (spans, sql) = make_sql(tokens);
#[cfg(not(target_os = "linux"))]
let error = SQLITE.sql_has_syntax_error(sql.trim());
#[cfg(target_os = "linux")]
let error: Option<(String, usize)> = None;
let formatted_sql = sqlformat::format(&sql, &sqlformat::QueryParams::None, Default::default());
if let Some((error, error_offset)) = error {