Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Improve logging of extension manifest parsing errors (#40082)
Finn Evers1ca2f9871e58
diff --git a/crates/extension/src/extension_manifest.rs b/crates/extension/src/extension_manifest.rsindex f5296198b06..70c5a55c853 100644--- a/crates/extension/src/extension_manifest.rs+++ b/crates/extension/src/extension_manifest.rs@@ -1,4 +1,4 @@-use anyhow::{Context as _, Result, bail};+use anyhow::{Context as _, Result, anyhow, bail};use collections::{BTreeMap, HashMap};use fs::Fs;use language::LanguageName;@@ -226,8 +226,9 @@ impl ExtensionManifest {.load(&extension_manifest_path).await.with_context(|| format!("failed to load {extension_name} extension.toml"))?;- toml::from_str(&manifest_content)- .with_context(|| format!("invalid extension.toml for extension {extension_name}"))+ toml::from_str(&manifest_content).map_err(|err| {+ anyhow!("Invalid extension.toml for extension {extension_name}:\n{err}")+ })}}}