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:
Marshall Bowers 2024-05-22 19:45:34 -04:00 committed by GitHub
parent 80bd40cfa3
commit 85ff80f3c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 48 additions and 15 deletions

View file

@ -16,6 +16,7 @@ use gpui::{
FontWeight, InteractiveElement, KeyContext, ParentElement, Render, Styled, Task, TextStyle,
UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WhiteSpace, WindowContext,
};
use release_channel::ReleaseChannel;
use settings::Settings;
use std::ops::DerefMut;
use std::time::Duration;
@ -602,7 +603,8 @@ impl ExtensionsPage {
has_dev_extension: bool,
cx: &mut ViewContext<Self>,
) -> (Button, Option<Button>) {
let is_compatible = extension::is_version_compatible(&extension);
let is_compatible =
extension::is_version_compatible(ReleaseChannel::global(cx), &extension);
if has_dev_extension {
// If we have a dev extension for the given extension, just treat it as uninstalled.