Allow using system node (#18172)
Release Notes: - (Potentially breaking change) Zed will now use the node installed on your $PATH (if it is more recent than v18) instead of downloading its own. You can disable the new behavior with `{"node": {"disable_path_lookup": true}}` in your settings. We do not yet use system/project-local node_modules. --------- Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
e4080ef565
commit
3ba071b993
34 changed files with 614 additions and 391 deletions
|
@ -556,7 +556,7 @@ pub struct AppState {
|
|||
pub workspace_store: Model<WorkspaceStore>,
|
||||
pub fs: Arc<dyn fs::Fs>,
|
||||
pub build_window_options: fn(Option<Uuid>, &mut AppContext) -> WindowOptions,
|
||||
pub node_runtime: Arc<dyn NodeRuntime>,
|
||||
pub node_runtime: NodeRuntime,
|
||||
pub session: Model<AppSession>,
|
||||
}
|
||||
|
||||
|
@ -590,7 +590,7 @@ impl AppState {
|
|||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn test(cx: &mut AppContext) -> Arc<Self> {
|
||||
use node_runtime::FakeNodeRuntime;
|
||||
use node_runtime::NodeRuntime;
|
||||
use session::Session;
|
||||
use settings::SettingsStore;
|
||||
use ui::Context as _;
|
||||
|
@ -619,7 +619,7 @@ impl AppState {
|
|||
languages,
|
||||
user_store,
|
||||
workspace_store,
|
||||
node_runtime: FakeNodeRuntime::new(),
|
||||
node_runtime: NodeRuntime::unavailable(),
|
||||
build_window_options: |_, _| Default::default(),
|
||||
session,
|
||||
})
|
||||
|
@ -4418,7 +4418,7 @@ impl Workspace {
|
|||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn test_new(project: Model<Project>, cx: &mut ViewContext<Self>) -> Self {
|
||||
use node_runtime::FakeNodeRuntime;
|
||||
use node_runtime::NodeRuntime;
|
||||
use session::Session;
|
||||
|
||||
let client = project.read(cx).client();
|
||||
|
@ -4434,7 +4434,7 @@ impl Workspace {
|
|||
user_store,
|
||||
fs: project.read(cx).fs().clone(),
|
||||
build_window_options: |_, _| Default::default(),
|
||||
node_runtime: FakeNodeRuntime::new(),
|
||||
node_runtime: NodeRuntime::unavailable(),
|
||||
session,
|
||||
});
|
||||
let workspace = Self::new(Default::default(), project, app_state, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue