Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lsp): use CliLockfile #24387

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions cli/lsp/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 3,7 @@
use crate::args::create_default_npmrc;
use crate::args::package_json;
use crate::args::CacheSetting;
use crate::args::CliLockfile;
use crate::graph_util::CliJsrUrlProvider;
use crate::http_util::HttpClientProvider;
use crate::lsp::config::Config;
Expand All @@ -26,12 27,10 @@ use dashmap::DashMap;
use deno_ast::MediaType;
use deno_cache_dir::HttpCache;
use deno_core::error::AnyError;
use deno_core::parking_lot::Mutex;
use deno_core::url::Url;
use deno_graph::source::Resolver;
use deno_graph::GraphImport;
use deno_graph::ModuleSpecifier;
use deno_lockfile::Lockfile;
use deno_npm::NpmSystemInfo;
use deno_runtime::deno_fs;
use deno_runtime::deno_node::NodeResolution;
Expand Down Expand Up @@ -110,7 109,7 @@ impl LspScopeResolver {
)));
let redirect_resolver = Some(Arc::new(RedirectResolver::new(
cache.for_specifier(config_data.map(|d| &d.scope)),
config_data.and_then(|d| d.lockfile.as_deref()),
config_data.and_then(|d| d.lockfile.clone()),
)));
let npm_graph_resolver = graph_resolver.create_graph_npm_resolver();
let graph_imports = config_data
Expand Down Expand Up @@ -552,7 551,7 @@ impl std::fmt::Debug for RedirectResolver {
impl RedirectResolver {
fn new(
cache: Arc<dyn HttpCache>,
lockfile: Option<&Mutex<Lockfile>>,
lockfile: Option<Arc<CliLockfile>>,
) -> Self {
let entries = DashMap::new();
if let Some(lockfile) = lockfile {
Expand Down