refactor: make resolver required (#17783)

Makes the resolver required and prints a warning when vendoring and a
dynamic import can't be resolved.

Closes #16522
This commit is contained in:
David Sherret 2023-02-15 11:30:54 -05:00 committed by GitHub
parent c7535950b6
commit b34e751a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 197 additions and 146 deletions

View file

@ -69,7 +69,7 @@ use crate::args::TsConfig;
use crate::cache::DenoDir;
use crate::cache::HttpCache;
use crate::file_fetcher::FileFetcher;
use crate::graph_util::graph_valid;
use crate::graph_util;
use crate::http_util::HttpClient;
use crate::npm::NpmCache;
use crate::npm::NpmPackageResolver;
@ -176,11 +176,11 @@ impl LanguageServer {
let graph = ps
.create_graph_with_loader(roots.clone(), &mut loader)
.await?;
graph_valid(
graph_util::graph_valid(
&graph,
&roots,
deno_graph::WalkOptions {
follow_dynamic: false,
graph_util::GraphValidOptions {
is_vendoring: false,
follow_type_only: true,
check_js: false,
},