summaryrefslogtreecommitdiff
path: root/cli/lsp/language_server.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-28 14:58:43 -0400
committerGitHub <noreply@github.com>2024-05-28 14:58:43 -0400
commit448fe67b7a2142f62332b651f9d215534dceb1f5 (patch)
tree3cfc763f39bf275a537e6228767b3e43866f5d0f /cli/lsp/language_server.rs
parentcd8f5f53f7616e4c74de0f1ff5eadd6ef024118a (diff)
feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979)
Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r--cli/lsp/language_server.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs
index 8f37d8b9c..621f45f96 100644
--- a/cli/lsp/language_server.rs
+++ b/cli/lsp/language_server.rs
@@ -85,6 +85,7 @@ use super::tsc::TsServer;
use super::urls;
use crate::args::create_default_npmrc;
use crate::args::get_root_cert_store;
+use crate::args::write_lockfile_if_has_changes;
use crate::args::CaData;
use crate::args::CacheSetting;
use crate::args::CliOptions;
@@ -247,12 +248,13 @@ impl LanguageServer {
.await?;
graph_util::graph_valid(
&graph,
- factory.fs().clone(),
+ factory.fs(),
&roots,
graph_util::GraphValidOptions {
is_vendoring: false,
follow_type_only: true,
check_js: false,
+ exit_lockfile_errors: false,
},
)?;
@@ -260,8 +262,8 @@ impl LanguageServer {
// found after caching
if let Some(lockfile) = cli_options.maybe_lockfile() {
let lockfile = lockfile.lock();
- if let Err(err) = lockfile.write() {
- lsp_warn!("Error writing lockfile: {:#}", err);
+ if let Err(err) = write_lockfile_if_has_changes(&lockfile) {
+ lsp_warn!("{:#}", err);
}
}