diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/build.rs | 2 | ||||
-rw-r--r-- | cli/lsp/tsc.rs | 1 | ||||
-rw-r--r-- | cli/main.rs | 2 | ||||
-rw-r--r-- | cli/tsc.rs | 1 | ||||
-rw-r--r-- | cli/tsc/99_main_compiler.js | 5 |
5 files changed, 6 insertions, 5 deletions
diff --git a/cli/build.rs b/cli/build.rs index 930ba376f..d4e6a92ab 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -210,6 +210,8 @@ fn create_compiler_snapshot( } }), ); + js_runtime.sync_ops_cache(); + create_snapshot(js_runtime, snapshot_path, files); } diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index fef605397..bb9311b2f 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -2122,6 +2122,7 @@ pub fn start(debug: bool) -> Result<JsRuntime, AnyError> { runtime.register_op("op_respond", op(respond)); runtime.register_op("op_script_names", op(script_names)); runtime.register_op("op_script_version", op(script_version)); + runtime.sync_ops_cache(); let init_config = json!({ "debug": debug }); let init_src = format!("globalThis.serverInit({});", init_config); diff --git a/cli/main.rs b/cli/main.rs index 0005bb891..c42604146 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -148,6 +148,7 @@ fn create_web_worker_callback( if args.use_deno_namespace { ops::runtime_compiler::init(js_runtime); } + js_runtime.sync_ops_cache(); } worker.bootstrap(&options); @@ -218,6 +219,7 @@ pub fn create_main_worker( // above ops::errors::init(js_runtime); ops::runtime_compiler::init(js_runtime); + js_runtime.sync_ops_cache(); } worker.bootstrap(&options); diff --git a/cli/tsc.rs b/cli/tsc.rs index 0fac29ce3..167b5b110 100644 --- a/cli/tsc.rs +++ b/cli/tsc.rs @@ -496,6 +496,7 @@ pub fn exec(request: Request) -> Result<Response, AnyError> { runtime.register_op("op_load", op(load)); runtime.register_op("op_resolve", op(resolve)); runtime.register_op("op_respond", op(respond)); + runtime.sync_ops_cache(); let startup_source = "globalThis.startup({ legacyFlag: false })"; let request_value = json!({ diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index ebb4d679d..f944b21b8 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -778,7 +778,6 @@ delete Object.prototype.__proto__; } hasStarted = true; languageService = ts.createLanguageService(host); - core.ops(); setLogDebug(debugFlag, "TSLS"); debug("serverInit()"); } @@ -793,13 +792,9 @@ delete Object.prototype.__proto__; throw new Error("The compiler runtime already started."); } hasStarted = true; - core.ops(); setLogDebug(!!debugFlag, "TS"); } - // Setup the compiler runtime during the build process. - core.ops(); - // A build time only op that provides some setup information that is used to // ensure the snapshot is setup properly. /** @type {{ buildSpecifier: string; libs: string[] }} */ |