Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
extension_cli: Clear out existing manifest collections for old `extension.json` (#9780)
Marshall Bowers0981c97a2254
diff --git a/crates/extension_cli/src/main.rs b/crates/extension_cli/src/main.rsindex af33ce9edb2..30ca4edcc92 100644--- a/crates/extension_cli/src/main.rs+++ b/crates/extension_cli/src/main.rs@@ -109,6 +109,14 @@ async fn main() -> Result<()> {}fn populate_default_paths(manifest: &mut ExtensionManifest, extension_path: &Path) -> Result<()> {+ // For legacy extensions on the v0 schema (aka, using `extension.json`), clear out any existing+ // contents of the computed fields, since we don't care what the existing values are.+ if manifest.schema_version == 0 {+ manifest.languages.clear();+ manifest.grammars.clear();+ manifest.themes.clear();+ }+let cargo_toml_path = extension_path.join("Cargo.toml");if cargo_toml_path.exists() {manifest.lib.kind = Some(ExtensionLibraryKind::Rust);