-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefer project (worktree) tasks to language/global tasks in task::Spawn #21706
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Викторов Иван Михайлович.
|
* Inventory::templates_from_settings() splitted to Inventory::global_templates_from_settings() and Inventory::worktree_templates_from_settings(). * list_tasks() now first collect tasks from worktree, second from language and lastly collects global tasks. * Tests for Inventory::list_tasks().
This seems like a pretty solid change. cc: @SomeoneToIgnore, you've been working on this recently right? What do you think :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…wn (zed-industries#21706) `Inventory::list_tasks()` in `project` crate now is ordered by task types. Worktree tasks comes first, language tasks second and global tasks last. That leads to `spawn_task_with_name()` from `task_ui` crate will find worktree task first, so it's possible to override global tasks at project level. * `Inventory::templates_from_settings()` splitted to `Inventory::global_templates_from_settings()` and `Inventory::worktree_templates_from_settings()`. * In tests function `list_tasks()` renamed to `list_tasks_sorted_by_last_used()`, because it call's `Inventory::used_and_current_resolved_tasks()`. Also added `list_tasks()` which calls `Inventory::list_tasks()`. Closes zed-industries#20987 Release Notes: - Fix task::Spawn to search for task name in project tasks first.
zed-industries#21706 was merged after zed-industries#22004 and the CI missed that. Release Notes: - N/A
Inventory::list_tasks()
inproject
crate now is ordered by task types. Worktree tasks comes first, language tasks second and global tasks last.That leads to
spawn_task_with_name()
fromtask_ui
crate will find worktree task first, so it's possible to override global tasks at project level.Inventory::templates_from_settings()
splitted toInventory::global_templates_from_settings()
andInventory::worktree_templates_from_settings()
.In tests function
list_tasks()
renamed tolist_tasks_sorted_by_last_used()
, because it call'sInventory::used_and_current_resolved_tasks()
. Also addedlist_tasks()
which callsInventory::list_tasks()
.Closes #20987
Release Notes: