tursodatabase/turso · error
Failed to register completion extension
Error message
Failed to register completion extension
What it means
Startup error returned by the tursodb CLI (cli/app.rs:279-285) when limbo_completion::register_extension_static fails while registering the completion extension into the freshly opened connection's extension API. It aborts database open — the CLI refuses to run without its SQL-completion support. This is an internal initialization failure, not something SQL input triggers.
Source
Thrown at cli/app.rs:282
OpenFlags::default().union(OpenFlags::ReadOnly)
} else {
OpenFlags::default()
};
let (io, db) = Database::open_new(
&db_file,
opts.vfs.as_ref(),
flags,
db_opts.turso_cli(),
None,
Arc::new(SqliteDialect),
)?;
let conn = db.connect()?;
(io, conn)
};
unsafe {
let mut ext_api = conn._build_turso_ext();
if !limbo_completion::register_extension_static(&mut ext_api).is_ok() {
return Err(anyhow!(
"Failed to register completion extension".to_string()
));
}
conn._free_extension_ctx(ext_api);
}
let interrupt_count = Arc::new(AtomicUsize::new(0));
{
let interrupt_count: Arc<AtomicUsize> = Arc::clone(&interrupt_count);
ctrlc::set_handler(move || {
// Increment the interrupt count on Ctrl-C
interrupt_count.fetch_add(1, Ordering::Release);
})
.expect("Error setting Ctrl-C handler");
}
let sql = opts.sql.take();
let has_sql = sql.is_some();
let quiet = opts.quiet || !IsTerminal::is_terminal(&std::io::stdin());
let config = Config::for_output_mode(opts.output_mode);View on GitHub (pinned to bad083fafb)
Solutions
- Rebuild from clean artifacts: cargo clean && cargo build (never --release per repo convention) in one consistent checkout
- If it persists on a clean build of a tagged revision, report it — the ext API contract between the crates is broken
- As a stopgap, use a known-good official binary of the same version
Defensive patterns
Strategy: fallback
Prevention
- Build from a clean, single-revision checkout: cargo clean && cargo build
- Do not mix locally patched crates with released ones across core and extensions
- Keep a known-good official binary of the same version as a stopgap
- If a clean build still fails, report it — the extension API contract between crates is broken
When it happens
Trigger: Running a tursodb binary whose limbo_completion and turso_core crates were built from mismatched versions; stale incremental/cached build artifacts mixing ABIs of the extension API; feature-flag skew between core and the completion extension.
Common situations: Workspaces built after a partial 'cargo build' across a rebase; locally patched crates with incompatible _build_turso_ext signatures; distributed binaries assembled from inconsistent components.
Related errors
- Error retrieving columns for view '{}': {}
- PRAGMA table_info returned no columns for view '{}'. The vie
- Unable to access database schema. The database may be using
- Error querying schema: {}
- Error in database list: {}
AI-assisted analysis of tursodatabase/turso@bad083fafb (2026-08-16).
Data as JSON: /api/errors/700358a88adb7aee.
Report an issue: GitHub.