zed-industries/zed · error · anyhow::Error

`index_docs` not available prior to v0.1.0

Error message

`index_docs` not available prior to v0.1.0

What it means

call_index_docs drives documentation indexing inside extensions, an export available only from WIT v0.1.0. When the host dispatches index_docs against a v0.0.1, v0.0.4, or v0.0.6 extension, it reaches the bail arm instead of a nonexistent export.

Source

Thrown at crates/extension_host/src/wasm_host/wit.rs:1046

            }
            Extension::V0_4_0(ext) => {
                ext.call_index_docs(store, provider, package_name, kv_store)
                    .await
            }
            Extension::V0_3_0(ext) => {
                ext.call_index_docs(store, provider, package_name, kv_store)
                    .await
            }
            Extension::V0_2_0(ext) => {
                ext.call_index_docs(store, provider, package_name, kv_store)
                    .await
            }
            Extension::V0_1_0(ext) => {
                ext.call_index_docs(store, provider, package_name, kv_store)
                    .await
            }
            Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_) => {
                anyhow::bail!("`index_docs` not available prior to v0.1.0");
            }
        }
    }

    pub async fn call_get_dap_binary(
        &self,
        store: &mut Store<WasmState>,
        adapter_name: Arc<str>,
        task: DebugTaskDefinition,
        user_installed_path: Option<PathBuf>,
        resource: Resource<Arc<dyn WorktreeDelegate>>,
    ) -> Result<Result<DebugAdapterBinary, String>> {
        match self {
            Extension::V0_8_0(ext) => {
                let dap_binary = ext
                    .call_get_dap_binary(
                        store,
                        &adapter_name,

View on GitHub (pinned to f4178619ac)

Solutions

  1. Rebuild the extension with zed_extension_api >= 0.1.0 and reinstall/republish.
  2. Update the installed extension to its newest release.
  3. Uninstall the outdated provider extension so docs indexing skips it.

Example fix

# before (extension Cargo.toml)
[dependencies]
zed_extension_api = "0.0.4"

# after
[dependencies]
zed_extension_api = "0.1.0"
Defensive patterns

Strategy: validation

Validate before calling

let api_version = extension_host::parse_wasm_extension_version(extension_id, &wasm_bytes)?;
if api_version < semver::Version::new(0, 1, 0) {
    // cannot index docs via this extension; skip it in the indexing schedule
    continue;
}

Type guard

fn supports_index_docs(ext: &Extension) -> bool {
    !matches!(
        ext,
        Extension::V0_0_1(_) | Extension::V0_0_4(_) | Extension::V0_0_6(_)
    )
}

Prevention

When it happens

Trigger: Zed indexes docs packages for a provider supplied by an extension built with zed_extension_api 0.0.x (declared via the docs provider interface).

Common situations: Stale extension builds after the docs-indexing API shipped; CI-compiled extensions pinned to old API versions; users enabling docs indexing with an outdated provider extension installed.

Related errors


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/3d9cd7c543f257fb. Report an issue: GitHub.