From 4fb53e53aa7e1d43d2b1776bce0f539275c9180e Mon Sep 17 00:00:00 2001 From: Eh2406 Date: Tue, 29 Jan 2019 16:58:47 -0500 Subject: [PATCH] only whitelist packages we are keeping from the lockfile --- src/cargo/core/registry.rs | 5 +---- src/cargo/ops/resolve.rs | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cargo/core/registry.rs b/src/cargo/core/registry.rs index 5767493a650..d08a0ff37d0 100644 --- a/src/cargo/core/registry.rs +++ b/src/cargo/core/registry.rs @@ -168,15 +168,12 @@ impl<'cfg> PackageRegistry<'cfg> { self.add_source(source, Kind::Override); } - pub fn add_to_yanked_whitelist(&mut self, iter: impl Iterator) { - self.yanked_whitelist.extend(iter) - } - pub fn register_lock(&mut self, id: PackageId, deps: Vec) { trace!("register_lock: {}", id); for dep in deps.iter() { trace!("\t-> {}", dep); } + self.yanked_whitelist.insert(id); let sub_map = self .locked .entry(id.source_id()) diff --git a/src/cargo/ops/resolve.rs b/src/cargo/ops/resolve.rs index 069670326a3..33f2a2c038c 100644 --- a/src/cargo/ops/resolve.rs +++ b/src/cargo/ops/resolve.rs @@ -471,7 +471,6 @@ fn register_previous_locks( // package's dependencies here as that'll be covered below to poison those // if they changed. let mut avoid_locking = HashSet::new(); - registry.add_to_yanked_whitelist(resolve.iter()); for node in resolve.iter() { if !keep(&node) { add_deps(resolve, node, &mut avoid_locking);