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:
Kirill Bulatov 2025-03-20 14:51:26 +02:00 committed by GitHub
parent 5bef32f3ed
commit de99febd9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 57 additions and 35 deletions

View file

@ -24,7 +24,7 @@ use util::ResultExt;
use worktree::{PathChange, UpdatedEntriesSet, Worktree, WorktreeId};
use crate::{
task_store::TaskStore,
task_store::{TaskSettingsLocation, TaskStore},
worktree_store::{WorktreeStore, WorktreeStoreEvent},
};
@ -642,7 +642,7 @@ impl SettingsObserver {
LocalSettingsKind::Tasks(task_kind) => task_store.update(cx, |task_store, cx| {
task_store
.update_user_tasks(
Some(SettingsLocation {
TaskSettingsLocation::Worktree(SettingsLocation {
worktree_id,
path: directory.as_ref(),
}),