debugger: Allow locators to generate full debug scenarios (#30014)
Closes #ISSUE Release Notes: - N/A --------- Co-authored-by: Anthony <anthony@zed.dev> Co-authored-by: Remco Smits <djsmits12@gmail.com>
This commit is contained in:
parent
a378b3f300
commit
bbfcd885ab
9 changed files with 197 additions and 146 deletions
|
@ -651,11 +651,6 @@ impl ContextProvider for RustContextProvider {
|
|||
} else {
|
||||
vec!["run".into()]
|
||||
};
|
||||
let build_task_args = if let Some(package_to_run) = package_to_run {
|
||||
vec!["build".into(), "-p".into(), package_to_run]
|
||||
} else {
|
||||
vec!["build".into()]
|
||||
};
|
||||
let mut task_templates = vec![
|
||||
TaskTemplate {
|
||||
label: format!(
|
||||
|
@ -689,8 +684,8 @@ impl ContextProvider for RustContextProvider {
|
|||
"test".into(),
|
||||
"-p".into(),
|
||||
RUST_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
RUST_TEST_NAME_TASK_VARIABLE.template_value(),
|
||||
"--".into(),
|
||||
RUST_TEST_NAME_TASK_VARIABLE.template_value(),
|
||||
"--nocapture".into(),
|
||||
],
|
||||
tags: vec!["rust-test".to_owned()],
|
||||
|
@ -709,9 +704,9 @@ impl ContextProvider for RustContextProvider {
|
|||
"--doc".into(),
|
||||
"-p".into(),
|
||||
RUST_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
RUST_DOC_TEST_NAME_TASK_VARIABLE.template_value(),
|
||||
"--".into(),
|
||||
"--nocapture".into(),
|
||||
RUST_DOC_TEST_NAME_TASK_VARIABLE.template_value(),
|
||||
],
|
||||
tags: vec!["rust-doc-test".to_owned()],
|
||||
cwd: Some("$ZED_DIRNAME".to_owned()),
|
||||
|
@ -728,6 +723,7 @@ impl ContextProvider for RustContextProvider {
|
|||
"test".into(),
|
||||
"-p".into(),
|
||||
RUST_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
"--".into(),
|
||||
RUST_TEST_FRAGMENT_TASK_VARIABLE.template_value(),
|
||||
],
|
||||
tags: vec!["rust-mod-test".to_owned()],
|
||||
|
@ -783,37 +779,6 @@ impl ContextProvider for RustContextProvider {
|
|||
cwd: Some("$ZED_DIRNAME".to_owned()),
|
||||
..TaskTemplate::default()
|
||||
},
|
||||
TaskTemplate {
|
||||
label: format!(
|
||||
"Build {} {} (package: {})",
|
||||
RUST_BIN_KIND_TASK_VARIABLE.template_value(),
|
||||
RUST_BIN_NAME_TASK_VARIABLE.template_value(),
|
||||
RUST_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
),
|
||||
cwd: Some("$ZED_DIRNAME".to_owned()),
|
||||
command: "cargo".into(),
|
||||
args: build_task_args,
|
||||
tags: vec!["rust-main".to_owned()],
|
||||
..TaskTemplate::default()
|
||||
},
|
||||
TaskTemplate {
|
||||
label: format!(
|
||||
"Build Test '{}' (package: {})",
|
||||
RUST_TEST_NAME_TASK_VARIABLE.template_value(),
|
||||
RUST_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
),
|
||||
command: "cargo".into(),
|
||||
args: vec![
|
||||
"test".into(),
|
||||
"-p".into(),
|
||||
RUST_PACKAGE_TASK_VARIABLE.template_value(),
|
||||
RUST_TEST_NAME_TASK_VARIABLE.template_value(),
|
||||
"--no-run".into(),
|
||||
],
|
||||
tags: vec!["rust-test".to_owned()],
|
||||
cwd: Some("$ZED_DIRNAME".to_owned()),
|
||||
..TaskTemplate::default()
|
||||
},
|
||||
];
|
||||
|
||||
if let Some(custom_target_dir) = custom_target_dir {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue