mirror of
https://github.com/ruby/ruby.git
synced 2026-08-02 20:49:12 +08:00
[ruby/rubygems] Pass locked_platforms by keyword to candidate_platforms
Keeps the locked platform argument keyworded along the whole resolve_best_platform path instead of switching to a positional at the last hop. https://github.com/ruby/rubygems/commit/1d5f35ad0e Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fc013062f9
commit
c818da03e6
@ -192,7 +192,7 @@ module Bundler
|
||||
end
|
||||
|
||||
def find_compatible_platform_spec(specs, locked_platforms: nil)
|
||||
candidate_platforms(locked_platforms).each do |plat|
|
||||
candidate_platforms(locked_platforms: locked_platforms).each do |plat|
|
||||
candidates = MatchPlatform.select_best_platform_match(specs, plat)
|
||||
spec = choose_compatible(candidates, fallback_to_non_installable: false)
|
||||
return spec if spec
|
||||
@ -204,7 +204,7 @@ module Bundler
|
||||
# requires compilation, but works when precompiled gems are incompatible.
|
||||
# When a set of locked platforms is given (frozen mode), restrict the
|
||||
# candidates to those, so we never materialize a platform that wasn't locked.
|
||||
def candidate_platforms(locked_platforms = nil)
|
||||
def candidate_platforms(locked_platforms: nil)
|
||||
target = source.is_a?(Source::Path) ? platform : Bundler.local_platform
|
||||
platforms = [target, platform, Gem::Platform::RUBY].uniq
|
||||
return platforms unless locked_platforms
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user