From c79d236493c7d4ccfa50bf819c6bd62687c3fea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 5 Nov 2024 19:08:07 +0100 Subject: [PATCH] [rubygems/rubygems] Note about why we don't fix lockfile dependencies backed by installed specs https://github.com/rubygems/rubygems/commit/6fa94b5d72 --- lib/bundler/lazy_specification.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index 42d68787b07f0d..e05f30e328c649 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -137,6 +137,10 @@ def __materialize__(candidates, fallback_to_non_installable: Bundler.frozen_bund if search.nil? && fallback_to_non_installable search = candidates.last elsif search && search.full_name == full_name + # We don't validate locally installed dependencies but accept what's in + # the lockfile instead for performance, since loading locally installed + # dependencies would mean evaluating all gemspecs, which would affect + # `bundler/setup` performance if search.is_a?(StubSpecification) search.dependencies = dependencies elsif !source.is_a?(Source::Path) && search.runtime_dependencies.sort != dependencies.sort