toolchains: Add support for relative paths (#27777)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-03-31 19:48:09 +02:00 committed by GitHub
parent 627ae7af6f
commit edf712d45b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 178 additions and 93 deletions

View file

@ -4,7 +4,10 @@
//! which is a set of tools used to interact with the projects written in said language.
//! For example, a Python project can have an associated virtual environment; a Rust project can have a toolchain override.
use std::{path::PathBuf, sync::Arc};
use std::{
path::{Path, PathBuf},
sync::Arc,
};
use async_trait::async_trait;
use collections::HashMap;
@ -52,6 +55,7 @@ pub trait LanguageToolchainStore {
async fn active_toolchain(
self: Arc<Self>,
worktree_id: WorktreeId,
relative_path: Arc<Path>,
language_name: LanguageName,
cx: &mut AsyncApp,
) -> Option<Toolchain>;