summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-06-19 17:02:55 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-10 12:08:15 +0200
commit00b095b98fe4bd44950beaf3bc9f1d91eac7b69e (patch)
tree58a665f3663f9f82dba7cd2d27243c0a3a5b9c56
parent3dc509e645abb497e4dc92a7c42be471ff87db0b (diff)
downloadbundler-00b095b98fe4bd44950beaf3bc9f1d91eac7b69e.tar.gz
Remove now meaningless warning
-rw-r--r--lib/bundler/definition.rb12
-rw-r--r--spec/install/gemfile/platform_spec.rb19
2 files changed, 1 insertions, 30 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 8f85b2ccec..6d7257a715 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -896,17 +896,7 @@ module Bundler
dependencies.each do |dep|
dep = Dependency.new(dep, ">= 0") unless dep.respond_to?(:name)
next if !remote && !dep.current_platform?
- platforms = dep.gem_platforms(sorted_platforms)
- if platforms.empty? && !Bundler.settings[:disable_platform_warnings]
- mapped_platforms = dep.expanded_platforms
- Bundler.ui.warn \
- "The dependency #{dep} will be unused by any of the platforms Bundler is installing for. " \
- "Bundler is installing for #{@platforms.join ", "} but the dependency " \
- "is only for #{mapped_platforms.join ", "}. " \
- "To add those platforms to the bundle, " \
- "run `bundle lock --add-platform #{mapped_platforms.join " "}`."
- end
- platforms.each do |p|
+ dep.gem_platforms(sorted_platforms).each do |p|
deps << DepProxy.new(dep, p) if remote || p == generic_local_platform
end
end
diff --git a/spec/install/gemfile/platform_spec.rb b/spec/install/gemfile/platform_spec.rb
index 4cbf238416..d065e10600 100644
--- a/spec/install/gemfile/platform_spec.rb
+++ b/spec/install/gemfile/platform_spec.rb
@@ -406,25 +406,6 @@ RSpec.describe "bundle install with platform conditionals" do
#{Bundler::VERSION}
L
end
-
- context "when disable_platform_warnings is true" do
- before { bundle! "config set disable_platform_warnings true" }
-
- it "does not print the warning when a dependency is unused on any platform" do
- simulate_platform "ruby"
- simulate_ruby_engine "ruby"
-
- gemfile <<-G
- source "#{file_uri_for(gem_repo1)}"
-
- gem "rack", :platform => [:mingw, :mswin, :x64_mingw, :jruby]
- G
-
- bundle! "install"
-
- expect(out).not_to match(/The dependency (.*) will be unused/)
- end
- end
end
RSpec.describe "when a gem has no architecture" do