diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-02-09 22:11:58 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-21 19:28:12 +0900 |
commit | b5eb9ebd5d4eef4ef2c1a4d32b70c17807b834bb (patch) | |
tree | 33cca110967214911d56c981fe9f0bfdf7d1d8fc /spec/bundler/commands | |
parent | 4064e3e7769d7cac03f817ede1c4a7d0f97b1ae0 (diff) | |
download | ruby-b5eb9ebd5d4eef4ef2c1a4d32b70c17807b834bb.tar.gz |
[rubygems/rubygems] Fix crash in pub grub involving empty ranges
https://github.com/rubygems/rubygems/commit/0f168516f7
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r-- | spec/bundler/commands/lock_spec.rb | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/spec/bundler/commands/lock_spec.rb b/spec/bundler/commands/lock_spec.rb index 8c4c22d6bd..f244a14ef4 100644 --- a/spec/bundler/commands/lock_spec.rb +++ b/spec/bundler/commands/lock_spec.rb @@ -644,6 +644,62 @@ RSpec.describe "bundle lock" do bundle "lock --add-platform x86_64-linux", :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } end + it "does not crash on conflicting ruby requirements between platform versions in two different gems" do + build_repo4 do + build_gem "unf_ext", "0.0.8.2" + + build_gem "unf_ext", "0.0.8.2" do |s| + s.required_ruby_version = [">= 2.4", "< #{previous_ruby_minor}"] + s.platform = "x64-mingw32" + end + + build_gem "unf_ext", "0.0.8.2" do |s| + s.required_ruby_version = [">= #{previous_ruby_minor}", "< #{current_ruby_minor}"] + s.platform = "x64-mingw-ucrt" + end + + build_gem "google-protobuf", "3.21.12" + + build_gem "google-protobuf", "3.21.12" do |s| + s.required_ruby_version = [">= 2.5", "< #{previous_ruby_minor}"] + s.platform = "x64-mingw32" + end + + build_gem "google-protobuf", "3.21.12" do |s| + s.required_ruby_version = [">= #{previous_ruby_minor}", "< #{current_ruby_minor}"] + s.platform = "x64-mingw-ucrt" + end + end + + gemfile <<~G + source "https://gem.repo4" + + gem "google-protobuf" + gem "unf_ext" + G + + lockfile <<~L + GEM + remote: https://gem.repo4/ + specs: + google-protobuf (3.21.12) + unf_ext (0.0.8.2) + + PLATFORMS + x64-mingw-ucrt + x64-mingw32 + + DEPENDENCIES + google-protobuf + unf_ext + + BUNDLED WITH + #{Bundler::VERSION} + L + + bundle "install --verbose", :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s, "DEBUG_RESOLVER" => "1" } + end + it "respects lower bound ruby requirements" do build_repo4 do build_gem "our_private_gem", "0.1.0" do |s| |