python: Init venv/virtualenv activation scripts during list/resolve (#40816)
This means that existence of activation scripts for venv/virtualenv will be checked locally either on the host if editing locally, or the remote by the remote proxy if editing a remote project. Closes https://github.com/zed-industries/zed/issues/40263 Release Notes: - N/A
This commit is contained in:
@@ -98,6 +98,7 @@ pub trait ToolchainLister: Send + Sync + 'static {
|
||||
worktree_root: PathBuf,
|
||||
subroot_relative_path: Arc<RelPath>,
|
||||
project_env: Option<HashMap<String, String>>,
|
||||
fs: &dyn Fs,
|
||||
) -> ToolchainList;
|
||||
|
||||
/// Given a user-created toolchain, resolve lister-specific details.
|
||||
@@ -106,14 +107,11 @@ pub trait ToolchainLister: Send + Sync + 'static {
|
||||
&self,
|
||||
path: PathBuf,
|
||||
project_env: Option<HashMap<String, String>>,
|
||||
fs: &dyn Fs,
|
||||
) -> anyhow::Result<Toolchain>;
|
||||
|
||||
async fn activation_script(
|
||||
&self,
|
||||
toolchain: &Toolchain,
|
||||
shell: ShellKind,
|
||||
fs: &dyn Fs,
|
||||
) -> Vec<String>;
|
||||
fn activation_script(&self, toolchain: &Toolchain, shell: ShellKind) -> Vec<String>;
|
||||
|
||||
/// Returns various "static" bits of information about this toolchain lister. This function should be pure.
|
||||
fn meta(&self) -> ToolchainMetadata;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user