debugger: Ensure both debug and regular global tasks are correctly merged (#27184)
Follow-up of https://github.com/zed-industries/zed/pull/13433
Closes https://github.com/zed-industries/zed/issues/27124
Closes https://github.com/zed-industries/zed/issues/27066
After this change, both old global task source, `tasks.json` and new,
`debug.json` started to call for the same task update method:
14920ab910/crates/project/src/task_inventory.rs (L414)
erasing previous declarations.
The PR puts this data under different paths instead and adjusts the code
around it.
Release Notes:
- Fixed custom tasks not shown
This commit is contained in:
parent
5bef32f3ed
commit
de99febd9b
4 changed files with 57 additions and 35 deletions
|
@ -1,6 +1,6 @@
|
|||
#![allow(clippy::format_collect)]
|
||||
|
||||
use crate::{task_inventory::TaskContexts, Event, *};
|
||||
use crate::{task_inventory::TaskContexts, task_store::TaskSettingsLocation, Event, *};
|
||||
use buffer_diff::{
|
||||
assert_hunks, BufferDiffEvent, DiffHunkSecondaryStatus, DiffHunkStatus, DiffHunkStatusKind,
|
||||
};
|
||||
|
@ -19,6 +19,7 @@ use lsp::{
|
|||
NumberOrString, TextDocumentEdit, WillRenameFiles,
|
||||
};
|
||||
use parking_lot::Mutex;
|
||||
use paths::tasks_file;
|
||||
use pretty_assertions::{assert_eq, assert_matches};
|
||||
use serde_json::json;
|
||||
#[cfg(not(windows))]
|
||||
|
@ -327,7 +328,7 @@ async fn test_managing_project_specific_settings(cx: &mut gpui::TestAppContext)
|
|||
inventory.task_scheduled(topmost_local_task_source_kind.clone(), resolved_task);
|
||||
inventory
|
||||
.update_file_based_tasks(
|
||||
None,
|
||||
TaskSettingsLocation::Global(tasks_file()),
|
||||
Some(
|
||||
&json!([{
|
||||
"label": "cargo check unstable",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue