diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-01 14:35:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 14:35:23 -0400 |
commit | 9efed4c7a3d32de62e9c9b5e0c6712ce97637abb (patch) | |
tree | aa370f95df93c71f6c57d6a01a50b4df1955ee57 /cli/tools/installer.rs | |
parent | 30628288ce2b411ca3def46129a4606073e16bac (diff) |
refactor(cli): remove ProcState - add CliFactory (#18900)
This removes `ProcState` and replaces it with a new `CliFactory` which
initializes our "service structs" on demand. This isn't a performance
improvement at the moment for `deno run`, but might unlock performance
improvements in the future.
Diffstat (limited to 'cli/tools/installer.rs')
-rw-r--r-- | cli/tools/installer.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs index 461bb1a50..fb83c3cab 100644 --- a/cli/tools/installer.rs +++ b/cli/tools/installer.rs @@ -6,8 +6,8 @@ use crate::args::ConfigFlag; use crate::args::Flags; use crate::args::InstallFlags; use crate::args::TypeCheckMode; +use crate::factory::CliFactory; use crate::http_util::HttpClient; -use crate::proc_state::ProcState; use crate::util::fs::canonicalize_path_maybe_not_exists; use deno_core::anyhow::Context; @@ -233,9 +233,10 @@ pub async fn install_command( install_flags: InstallFlags, ) -> Result<(), AnyError> { // ensure the module is cached - ProcState::from_flags(flags.clone()) + CliFactory::from_flags(flags.clone()) + .await? + .module_load_preparer() .await? - .module_load_preparer .load_and_type_check_files(&[install_flags.module_url.clone()]) .await?; |