From 4c779b5e8ca427faf24c26443a8054004827d450 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Fri, 2 Oct 2020 07:14:55 +0800 Subject: refactor(repl): use an inspector session (#7763) This ports the REPL over to Rust and makes use of an inspector session to run a REPL on top of any isolate which lets make full use of rustylines various things like validators and completors without having to introduce a bunch of hard to test internal ops and glue code. An accidental but good side effect of this is that the multiple line input we previously had is now an editable multi-line input prompt that is correctly stored in the history as a single entry. --- cli/worker.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cli/worker.rs') diff --git a/cli/worker.rs b/cli/worker.rs index 242a2f4b3..08ccd418e 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -134,7 +134,7 @@ impl Worker { &mut isolate, Some(inspector_server.clone()), )) - } else if global_state.flags.coverage { + } else if global_state.flags.coverage || global_state.flags.repl { Some(DenoInspector::new(&mut isolate, None)) } else { None @@ -309,7 +309,6 @@ impl MainWorker { ops::permissions::init(&mut worker); ops::plugin::init(&mut worker); ops::process::init(&mut worker); - ops::repl::init(&mut worker); ops::runtime_compiler::init(&mut worker); ops::signal::init(&mut worker); ops::tls::init(&mut worker); -- cgit v1.2.3