Skip to content

Commit

Permalink
Probably better fix to previous issue
Browse files Browse the repository at this point in the history
With specific platforms by default, it sounds like we can fix a
previous "duplicated spec groups" issue by calling uniq on the array of
definition platforms.
  • Loading branch information
deivid-rodriguez committed Oct 15, 2020
1 parent 579d5ff commit 9f8c907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bundler/lib/bundler/definition.rb
Expand Up @@ -561,7 +561,7 @@ def add_platforms
end

def current_platforms
[local_platform, generic_local_platform]
[local_platform, generic_local_platform].uniq
end

def change_reason
Expand Down
3 changes: 1 addition & 2 deletions bundler/lib/bundler/resolver.rb
Expand Up @@ -158,9 +158,8 @@ def search_for(dependency)
# spec group.
sg_ruby = sg.copy_for(Gem::Platform::RUBY)
selected_sgs << sg_ruby if sg_ruby
all_platforms = @platforms + [platform]
next if all_platforms.to_a == [Gem::Platform::RUBY]
sg_all_platforms = nil
all_platforms = @platforms + [platform]
self.class.sort_platforms(all_platforms).reverse_each do |other_platform|
if sg_all_platforms.nil?
sg_all_platforms = sg.copy_for(other_platform)
Expand Down

0 comments on commit 9f8c907

Please sign in to comment.