From a5eb2dfc93afc2899ed6e1ad2b3e029157889f7c Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 22 Jun 2021 07:27:32 +1000 Subject: fix(#10761): graph errors reported as diagnostics for `Deno.emit()` (#10767) Fixes #10761 --- cli/ops/runtime_compiler.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli/ops/runtime_compiler.rs') diff --git a/cli/ops/runtime_compiler.rs b/cli/ops/runtime_compiler.rs index 099f2d555..dd500077a 100644 --- a/cli/ops/runtime_compiler.rs +++ b/cli/ops/runtime_compiler.rs @@ -118,12 +118,14 @@ async fn op_emit( }; let graph = builder.get_graph(); let debug = program_state.flags.log_level == Some(log::Level::Debug); - let (files, result_info) = graph.emit(EmitOptions { + let graph_errors = graph.get_errors(); + let (files, mut result_info) = graph.emit(EmitOptions { bundle_type, check: args.check.unwrap_or(true), debug, maybe_user_config: args.compiler_options, })?; + result_info.diagnostics.extend_graph_errors(graph_errors); Ok(json!({ "diagnostics": result_info.diagnostics, -- cgit v1.2.3