tasks: Add ability to query active toolchains for languages (#20667)

Closes #18649

Release Notes:

- Python tasks now use active toolchain to run.
This commit is contained in:
Piotr Osiewicz 2024-11-14 14:37:37 +01:00 committed by GitHub
parent 04ba75e2e5
commit 89f9a506f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 170 additions and 103 deletions

View file

@ -1,10 +1,10 @@
use std::{ops::Range, sync::Arc};
use crate::{Location, Runnable};
use crate::{LanguageToolchainStore, Location, Runnable};
use anyhow::Result;
use collections::HashMap;
use gpui::AppContext;
use gpui::{AppContext, Task};
use task::{TaskTemplates, TaskVariables};
use text::BufferId;
@ -25,10 +25,11 @@ pub trait ContextProvider: Send + Sync {
&self,
_variables: &TaskVariables,
_location: &Location,
_project_env: Option<&HashMap<String, String>>,
_project_env: Option<HashMap<String, String>>,
_toolchains: Arc<dyn LanguageToolchainStore>,
_cx: &mut AppContext,
) -> Result<TaskVariables> {
Ok(TaskVariables::default())
) -> Task<Result<TaskVariables>> {
Task::ready(Ok(TaskVariables::default()))
}
/// Provides all tasks, associated with the current language.