{"record":{"id":"700358a88adb7aee","repo":"tursodatabase/turso","slug":"failed-to-register-completion-extension","errorCode":null,"errorMessage":"Failed to register completion extension","messagePattern":"Failed to register completion extension","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/app.rs","lineNumber":282,"sourceCode":"                OpenFlags::default().union(OpenFlags::ReadOnly)\n            } else {\n                OpenFlags::default()\n            };\n            let (io, db) = Database::open_new(\n                &db_file,\n                opts.vfs.as_ref(),\n                flags,\n                db_opts.turso_cli(),\n                None,\n                Arc::new(SqliteDialect),\n            )?;\n            let conn = db.connect()?;\n            (io, conn)\n        };\n        unsafe {\n            let mut ext_api = conn._build_turso_ext();\n            if !limbo_completion::register_extension_static(&mut ext_api).is_ok() {\n                return Err(anyhow!(\n                    \"Failed to register completion extension\".to_string()\n                ));\n            }\n            conn._free_extension_ctx(ext_api);\n        }\n        let interrupt_count = Arc::new(AtomicUsize::new(0));\n        {\n            let interrupt_count: Arc<AtomicUsize> = Arc::clone(&interrupt_count);\n            ctrlc::set_handler(move || {\n                // Increment the interrupt count on Ctrl-C\n                interrupt_count.fetch_add(1, Ordering::Release);\n            })\n            .expect(\"Error setting Ctrl-C handler\");\n        }\n        let sql = opts.sql.take();\n        let has_sql = sql.is_some();\n        let quiet = opts.quiet || !IsTerminal::is_terminal(&std::io::stdin());\n        let config = Config::for_output_mode(opts.output_mode);","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/tursodatabase/turso/blob/bad083fafbefdeae9a42ec19bdaaad8918dcf411/cli/app.rs#L264-L300","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["rust","cli","startup","extension","build"],"backgroundTag":"extension-registration-failed","analyzedSha":"bad083fafbefdeae9a42ec19bdaaad8918dcf411","analyzedAt":"2026-08-16T23:12:11.798Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}