debugger: More tidy up for SSH (#28993)
Split `locator` out of DebugTaskDefinition to make it clearer when location needs to happen. Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Anthony <anthony@zed.dev> Co-authored-by: Cole Miller <m@cole-miller.net>
This commit is contained in:
parent
d13cd007a2
commit
9d35f0389d
57 changed files with 1146 additions and 884 deletions
|
@ -29,7 +29,7 @@ backtrace = "0.3"
|
|||
chrono.workspace = true
|
||||
clap.workspace = true
|
||||
client.workspace = true
|
||||
dap.workspace = true
|
||||
dap_adapters.workspace = true
|
||||
env_logger.workspace = true
|
||||
extension.workspace = true
|
||||
extension_host.workspace = true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use ::proto::{FromProto, ToProto};
|
||||
use anyhow::{Result, anyhow};
|
||||
use dap::DapRegistry;
|
||||
|
||||
use extension::ExtensionHostProxy;
|
||||
use extension_host::headless_host::HeadlessExtensionStore;
|
||||
use fs::Fs;
|
||||
|
@ -41,6 +41,7 @@ pub struct HeadlessProject {
|
|||
pub buffer_store: Entity<BufferStore>,
|
||||
pub lsp_store: Entity<LspStore>,
|
||||
pub task_store: Entity<TaskStore>,
|
||||
pub dap_store: Entity<DapStore>,
|
||||
pub settings_observer: Entity<SettingsObserver>,
|
||||
pub next_entry_id: Arc<AtomicUsize>,
|
||||
pub languages: Arc<LanguageRegistry>,
|
||||
|
@ -54,7 +55,6 @@ pub struct HeadlessAppState {
|
|||
pub http_client: Arc<dyn HttpClient>,
|
||||
pub node_runtime: NodeRuntime,
|
||||
pub languages: Arc<LanguageRegistry>,
|
||||
pub debug_adapters: Arc<DapRegistry>,
|
||||
pub extension_host_proxy: Arc<ExtensionHostProxy>,
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,6 @@ impl HeadlessProject {
|
|||
http_client,
|
||||
node_runtime,
|
||||
languages,
|
||||
debug_adapters: _debug_adapters,
|
||||
extension_host_proxy: proxy,
|
||||
}: HeadlessAppState,
|
||||
cx: &mut Context<Self>,
|
||||
|
@ -114,6 +113,7 @@ impl HeadlessProject {
|
|||
languages.clone(),
|
||||
environment.clone(),
|
||||
toolchain_store.read(cx).as_language_toolchain_store(),
|
||||
worktree_store.clone(),
|
||||
breakpoint_store.clone(),
|
||||
cx,
|
||||
)
|
||||
|
@ -258,6 +258,7 @@ impl HeadlessProject {
|
|||
buffer_store,
|
||||
lsp_store,
|
||||
task_store,
|
||||
dap_store,
|
||||
next_entry_id: Default::default(),
|
||||
languages,
|
||||
extensions,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
use crate::headless_project::HeadlessProject;
|
||||
use client::{Client, UserStore};
|
||||
use clock::FakeSystemClock;
|
||||
use dap::DapRegistry;
|
||||
|
||||
use extension::ExtensionHostProxy;
|
||||
use fs::{FakeFs, Fs};
|
||||
use gpui::{AppContext as _, Entity, SemanticVersion, TestAppContext};
|
||||
|
@ -1566,7 +1566,6 @@ pub async fn init_test(
|
|||
let http_client = Arc::new(BlockedHttpClient);
|
||||
let node_runtime = NodeRuntime::unavailable();
|
||||
let languages = Arc::new(LanguageRegistry::new(cx.executor()));
|
||||
let debug_adapters = DapRegistry::default().into();
|
||||
let proxy = Arc::new(ExtensionHostProxy::new());
|
||||
server_cx.update(HeadlessProject::init);
|
||||
let headless = server_cx.new(|cx| {
|
||||
|
@ -1579,7 +1578,6 @@ pub async fn init_test(
|
|||
http_client,
|
||||
node_runtime,
|
||||
languages,
|
||||
debug_adapters,
|
||||
extension_host_proxy: proxy,
|
||||
},
|
||||
cx,
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::headless_project::HeadlessAppState;
|
|||
use anyhow::{Context as _, Result, anyhow};
|
||||
use chrono::Utc;
|
||||
use client::{ProxySettings, telemetry};
|
||||
use dap::DapRegistry;
|
||||
|
||||
use extension::ExtensionHostProxy;
|
||||
use fs::{Fs, RealFs};
|
||||
use futures::channel::mpsc;
|
||||
|
@ -441,6 +441,7 @@ pub fn execute_run(
|
|||
|
||||
GitHostingProviderRegistry::set_global(git_hosting_provider_registry, cx);
|
||||
git_hosting_providers::init(cx);
|
||||
dap_adapters::init(cx);
|
||||
|
||||
extension::init(cx);
|
||||
let extension_host_proxy = ExtensionHostProxy::global(cx);
|
||||
|
@ -472,7 +473,6 @@ pub fn execute_run(
|
|||
let mut languages = LanguageRegistry::new(cx.background_executor().clone());
|
||||
languages.set_language_server_download_dir(paths::languages_dir().clone());
|
||||
let languages = Arc::new(languages);
|
||||
let debug_adapters = DapRegistry::default().into();
|
||||
|
||||
HeadlessProject::new(
|
||||
HeadlessAppState {
|
||||
|
@ -481,7 +481,6 @@ pub fn execute_run(
|
|||
http_client,
|
||||
node_runtime,
|
||||
languages,
|
||||
debug_adapters,
|
||||
extension_host_proxy,
|
||||
},
|
||||
cx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue