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:
parent
edca195e3c
commit
fe7d53cb96
9 changed files with 42 additions and 20 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue