Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate spec groups #3965

Merged
merged 2 commits into from Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions bundler/lib/bundler/resolver.rb
Expand Up @@ -158,10 +158,10 @@ def search_for(dependency)
# spec group.
sg_ruby = sg.copy_for(Gem::Platform::RUBY)
selected_sgs << sg_ruby if sg_ruby
sg_all_platforms = nil
all_platforms = @platforms + [platform]
sorted_all_platforms = self.class.sort_platforms(all_platforms)
sorted_all_platforms.reverse_each do |other_platform|
next if all_platforms.to_a == [Gem::Platform::RUBY]
sg_all_platforms = nil
self.class.sort_platforms(all_platforms).reverse_each do |other_platform|
if sg_all_platforms.nil?
sg_all_platforms = sg.copy_for(other_platform)
else
Expand Down
5 changes: 4 additions & 1 deletion bundler/spec/install/gems/resolving_spec.rb
Expand Up @@ -107,10 +107,13 @@

bundle :install, :env => { "DEBUG_RESOLVER_TREE" => "1" }

activated_groups = "net_b (1.0) (ruby)"
activated_groups += ", net_b (1.0) (#{local_platforms.join(", ")})" if local_platforms.any? && local_platforms != ["ruby"]

expect(err).to include(" net_b").
and include("BUNDLER: Starting resolution").
and include("BUNDLER: Finished resolution").
and include("Attempting to activate")
and include("Attempting to activate [#{activated_groups}]")
end
end
end
Expand Down