zed-industries/zed · error · anyhow::Error
`dap_request_kind` not available prior to v0.6.0
Error message
`dap_request_kind` not available prior to v0.6.0
What it means
call_dap_request_kind asks an extension to build startDebugging request arguments, an export added at WIT v0.6.0. Dispatching it against an extension compiled for v0.0.1 through v0.5.0 bails instead of calling a missing export.
Source
Thrown at crates/extension_host/src/wasm_host/wit.rs:1137
Extension::V0_6_0(ext) => {
let config =
serde_json::to_string(&config).context("Adapter config is not a valid JSON")?;
let dap_binary = ext
.call_dap_request_kind(store, &adapter_name, &config)
.await?
.map_err(|e| anyhow!("{e:?}"))?;
Ok(Ok(dap_binary.into()))
}
Extension::V0_5_0(_)
| Extension::V0_4_0(_)
| Extension::V0_3_0(_)
| Extension::V0_2_0(_)
| Extension::V0_1_0(_)
| Extension::V0_0_6(_)
| Extension::V0_0_4(_)
| Extension::V0_0_1(_) => {
anyhow::bail!("`dap_request_kind` not available prior to v0.6.0");
}
}
}
pub async fn call_dap_config_to_scenario(
&self,
store: &mut Store<WasmState>,
config: ZedDebugConfig,
) -> Result<Result<DebugScenario, String>> {
match self {
Extension::V0_8_0(ext) => {
let config = config.into();
let dap_binary = ext
.call_dap_config_to_scenario(store, &config)
.await?
.map_err(|e| anyhow!("{e:?}"))?;
Ok(Ok(dap_binary.try_into()?))View on GitHub (pinned to f4178619ac)
Solutions
- Rebuild the extension with zed_extension_api >= 0.6.0 and reinstall.
- Update to the extension's latest release.
- Remove stale installed copies so the host stops dispatching to the old wasm.
Example fix
# before (extension Cargo.toml) [dependencies] zed_extension_api = "0.5.0" # after [dependencies] zed_extension_api = "0.6.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, 6, 0) {
// cannot ask for startDebugging request arguments; construct them host-side
return fallback_request_arguments();
} Type guard
fn supports_dap_request_kind(ext: &Extension) -> bool {
!matches!(
ext,
Extension::V0_0_1(_)
| Extension::V0_0_4(_)
| Extension::V0_0_6(_)
| Extension::V0_1_0(_)
| Extension::V0_2_0(_)
| Extension::V0_3_0(_)
| Extension::V0_4_0(_)
| Extension::V0_5_0(_)
)
} Prevention
- Keep DAP extensions on zed_extension_api >= 0.6.0.
- Gate DAP request-kind dispatch on the parsed api-version.
- Maintain host-side fallbacks for adapters that predate the export.
When it happens
Trigger: Zed resolves the DAP request kind for a debug session whose adapter extension declares zed:api-version < 0.6.0.
Common situations: Old debug-adapter extension builds still installed after Zed added the request-kind API; mixed versions during extension upgrades.
Related errors
- `get_dap_binary` not available prior to v0.6.0
- `dap_config_to_scenario` not available prior to v0.6.0
- `dap_locator_create_scenario` not available prior to v0.6.0
- `run_dap_locator` not available prior to v0.6.0
- `run_slash_command` not available prior to v0.1.0
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/020cdeded529e69f.
Report an issue: GitHub.