You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile, I expect to get an exception or an error (yes, the code is obviously incorrect). I expect the Deno program to continue running after evaluating the expression. Instead, the Deno program panics and exits. If this is the same as #6423 then please advise.
@bartlomieju it is compiling .js without checkJs on that is the problem. So there is actually nothing to emit, which isn't actually unexpected. Clearly we shouldn't panic, but I am not 100% sure what the right response in this situation is. Maybe a throw in JS land? Something like:
Error: The compilation did not emit anything. Are you sure your configuration is valid?
Also, maybe we turn checkJs: true by default on the compiler APIs?
@sdhoward in your particular case, you aren't telling the compiler to actually check JavaScript. I suspect if you did set the compiler option to checkJs: true you would get a more meaningful error as a work around for now.
Hi,
I'm running this version:
Example code:
When I compile, I expect to get an exception or an error (yes, the code is obviously incorrect). I expect the Deno program to continue running after evaluating the expression. Instead, the Deno program panics and exits. If this is the same as #6423 then please advise.
$ deno run --unstable foo.js thread 'main' panicked at 'Can't downcast ErrBox(JSError(JSError { message: "Uncaught AssertionError: Unexpected skip of the emit.", source_line: None, script_resource_name: Some("$deno$/util.ts"), line_number: Some(35), start_column: Some(10), end_column: Some(11), frames: [JSStackFrame { type_name: Some("Object"), function_name: Some("assert"), method_name: Some("assert"), file_name: Some("$deno$/util.ts"), line_number: Some(35), column_number: Some(11), eval_origin: None, is_top_level: None, is_eval: false, is_native: false, is_constructor: false, is_async: false, is_promise_all: false, promise_index: Some(11) }, JSStackFrame { type_name: None, function_name: Some("runtimeCompile"), method_name: None, file_name: Some("$deno$/compiler.ts"), line_number: Some(1534), column_number: Some(3), eval_origin: None, is_top_level: None, is_eval: false, is_native: false, is_constructor: false, is_async: false, is_promise_all: false, promise_index: Some(3) }, JSStackFrame { type_name: Some("global"), function_name: Some("tsCompilerOnMessage"), method_name: Some("onmessage"), file_name: Some("$deno$/compiler.ts"), line_number: Some(1666), column_number: Some(22), eval_origin: None, is_top_level: None, is_eval: false, is_native: false, is_constructor: false, is_async: false, is_promise_all: false, promise_index: Some(22) }, JSStackFrame { type_name: None, function_name: Some("workerMessageRecvCallback"), method_name: None, file_name: Some("$deno$/runtime_worker.ts"), line_number: Some(72), column_number: Some(33), eval_origin: None, is_top_level: None, is_eval: false, is_native: false, is_constructor: false, is_async: false, is_promise_all: false, promise_index: Some(33) }, JSStackFrame { type_name: Some("global"), function_name: None, method_name: None, file_name: Some("file:///Users/schoward63/dev/k/tmpl1/src/__anonymous__"), line_number: Some(1), column_number: Some(1), eval_origin: None, is_top_level: None, is_eval: false, is_native: false, is_constructor: false, is_async: false, is_promise_all: false, promise_index: Some(1) }], formatted_frames: ["Object.assert ($deno$/util.ts:35:11)", "runtimeCompile ($deno$/compiler.ts:1534:3)", "tsCompilerOnMessage ($deno$/compiler.ts:1666:22)", "workerMessageRecvCallback ($deno$/runtime_worker.ts:72:33)", "file:///Users/schoward63/dev/k/tmpl1/src/__anonymous__:1:1"] })) to OpError', cli/op_error.rs:422:9
The text was updated successfully, but these errors were encountered: