summaryrefslogtreecommitdiff
path: root/cli/global_state.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-18 10:08:18 -0500
committerGitHub <noreply@github.com>2020-02-18 10:08:18 -0500
commit302debebb3a3b765b3d13f3244eb4625d7d610c2 (patch)
treed54b4d01f391f7396e8f1c92dc2e05c82acc2a8c /cli/global_state.rs
parent5a3292047c42b8a65d164f127fc57e57046fadf7 (diff)
refactor: cleanup cli/lib.rs (#4006)
* rename methods on Worker related to module loading * reorganize cli/lib.rs * remove cli/progress.rs and cli/shell.rs
Diffstat (limited to 'cli/global_state.rs')
-rw-r--r--cli/global_state.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/cli/global_state.rs b/cli/global_state.rs
index a11900218..1d7a3a40f 100644
--- a/cli/global_state.rs
+++ b/cli/global_state.rs
@@ -12,8 +12,6 @@ use crate::flags;
use crate::lockfile::Lockfile;
use crate::msg;
use crate::permissions::DenoPermissions;
-use crate::progress::Progress;
-use crate::shell::Shell;
use deno_core::ErrBox;
use deno_core::ModuleSpecifier;
use std;
@@ -39,7 +37,6 @@ pub struct GlobalStateInner {
/// Permissions parsed from `flags`.
pub permissions: DenoPermissions,
pub dir: deno_dir::DenoDir,
- pub progress: Progress,
pub file_fetcher: SourceFileFetcher,
pub js_compiler: JsCompiler,
pub json_compiler: JsonCompiler,
@@ -62,21 +59,8 @@ impl GlobalState {
let custom_root = env::var("DENO_DIR").map(String::into).ok();
let dir = deno_dir::DenoDir::new(custom_root)?;
- // TODO(ry) Shell is a useless abstraction and should be removed at
- // some point.
- let shell = Arc::new(Mutex::new(Shell::new()));
-
- let progress = Progress::new();
- progress.set_callback(move |_done, _completed, _total, status, msg| {
- if !status.is_empty() {
- let mut s = shell.lock().unwrap();
- s.status(status, msg).expect("shell problem");
- }
- });
-
let file_fetcher = SourceFileFetcher::new(
dir.deps_cache.clone(),
- progress.clone(),
!flags.reload,
flags.cache_blacklist.clone(),
flags.no_remote,
@@ -102,7 +86,6 @@ impl GlobalState {
dir,
permissions: DenoPermissions::from_flags(&flags),
flags,
- progress,
file_fetcher,
ts_compiler,
js_compiler: JsCompiler {},