diff options
author | David RodrÃguez <[email protected]> | 2025-02-03 17:37:11 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-02-13 09:37:50 +0900 |
commit | e7720ef8d7176adecd4cfe1a42008a89ff157e97 (patch) | |
tree | 14e9370b52457a44e434ca17dce2fa7bc067df7e /lib | |
parent | 5adbad731b3354e2cdf1befa0ec719f3609678dc (diff) |
[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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/lazy_specification.rb | 12 |
1 files changed, 4 insertions, 8 deletions
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? |