diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb index 2cb8412cf328f0..4caf6b355bf75b 100644 --- a/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb @@ -162,7 +162,7 @@ def choose_package_version def resolve_conflict(incompatibility) logger.info { "conflict: #{incompatibility}" } - new_incompatibility = false + new_incompatibility = nil while !incompatibility.failure? most_recent_term = nil @@ -204,7 +204,7 @@ def resolve_conflict(incompatibility) solution.backtrack(previous_level) if new_incompatibility - add_incompatibility(incompatibility) + add_incompatibility(new_incompatibility) end return incompatibility @@ -219,9 +219,14 @@ def resolve_conflict(incompatibility) new_terms << difference.invert end - incompatibility = Incompatibility.new(new_terms, cause: Incompatibility::ConflictCause.new(incompatibility, most_recent_satisfier.cause)) + new_incompatibility = Incompatibility.new(new_terms, cause: Incompatibility::ConflictCause.new(incompatibility, most_recent_satisfier.cause)) - new_incompatibility = true + if incompatibility.to_s == new_incompatibility.to_s + logger.info { "!! failed to resolve conflicts, this shouldn't have happened" } + break + end + + incompatibility = new_incompatibility partially = difference ? " partially" : "" logger.info { "! #{most_recent_term} is#{partially} satisfied by #{most_recent_satisfier.term}" } diff --git a/tool/bundler/dev_gems.rb.lock b/tool/bundler/dev_gems.rb.lock index c7c323ea54517e..1bec91b5e0c793 100644 --- a/tool/bundler/dev_gems.rb.lock +++ b/tool/bundler/dev_gems.rb.lock @@ -10,7 +10,7 @@ GEM parallel power_assert (2.0.3) rake (13.0.6) - rb_sys (0.9.78) + rb_sys (0.9.79) rdiscount (2.2.7) ronn (0.7.3) hpricot (>= 0.8.2) @@ -29,7 +29,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) - test-unit (3.5.9) + test-unit (3.6.0) power_assert turbo_tests (2.1.0) bundler (>= 2.1) @@ -40,6 +40,7 @@ GEM PLATFORMS arm64-darwin-22 + arm64-darwin-23 java universal-java-11 universal-java-18 diff --git a/tool/bundler/rubocop_gems.rb b/tool/bundler/rubocop_gems.rb index 9cb740cd151b17..4d0b21060af8cb 100644 --- a/tool/bundler/rubocop_gems.rb +++ b/tool/bundler/rubocop_gems.rb @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rubocop", "~> 1.7" +gem "rubocop", ">= 1.52.1", "< 2" gem "minitest" gem "rake" diff --git a/tool/bundler/rubocop_gems.rb.lock b/tool/bundler/rubocop_gems.rb.lock index 7f43e38dcbf2a5..aa51eae5bef039 100644 --- a/tool/bundler/rubocop_gems.rb.lock +++ b/tool/bundler/rubocop_gems.rb.lock @@ -5,17 +5,20 @@ GEM diff-lcs (1.5.0) json (2.6.3) json (2.6.3-java) - minitest (5.16.3) - parallel (1.22.1) - parser (3.1.3.0) + minitest (5.18.0) + parallel (1.23.0) + parser (3.2.2.3) ast (~> 2.4.1) - power_assert (2.0.2) + racc + power_assert (2.0.3) + racc (1.7.1) + racc (1.7.1-java) rainbow (3.1.1) rake (13.0.6) - rake-compiler (1.2.0) + rake-compiler (1.2.3) rake - rb_sys (0.9.63) - regexp_parser (2.6.1) + rb_sys (0.9.79) + regexp_parser (2.8.1) rexml (3.2.5) rspec (3.12.0) rspec-core (~> 3.12.0) @@ -30,28 +33,29 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) - rubocop (1.40.0) + rubocop (1.52.1) json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.2.1) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.23.0, < 2.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.24.0) - parser (>= 3.1.1.0) - ruby-progressbar (1.11.0) - test-unit (3.5.5) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) + ruby-progressbar (1.13.0) + test-unit (3.6.0) power_assert - unicode-display_width (2.3.0) + unicode-display_width (2.4.2) PLATFORMS aarch64-linux arm64-darwin-20 arm64-darwin-21 arm64-darwin-22 + arm64-darwin-23 universal-java-11 universal-java-18 x64-mingw-ucrt @@ -66,7 +70,7 @@ DEPENDENCIES rake-compiler rb_sys rspec - rubocop (~> 1.7) + rubocop (>= 1.52.1, < 2) test-unit BUNDLED WITH diff --git a/tool/bundler/standard_gems.rb.lock b/tool/bundler/standard_gems.rb.lock index d0387b438c1969..b95ff611e8e909 100644 --- a/tool/bundler/standard_gems.rb.lock +++ b/tool/bundler/standard_gems.rb.lock @@ -5,18 +5,22 @@ GEM diff-lcs (1.5.0) json (2.6.3) json (2.6.3-java) - language_server-protocol (3.17.0.2) - minitest (5.16.3) - parallel (1.22.1) - parser (3.1.3.0) + language_server-protocol (3.17.0.3) + lint_roller (1.0.0) + minitest (5.18.0) + parallel (1.23.0) + parser (3.2.2.3) ast (~> 2.4.1) - power_assert (2.0.2) + racc + power_assert (2.0.3) + racc (1.7.1) + racc (1.7.1-java) rainbow (3.1.1) rake (13.0.6) - rake-compiler (1.2.0) + rake-compiler (1.2.3) rake - rb_sys (0.9.63) - regexp_parser (2.6.1) + rb_sys (0.9.79) + regexp_parser (2.8.1) rexml (3.2.5) rspec (3.12.0) rspec-core (~> 3.12.0) @@ -31,35 +35,43 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) - rubocop (1.39.0) + rubocop (1.52.1) json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.2.1) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.23.0, < 2.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.24.0) - parser (>= 3.1.1.0) - rubocop-performance (1.15.1) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) + rubocop-performance (1.18.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - ruby-progressbar (1.11.0) - standard (1.19.1) + ruby-progressbar (1.13.0) + standard (1.29.0) language_server-protocol (~> 3.17.0.2) - rubocop (= 1.39.0) - rubocop-performance (= 1.15.1) - test-unit (3.5.5) + lint_roller (~> 1.0) + rubocop (~> 1.52.0) + standard-custom (~> 1.0.0) + standard-performance (~> 1.1.0) + standard-custom (1.0.1) + lint_roller (~> 1.0) + standard-performance (1.1.0) + lint_roller (~> 1.0) + rubocop-performance (~> 1.18.0) + test-unit (3.6.0) power_assert - unicode-display_width (2.3.0) + unicode-display_width (2.4.2) PLATFORMS aarch64-linux arm64-darwin-20 arm64-darwin-21 arm64-darwin-22 + arm64-darwin-23 universal-java-11 universal-java-18 x64-mingw-ucrt diff --git a/tool/bundler/test_gems.rb b/tool/bundler/test_gems.rb index 9ba5763a3bf7ad..6de392132a6f70 100644 --- a/tool/bundler/test_gems.rb +++ b/tool/bundler/test_gems.rb @@ -7,6 +7,8 @@ gem "rack-test", "~> 1.1" gem "compact_index", "~> 0.13.0" gem "sinatra", "~> 2.0" +# for Ruby 2.6. bundler/spec/install/gemfile/sources_spec.rb is failed with sinatra-2.0.8.1 and tilt-2.2.0. +gem "tilt", "~> 2.0.11" gem "rake", "13.0.1" gem "builder", "~> 3.2" gem "rb_sys" diff --git a/tool/bundler/test_gems.rb.lock b/tool/bundler/test_gems.rb.lock index 8b4bb4ddfbe6aa..1f149891e8bbc0 100644 --- a/tool/bundler/test_gems.rb.lock +++ b/tool/bundler/test_gems.rb.lock @@ -11,7 +11,7 @@ GEM rack-test (1.1.0) rack (>= 1.0, < 3) rake (13.0.1) - rb_sys (0.9.63) + rb_sys (0.9.79) ruby2_keywords (0.0.5) sinatra (2.0.8.1) mustermann (~> 1.0) @@ -39,6 +39,7 @@ DEPENDENCIES rake (= 13.0.1) rb_sys sinatra (~> 2.0) + tilt (~> 2.0.11) webrick (= 1.7.0) BUNDLED WITH