diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-01-09 20:52:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-09 20:52:13 -0500 |
commit | cca3a9562bc41744a8fdb4fd8b185505ca9af1c3 (patch) | |
tree | 3c6cdd754f04f003141b7855101404cd271e6b1b /src/isolate.rs | |
parent | 26bc251c58186b43cbc85c454a602d2f427b7dc3 (diff) |
Re-enable --recompile (#1492)
Diffstat (limited to 'src/isolate.rs')
-rw-r--r-- | src/isolate.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/isolate.rs b/src/isolate.rs index fcd07d23e..03b73075e 100644 --- a/src/isolate.rs +++ b/src/isolate.rs @@ -3,12 +3,15 @@ // TODO Currently this module uses Tokio, but it would be nice if they were // decoupled. +use compiler::compile_sync; +use compiler::CodeFetchOutput; use deno_dir; use errors::DenoError; use errors::DenoResult; use flags; use js_errors::JSError; use libdeno; +use msg; use permissions::DenoPermissions; use futures::sync::mpsc as async_mpsc; @@ -364,17 +367,15 @@ impl Drop for Isolate { } } -use compiler::compile_sync; -use compiler::CodeFetchOutput; -use msg; fn code_fetch_and_maybe_compile( state: &Arc<IsolateState>, specifier: &str, referrer: &str, ) -> Result<CodeFetchOutput, DenoError> { let mut out = state.dir.code_fetch(specifier, referrer)?; - if out.media_type == msg::MediaType::TypeScript - && out.maybe_output_code.is_none() + if (out.media_type == msg::MediaType::TypeScript + && out.maybe_output_code.is_none()) + || state.flags.recompile { debug!(">>>>> compile_sync START"); out = compile_sync(state, specifier, &referrer).unwrap(); |