{"record":{"id":"54133635d6b05806","repo":"zed-industries/zed","slug":"failed-to-send-api-version","errorCode":null,"errorMessage":"Failed to send API version","messagePattern":"Failed to send API version","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/extension/src/extension_builder.rs","lineNumber":260,"sourceCode":"                .replace('-', \"_\"),\n        ]);\n        wasm_path.set_extension(\"wasm\");\n\n        log::info!(\"encoding wasm component for extension {extension_dir:?}\");\n\n        let component_bytes =\n            fs::read(&wasm_path).with_context(|| format!(\"reading output module {wasm_path:?}\"))?;\n\n        let component_bytes = self\n            .strip_custom_sections(&component_bytes)\n            .context(\"stripping debug sections from wasm component\")?;\n\n        let wasm_extension_api_version =\n            parse_wasm_extension_version(&manifest.id, &component_bytes)\n                .context(\"compiled wasm did not contain a valid zed extension api version\")?;\n        wasm_extension_api_version_tx\n            .send(wasm_extension_api_version)\n            .map_err(|_| anyhow::anyhow!(\"Failed to send API version\"))?;\n\n        let extension_file = extension_dir.join(\"extension.wasm\");\n        fs::write(extension_file.clone(), &component_bytes).context(\"writing extension.wasm\")?;\n\n        log::info!(\"extension {extension_dir:?} written to {extension_file:?}\");\n\n        Ok(())\n    }\n\n    async fn compile_grammar(\n        &self,\n        extension_dir: &Path,\n        grammar_name: &str,\n        grammar_metadata: &GrammarManifestEntry,\n        clang_path: &Path,\n    ) -> Result<()> {\n        let mut grammar_repo_dir = extension_dir.to_path_buf();\n        grammar_repo_dir.extend([\"grammars\", grammar_name]);","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/extension/src/extension_builder.rs#L242-L278","documentation":"During Rust extension compilation, sending the extension API version to the child build process (e.g. writing the API version into the rustup/wasm-pack build step) failed. It fires in compile_rust_extension when the handoff of the target zed_extension_api version to the build pipeline cannot be delivered — usually the build subprocess exited or its input channel closed early.","triggerScenarios":"Thrown at crates/extension/src/extension_builder.rs:283 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the extension build — transient build-tool crashes or early exits cause this","Check the build logs above this error for the underlying cargo/wasm-pack failure that closed the channel","Ensure the pinned zed_extension_api version is publishable/compatible with the toolchain"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-09-12T19:35:53.743Z","contentChangedAt":"2026-09-12T19:35:53.743Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}