Simplify environment loading code (#40531)

This is a refactoring PR to simplify our environment loading code by:

- Getting rid of `EnvironmentErrorMessage` in favor of using
`anyhow::Result` everywhere, with a separate `mpsc` channel to
communicate statuses that will be shown in the activity indicator
- Inlining some functions that were only called once to reduce
indirection
- Removing the separate `direnv` module

Release Notes:

- N/A
This commit is contained in:
Cole Miller
2025-10-23 03:57:33 +00:00
committed by GitHub
parent bf63ff2b91
commit 18daa9a839
6 changed files with 144 additions and 248 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ impl HeadlessProject {
store
});
let environment = cx.new(|_| ProjectEnvironment::new(None));
let environment = cx.new(|cx| ProjectEnvironment::new(None, cx));
let manifest_tree = ManifestTree::new(worktree_store.clone(), cx);
let toolchain_store = cx.new(|cx| {
ToolchainStore::local(