diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-10-21 10:18:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 10:18:18 -0400 |
commit | 43cd0459b9ca383f18ca5b01b8c48e77737c3f1d (patch) | |
tree | 05eababf594247aaebc3d4f4f4a2a0f36415f2cb /cli/proc_state.rs | |
parent | 299702161533d731db799f1bb6c7c95fd92c0c11 (diff) |
fix(lsp): formatting should error on certain additional swc diagnostics (#12491)
Diffstat (limited to 'cli/proc_state.rs')
-rw-r--r-- | cli/proc_state.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/proc_state.rs b/cli/proc_state.rs index a633e3f9d..b7956d085 100644 --- a/cli/proc_state.rs +++ b/cli/proc_state.rs @@ -60,10 +60,10 @@ struct GraphData { // resolution map so that those errors can be surfaced at the appropriate time resolution_map: HashMap<ModuleSpecifier, HashMap<String, deno_graph::Resolved>>, - // in some cases we want to provide the span where the resolution error + // in some cases we want to provide the range where the resolution error // occurred but need to surface it on load, but on load we don't know who the // referrer and span was, so we need to cache those - resolved_map: HashMap<ModuleSpecifier, deno_graph::Span>, + resolved_map: HashMap<ModuleSpecifier, deno_graph::Range>, // deno_graph detects all sorts of issues at build time (prepare_module_load) // but if they are errors at that stage, the don't cause the correct behaviors // so we cache the error and then surface it when appropriate (e.g. load) @@ -469,7 +469,7 @@ impl ProcState { Some(Err(err)) => { return Err(custom_error( "TypeError", - format!("{}\n", err.to_string_with_span()), + format!("{}\n", err.to_string_with_range()), )) } _ => (), |