From e7720ef8d7176adecd4cfe1a42008a89ff157e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 3 Feb 2025 17:37:11 +0100 Subject: [rubygems/rubygems] Materializing specs for vendor/cache should not be strict Platforms specific gems not compatible with the current Ruby should not make `bundle cache` fail and should not get removed from the cache since they still may be useful in other rubies. https://github.com/rubygems/rubygems/commit/717b43f565 --- lib/bundler/lazy_specification.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index 479736094f..5df0cce6f3 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -124,7 +124,7 @@ module Bundler def materialize_for_cache source.remote! - materialize_strictly + materialize(self, &:first) end def materialized_for_installation @@ -137,7 +137,9 @@ module Bundler source.local! if use_exact_resolved_specifications? - materialize_strictly + materialize(self) do |matching_specs| + choose_compatible(matching_specs) + end else materialize([name, version]) do |matching_specs| target_platform = source.is_a?(Source::Path) ? platform : local_platform @@ -185,12 +187,6 @@ module Bundler (most_specific_locked_platform != generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform] end - def materialize_strictly - materialize(self) do |matching_specs| - choose_compatible(matching_specs) - end - end - def materialize(query) matching_specs = source.specs.search(query) return self if matching_specs.empty? -- cgit v1.2.3