Restrict v0.0.7 of the zed_extension_api
to dev builds, for now (#12170)
This PR restricts usage of v0.0.7 of the `zed_extension_api` to dev builds, for now. As we're still making changes to it, we don't want to ship a version of Zed to Preview/Stable that claims to support a yet-unreleased version of the extension API. Release Notes: - N/A
This commit is contained in:
parent
80bd40cfa3
commit
85ff80f3c0
10 changed files with 48 additions and 15 deletions
|
@ -16,6 +16,7 @@ use gpui::{AppContext, AsyncAppContext, BackgroundExecutor, Task};
|
|||
use http::HttpClient;
|
||||
use language::LanguageRegistry;
|
||||
use node_runtime::NodeRuntime;
|
||||
use release_channel::ReleaseChannel;
|
||||
use semantic_version::SemanticVersion;
|
||||
use std::{
|
||||
path::{Path, PathBuf},
|
||||
|
@ -30,6 +31,7 @@ use wit::Extension;
|
|||
|
||||
pub(crate) struct WasmHost {
|
||||
engine: Engine,
|
||||
release_channel: ReleaseChannel,
|
||||
http_client: Arc<dyn HttpClient>,
|
||||
node_runtime: Arc<dyn NodeRuntime>,
|
||||
pub(crate) language_registry: Arc<LanguageRegistry>,
|
||||
|
@ -96,6 +98,7 @@ impl WasmHost {
|
|||
http_client,
|
||||
node_runtime,
|
||||
language_registry,
|
||||
release_channel: ReleaseChannel::global(cx),
|
||||
_main_thread_message_task: task,
|
||||
main_thread_message_tx: tx,
|
||||
})
|
||||
|
@ -124,8 +127,13 @@ impl WasmHost {
|
|||
},
|
||||
);
|
||||
|
||||
let (mut extension, instance) =
|
||||
Extension::instantiate_async(&mut store, zed_api_version, &component).await?;
|
||||
let (mut extension, instance) = Extension::instantiate_async(
|
||||
&mut store,
|
||||
this.release_channel,
|
||||
zed_api_version,
|
||||
&component,
|
||||
)
|
||||
.await?;
|
||||
|
||||
extension
|
||||
.call_init_extension(&mut store)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue