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
|
@ -419,16 +419,11 @@ impl extension::Extension for WasmExtension {
|
|||
.await
|
||||
}
|
||||
|
||||
async fn dap_config_to_scenario(
|
||||
&self,
|
||||
config: ZedDebugConfig,
|
||||
worktree: Arc<dyn WorktreeDelegate>,
|
||||
) -> Result<DebugScenario> {
|
||||
async fn dap_config_to_scenario(&self, config: ZedDebugConfig) -> Result<DebugScenario> {
|
||||
self.call(|extension, store| {
|
||||
async move {
|
||||
let resource = store.data_mut().table().push(worktree)?;
|
||||
let kind = extension
|
||||
.call_dap_config_to_scenario(store, config, resource)
|
||||
.call_dap_config_to_scenario(store, config)
|
||||
.await?
|
||||
.map_err(|err| store.data().extension_error(err))?;
|
||||
Ok(kind)
|
||||
|
|
|
@ -950,13 +950,12 @@ impl Extension {
|
|||
&self,
|
||||
store: &mut Store<WasmState>,
|
||||
config: ZedDebugConfig,
|
||||
resource: Resource<Arc<dyn WorktreeDelegate>>,
|
||||
) -> Result<Result<DebugScenario, String>> {
|
||||
match self {
|
||||
Extension::V0_6_0(ext) => {
|
||||
let config = config.into();
|
||||
let dap_binary = ext
|
||||
.call_dap_config_to_scenario(store, &config, resource)
|
||||
.call_dap_config_to_scenario(store, &config)
|
||||
.await?
|
||||
.map_err(|e| anyhow!("{e:?}"))?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue