class Bundler::PubGrub::FailureWriter

def collapsible?(incompatibility)

def collapsible?(incompatibility)
  return false if @derivations[incompatibility] > 1
  cause = incompatibility.cause
  # If incompatibility is derived from two derived incompatibilities,
  # there are too many transitive causes to display concisely.
  return false if cause.conflict.conflict? && cause.other.conflict?
  # If incompatibility is derived from two external incompatibilities, it
  # tends to be confusing to collapse it.
  return false unless cause.conflict.conflict? || cause.other.conflict?
  # If incompatibility's internal cause is numbered, collapsing it would
  # get too noisy.
  complex = cause.conflict.conflict? ? cause.conflict : cause.other
  !@line_numbers.has_key?(complex)
end