extension: Another batch of updates for DAP extension API (#32809)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
4383fee3c1
commit
0f0ff40c6d
19 changed files with 142 additions and 107 deletions
|
@ -20,9 +20,9 @@ pub use wit::{
|
|||
make_file_executable,
|
||||
zed::extension::context_server::ContextServerConfiguration,
|
||||
zed::extension::dap::{
|
||||
DebugAdapterBinary, DebugRequest, DebugTaskDefinition, StartDebuggingRequestArguments,
|
||||
StartDebuggingRequestArgumentsRequest, TaskTemplate, TcpArguments, TcpArgumentsTemplate,
|
||||
resolve_tcp_template,
|
||||
DebugAdapterBinary, DebugConfig, DebugRequest, DebugScenario, DebugTaskDefinition,
|
||||
StartDebuggingRequestArguments, StartDebuggingRequestArgumentsRequest, TaskTemplate,
|
||||
TcpArguments, TcpArgumentsTemplate, resolve_tcp_template,
|
||||
},
|
||||
zed::extension::github::{
|
||||
GithubRelease, GithubReleaseAsset, GithubReleaseOptions, github_release_by_tag_name,
|
||||
|
@ -214,7 +214,6 @@ pub trait Extension: Send + Sync {
|
|||
fn dap_config_to_scenario(
|
||||
&mut self,
|
||||
_adapter_name: DebugConfig,
|
||||
_config: &Worktree,
|
||||
) -> Result<DebugScenario, String> {
|
||||
Err("`dap_config_to_scenario` not implemented".to_string())
|
||||
}
|
||||
|
@ -437,11 +436,8 @@ impl wit::Guest for Component {
|
|||
serde_json::from_str(&config).map_err(|e| format!("Failed to parse config: {e}"))?,
|
||||
)
|
||||
}
|
||||
fn dap_config_to_scenario(
|
||||
config: DebugConfig,
|
||||
worktree: &Worktree,
|
||||
) -> Result<DebugScenario, String> {
|
||||
extension().dap_config_to_scenario(config, worktree)
|
||||
fn dap_config_to_scenario(config: DebugConfig) -> Result<DebugScenario, String> {
|
||||
extension().dap_config_to_scenario(config)
|
||||
}
|
||||
fn dap_locator_create_scenario(
|
||||
locator_name: String,
|
||||
|
|
|
@ -161,7 +161,7 @@ world extension {
|
|||
export get-dap-binary: func(adapter-name: string, config: debug-task-definition, user-installed-path: option<string>, worktree: borrow<worktree>) -> result<debug-adapter-binary, string>;
|
||||
/// Returns the kind of a debug scenario (launch or attach).
|
||||
export dap-request-kind: func(adapter-name: string, config: string) -> result<start-debugging-request-arguments-request, string>;
|
||||
export dap-config-to-scenario: func(config: debug-config, worktree: borrow<worktree>) -> result<debug-scenario, string>;
|
||||
export dap-config-to-scenario: func(config: debug-config) -> result<debug-scenario, string>;
|
||||
export dap-locator-create-scenario: func(locator-name: string, build-config-template: build-task-template, resolved-label: string, debug-adapter-name: string) -> option<debug-scenario>;
|
||||
export run-dap-locator: func(locator-name: string, config: resolved-task) -> result<debug-request, string>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue