Skip to content

Keep negative any terms when PubGrub resolves conflicts - #10112

Merged
hsbt merged 2 commits into
ruby:masterfrom
hsbt:keep-negative-any-terms
Nov 20, 2026
Merged

hsbt merged 2 commits into
ruby:masterfrom
hsbt:keep-negative-any-terms

Conversation

@hsbt

@hsbt hsbt commented Nov 20, 2026

Copy link
Copy Markdown
Member

Both bundle lock and gem install can fail even when an older gem version has no dependencies. In #10084, PubGrub drops not ff any and treats the conflict over ll as unconditional.

Check the original constraint in Term#empty? so the solver can backtrack from aa 2.0.0 to aa 1.0.0.

The Term#empty? hunk can be removed from the vendor patch once jhawthorn/pub_grub#40 is merged and RubyGems vendors a revision that includes it.

hsbt added 2 commits November 20, 2026 11:46
Dropping a negative any term makes a conflict apply even when the package is absent. This prevents the solver from backtracking to an older version that does not depend on that package.
@hsbt
hsbt merged commit 6e49a99 into ruby:master Nov 20, 2026
114 checks passed
@hsbt hsbt added bundler: bug fix skip old stable Leave out of releases on the old stable line labels Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bundler: bug fix rubygems: bug fix skip old stable Leave out of releases on the old stable line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant