diff --git a/crates/dap/src/dap.rs b/crates/dap/src/dap.rs index e2122d98af..2647ac0314 100644 --- a/crates/dap/src/dap.rs +++ b/crates/dap/src/dap.rs @@ -7,7 +7,7 @@ pub mod transport; pub use dap_types::*; pub use registry::DapRegistry; -pub use task::{DebugAdapterConfig, DebugRequestType}; +pub use task::DebugRequestType; pub type ScopeId = u64; pub type VariableReference = u64; diff --git a/crates/task/src/debug_format.rs b/crates/task/src/debug_format.rs index 7634b7bfb8..8f478aa46f 100644 --- a/crates/task/src/debug_format.rs +++ b/crates/task/src/debug_format.rs @@ -98,62 +98,6 @@ impl DebugRequestDisposition { } } } -/// Represents the configuration for the debug adapter -#[derive(PartialEq, Eq, Clone, Debug)] -pub struct DebugAdapterConfig { - /// Name of the debug task - pub label: String, - /// The type of adapter you want to use - pub adapter: String, - /// The type of request that should be called on the debug adapter - pub request: DebugRequestDisposition, - /// Additional initialization arguments to be sent on DAP initialization - pub initialize_args: Option, - /// Optional TCP connection information - /// - /// If provided, this will be used to connect to the debug adapter instead of - /// spawning a new process. This is useful for connecting to a debug adapter - /// that is already running or is started by another process. - pub tcp_connection: Option, - /// What Locator to use to configure the debug task - pub locator: Option, - /// Whether to tell the debug adapter to stop on entry - pub stop_on_entry: Option, -} - -impl From for DebugAdapterConfig { - fn from(def: DebugTaskDefinition) -> Self { - Self { - label: def.label, - adapter: def.adapter, - request: DebugRequestDisposition::UserConfigured(def.request), - initialize_args: def.initialize_args, - tcp_connection: def.tcp_connection, - locator: def.locator, - stop_on_entry: def.stop_on_entry, - } - } -} - -impl TryFrom for DebugTaskDefinition { - type Error = (); - fn try_from(def: DebugAdapterConfig) -> Result { - let request = match def.request { - DebugRequestDisposition::UserConfigured(debug_request_type) => debug_request_type, - DebugRequestDisposition::ReverseRequest(_) => return Err(()), - }; - - Ok(Self { - label: def.label, - adapter: def.adapter, - request, - initialize_args: def.initialize_args, - tcp_connection: def.tcp_connection, - locator: def.locator, - stop_on_entry: def.stop_on_entry, - }) - } -} impl TryFrom for DebugTaskDefinition { type Error = (); diff --git a/crates/task/src/lib.rs b/crates/task/src/lib.rs index 0d92f063b0..dc3bbdb58e 100644 --- a/crates/task/src/lib.rs +++ b/crates/task/src/lib.rs @@ -16,8 +16,8 @@ use std::path::PathBuf; use std::str::FromStr; pub use debug_format::{ - AttachConfig, DebugAdapterConfig, DebugConnectionType, DebugRequestDisposition, - DebugRequestType, DebugTaskDefinition, DebugTaskFile, LaunchConfig, TCPHost, + AttachConfig, DebugConnectionType, DebugRequestDisposition, DebugRequestType, + DebugTaskDefinition, DebugTaskFile, LaunchConfig, TCPHost, }; pub use task_template::{ DebugArgs, DebugArgsRequest, HideStrategy, RevealStrategy, TaskModal, TaskTemplate,