summaryrefslogtreecommitdiff
path: root/lib/bundler/vendor/pub_grub
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-12-13 18:08:29 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-12-20 13:15:02 +0900
commitd1533f20f1c3f9b6f2324c62ab1460996cda174a (patch)
tree705fc1a83b9ab4d2b5ffbb93e7993d33f7755bf1 /lib/bundler/vendor/pub_grub
parent96aa1a1a9888720d73321013a5cb4de20381a974 (diff)
[rubygems/rubygems] Detect circular dependency errors
https://github.com/rubygems/rubygems/commit/a8348d271d
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6966
Diffstat (limited to 'lib/bundler/vendor/pub_grub')
-rw-r--r--lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb b/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
index 51e1fc3cdd..dab58ecdf7 100644
--- a/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
+++ b/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb
@@ -8,6 +8,9 @@ module Bundler::PubGrub
InvalidDependency = Struct.new(:package, :constraint) do
end
+ CircularDependency = Struct.new(:package, :constraint) do
+ end
+
NoVersions = Struct.new(:constraint) do
end
@@ -63,6 +66,8 @@ module Bundler::PubGrub
"#{terms[0].to_s(allow_every: true)} depends on #{terms[1].invert}"
when Bundler::PubGrub::Incompatibility::InvalidDependency
"#{terms[0].to_s(allow_every: true)} depends on unknown package #{cause.package}"
+ when Bundler::PubGrub::Incompatibility::CircularDependency
+ "#{terms[0].to_s(allow_every: true)} depends on itself"
when Bundler::PubGrub::Incompatibility::NoVersions
"no versions satisfy #{cause.constraint}"
when Bundler::PubGrub::Incompatibility::ConflictCause