diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_0_6.rs b/crates/extension_host/src/wasm_host/wit/since_v0_0_6.rs index cd731372276..8f81802ad2c 100644 --- a/crates/extension_host/src/wasm_host/wit/since_v0_0_6.rs +++ b/crates/extension_host/src/wasm_host/wit/since_v0_0_6.rs @@ -56,7 +56,13 @@ impl From for latest::SettingsLocation { fn from(value: SettingsLocation) -> Self { Self { worktree_id: value.worktree_id, - path: value.path, + // Passing the path here causes project settings reads to fail, + // since the extension passes the absolute path to the worktree, + // not a relative one like the settings API expects. + // + // This has been fixed in the API itself as of v0.2.0. Align the behavior + // here so that older extensions can also read project settings. + path: String::new(), } } } diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs index 83ba2ad3dfd..88bcfeff8ba 100644 --- a/crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs +++ b/crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs @@ -77,7 +77,13 @@ impl From for latest::SettingsLocation { fn from(value: SettingsLocation) -> Self { Self { worktree_id: value.worktree_id, - path: value.path, + // Passing the path here causes project settings reads to fail, + // since the extension passes the absolute path to the worktree, + // not a relative one like the settings API expects. + // + // This has been fixed in the API itself as of v0.2.0. Align the behavior + // here so that older extensions can also read project settings. + path: String::new(), } } }