Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
extension_host: Fix extension rebuild building in release mode (#47165)
Finn Evers626530524805
diff --git a/crates/extension/src/extension_builder.rs b/crates/extension/src/extension_builder.rsindex 8b9bf994d17..fe4477e227c 100644--- a/crates/extension/src/extension_builder.rs+++ b/crates/extension/src/extension_builder.rs@@ -55,6 +55,12 @@ pub struct CompileExtensionOptions {pub release: bool,}+impl CompileExtensionOptions {+ pub const fn dev() -> Self {+ Self { release: false }+ }+}+#[derive(Deserialize)]struct CargoToml {package: CargoTomlPackage,diff --git a/crates/extension_host/src/extension_host.rs b/crates/extension_host/src/extension_host.rsindex 219b72f92d1..80b11a5229f 100644--- a/crates/extension_host/src/extension_host.rs+++ b/crates/extension_host/src/extension_host.rs@@ -981,7 +981,7 @@ impl ExtensionStore {.compile_extension(&extension_source_path,&mut extension_manifest,- CompileExtensionOptions { release: false },+ CompileExtensionOptions::dev(),fs,).await@@ -1041,12 +1041,7 @@ impl ExtensionStore {let compile = cx.background_spawn(async move {let mut manifest = ExtensionManifest::load(fs.clone(), &path).await?;builder- .compile_extension(- &path,- &mut manifest,- CompileExtensionOptions { release: true },- fs,- )+ .compile_extension(&path, &mut manifest, CompileExtensionOptions::dev(), fs).await});