summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/sample_spec.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-06-07 20:19:41 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2024-06-20 15:20:57 +0900
commitc6a28b02c9892ae570e6da1b068470c8c93b9d16 (patch)
treeccba5e0568f891d3eb2ff6a79ac5fda581467028 /spec/ruby/core/array/sample_spec.rb
parent9e713f0e8c4d79cb7ebab4a74aa89491a8dec72b (diff)
[rubygems/rubygems] Always resolve against the local platform
If RUBY is the only platform in the lockfile, we were skipping adding the local platform to the list of resolution platforms. This generally works anyways, because we had some code to still add it if the RUBY platform is not valid for the set of locked gems. However, sometimes it can happen that "RUBY" is valid for the current set of locked gems, but when adding a new dependency, it becomes invalid. For example, when adding sorbet to a Gemfile, that will introduce `sorbet-static` as an indirect dependency which does not have a generic "RUBY" variant. This will cause resolution to take a long time continuously backtracking trying to find solutions that don't introduce `sorbet-static` as a dependency and will eventually fail. Instead, we can always add the local platform to the set of resolution platforms before resolving, and remove it as necessary after resolution so that we lock the correct set of platforms. https://github.com/rubygems/rubygems/commit/6ed1fe6050
Diffstat (limited to 'spec/ruby/core/array/sample_spec.rb')
0 files changed, 0 insertions, 0 deletions