Rename extension
crate to extension_host
(#20081)
This PR renames the `extension` crate to `extension_host`. This is to free up the name so that we can create a smaller-scoped `extension` crate. Release Notes: - N/A
This commit is contained in:
parent
c8f1969916
commit
ea44c510a3
30 changed files with 46 additions and 45 deletions
|
@ -20,7 +20,7 @@ client.workspace = true
|
|||
collections.workspace = true
|
||||
db.workspace = true
|
||||
editor.workspace = true
|
||||
extension.workspace = true
|
||||
extension_host.workspace = true
|
||||
fs.workspace = true
|
||||
fuzzy.workspace = true
|
||||
gpui.workspace = true
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::sync::{Arc, OnceLock};
|
|||
|
||||
use db::kvp::KEY_VALUE_STORE;
|
||||
use editor::Editor;
|
||||
use extension::ExtensionStore;
|
||||
use extension_host::ExtensionStore;
|
||||
use gpui::{Model, VisualContext};
|
||||
use language::Buffer;
|
||||
use ui::{SharedString, ViewContext};
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::str::FromStr;
|
|||
use std::sync::Arc;
|
||||
|
||||
use client::ExtensionMetadata;
|
||||
use extension::{ExtensionSettings, ExtensionStore};
|
||||
use extension_host::{ExtensionSettings, ExtensionStore};
|
||||
use fs::Fs;
|
||||
use fuzzy::{match_strings, StringMatch, StringMatchCandidate};
|
||||
use gpui::{
|
||||
|
@ -167,7 +167,7 @@ impl PickerDelegate for ExtensionVersionSelectorDelegate {
|
|||
let candidate_id = self.matches[self.selected_index].candidate_id;
|
||||
let extension_version = &self.extension_versions[candidate_id];
|
||||
|
||||
if !extension::is_version_compatible(ReleaseChannel::global(cx), extension_version) {
|
||||
if !extension_host::is_version_compatible(ReleaseChannel::global(cx), extension_version) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ impl PickerDelegate for ExtensionVersionSelectorDelegate {
|
|||
let extension_version = &self.extension_versions[version_match.candidate_id];
|
||||
|
||||
let is_version_compatible =
|
||||
extension::is_version_compatible(ReleaseChannel::global(cx), extension_version);
|
||||
extension_host::is_version_compatible(ReleaseChannel::global(cx), extension_version);
|
||||
let disabled = !is_version_compatible;
|
||||
|
||||
Some(
|
||||
|
|
|
@ -11,7 +11,7 @@ use client::telemetry::Telemetry;
|
|||
use client::ExtensionMetadata;
|
||||
use collections::{BTreeMap, BTreeSet};
|
||||
use editor::{Editor, EditorElement, EditorStyle};
|
||||
use extension::{ExtensionManifest, ExtensionOperation, ExtensionStore};
|
||||
use extension_host::{ExtensionManifest, ExtensionOperation, ExtensionStore};
|
||||
use fuzzy::{match_strings, StringMatchCandidate};
|
||||
use gpui::{
|
||||
actions, uniform_list, AppContext, EventEmitter, Flatten, FocusableView, InteractiveElement,
|
||||
|
@ -203,8 +203,8 @@ impl ExtensionsPage {
|
|||
let subscriptions = [
|
||||
cx.observe(&store, |_, _, cx| cx.notify()),
|
||||
cx.subscribe(&store, move |this, _, event, cx| match event {
|
||||
extension::Event::ExtensionsUpdated => this.fetch_extensions_debounced(cx),
|
||||
extension::Event::ExtensionInstalled(extension_id) => {
|
||||
extension_host::Event::ExtensionsUpdated => this.fetch_extensions_debounced(cx),
|
||||
extension_host::Event::ExtensionInstalled(extension_id) => {
|
||||
this.on_extension_installed(workspace_handle.clone(), extension_id, cx)
|
||||
}
|
||||
_ => {}
|
||||
|
@ -691,7 +691,8 @@ impl ExtensionsPage {
|
|||
has_dev_extension: bool,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) -> (Button, Option<Button>) {
|
||||
let is_compatible = extension::is_version_compatible(ReleaseChannel::global(cx), extension);
|
||||
let is_compatible =
|
||||
extension_host::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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue