mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[bundler/bundler] Don't re-resolve locked platform specific gems
7da2bf75f5
This commit is contained in:
parent
33fdd87227
commit
2771789302
2 changed files with 29 additions and 1 deletions
|
@ -813,7 +813,7 @@ module Bundler
|
|||
|
||||
resolve = SpecSet.new(converged)
|
||||
expanded_deps = expand_dependencies(deps, true)
|
||||
@locked_specs_incomplete_for_platform = !resolve.for(expanded_deps, @unlock[:gems], true, true)
|
||||
@locked_specs_incomplete_for_platform = !resolve.for(expand_dependencies(deps), @unlock[:gems], true, true)
|
||||
resolve = resolve.for(expanded_deps, @unlock[:gems], false, false, false)
|
||||
diff = nil
|
||||
|
||||
|
|
|
@ -147,6 +147,34 @@ RSpec.describe Bundler::Definition do
|
|||
G
|
||||
end
|
||||
|
||||
it "for a locked gem for another platform" do
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo1)}"
|
||||
gem "only_java", platform: :jruby
|
||||
G
|
||||
|
||||
bundle "lock --add-platform java"
|
||||
bundle :check, :env => { "DEBUG" => 1 }
|
||||
|
||||
expect(out).to match(/using resolution from the lockfile/)
|
||||
lockfile_should_be <<-G
|
||||
GEM
|
||||
remote: #{file_uri_for(gem_repo1)}/
|
||||
specs:
|
||||
only_java (1.1-java)
|
||||
|
||||
PLATFORMS
|
||||
java
|
||||
#{lockfile_platforms}
|
||||
|
||||
DEPENDENCIES
|
||||
only_java
|
||||
|
||||
BUNDLED WITH
|
||||
#{Bundler::VERSION}
|
||||
G
|
||||
end
|
||||
|
||||
it "for a rubygems gem" do
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo1)}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue