debugger: Remove fake adapter and un-gate GDB (#27557)
This is a clean-up PR in anticipation of introduction of Debugger Registry. I wanna get rid of DebugAdapterKind (or rather, it being an enum). Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
parent
56eb650f09
commit
4839195003
53 changed files with 1315 additions and 924 deletions
|
@ -28,6 +28,7 @@ backtrace = "0.3"
|
|||
chrono.workspace = true
|
||||
clap.workspace = true
|
||||
client.workspace = true
|
||||
dap.workspace = true
|
||||
env_logger.workspace = true
|
||||
extension.workspace = true
|
||||
extension_host.workspace = true
|
||||
|
@ -69,6 +70,7 @@ libc.workspace = true
|
|||
[dev-dependencies]
|
||||
client = { workspace = true, features = ["test-support"] }
|
||||
clock = { workspace = true, features = ["test-support"] }
|
||||
dap = { workspace = true, features = ["test-support"] }
|
||||
fs = { workspace = true, features = ["test-support"] }
|
||||
gpui = { workspace = true, features = ["test-support"] }
|
||||
http_client = { workspace = true, features = ["test-support"] }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use ::proto::{FromProto, ToProto};
|
||||
use anyhow::{anyhow, Result};
|
||||
use dap::DapRegistry;
|
||||
use extension::ExtensionHostProxy;
|
||||
use extension_host::headless_host::HeadlessExtensionStore;
|
||||
use fs::Fs;
|
||||
|
@ -52,6 +53,7 @@ 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>,
|
||||
}
|
||||
|
||||
|
@ -69,6 +71,7 @@ impl HeadlessProject {
|
|||
http_client,
|
||||
node_runtime,
|
||||
languages,
|
||||
debug_adapters,
|
||||
extension_host_proxy: proxy,
|
||||
}: HeadlessAppState,
|
||||
cx: &mut Context<Self>,
|
||||
|
@ -108,6 +111,7 @@ impl HeadlessProject {
|
|||
node_runtime.clone(),
|
||||
fs.clone(),
|
||||
languages.clone(),
|
||||
debug_adapters.clone(),
|
||||
environment.clone(),
|
||||
toolchain_store.read(cx).as_language_toolchain_store(),
|
||||
breakpoint_store.clone(),
|
||||
|
|
|
@ -4,6 +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};
|
||||
|
@ -1445,6 +1446,7 @@ 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| {
|
||||
|
@ -1457,6 +1459,7 @@ pub async fn init_test(
|
|||
http_client,
|
||||
node_runtime,
|
||||
languages,
|
||||
debug_adapters,
|
||||
extension_host_proxy: proxy,
|
||||
},
|
||||
cx,
|
||||
|
|
|
@ -3,6 +3,7 @@ use crate::HeadlessProject;
|
|||
use anyhow::{anyhow, Context as _, Result};
|
||||
use chrono::Utc;
|
||||
use client::{telemetry, ProxySettings};
|
||||
use dap::DapRegistry;
|
||||
use extension::ExtensionHostProxy;
|
||||
use fs::{Fs, RealFs};
|
||||
use futures::channel::mpsc;
|
||||
|
@ -471,6 +472,7 @@ 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 {
|
||||
|
@ -479,6 +481,7 @@ 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