From 91f01131b16608597d6247f351c01727a7704b8d Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Wed, 10 Dec 2025 21:29:10 -0500 Subject: [PATCH] Introduce DEBUG_ALLOW_UNPUBLISHED_AUTO_EXTENSIONS --- crates/extension_host/src/extension_host.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/extension_host/src/extension_host.rs b/crates/extension_host/src/extension_host.rs index a08b006fbbb8478546ca01fe3082478fba0c1fd8..d33816b64953ecb72bae050046f279739ab66aaf 100644 --- a/crates/extension_host/src/extension_host.rs +++ b/crates/extension_host/src/extension_host.rs @@ -712,11 +712,15 @@ impl ExtensionStore { cx.spawn(async move |this, cx| { for extension_id in extensions_to_install { - // HACK: In debug builds, check if extension exists locally in repo's extensions/ dir - // and install as dev extension instead of fetching from registry. - // This allows testing unpublished extensions. + // When enabled, this checks if an extension exists locally in the repo's extensions/ + // directory and installs it as a dev extension instead of fetching from the registry. + // This is useful for testing auto-installed extensions before they've been published. + // Set to `true` only during local development/testing of new auto-install extensions. #[cfg(debug_assertions)] - { + const DEBUG_ALLOW_UNPUBLISHED_AUTO_EXTENSIONS: bool = false; + + #[cfg(debug_assertions)] + if DEBUG_ALLOW_UNPUBLISHED_AUTO_EXTENSIONS { let local_extension_path = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) .parent() .unwrap()