[pull] master from ruby:master#1072
Merged
Merged
Conversation
`Source::Rubygems#specs` merges `installed_specs` on top of `remote_specs`, so a `Bundler::StubSpecification` for an already-installed gem overwrites the matching `EndpointSpecification` and erases its `created_at`. The cooldown filter then short-circuited on `spec.respond_to?(:created_at)` and let the local stub through, which made `bundle install --cooldown N` keep selecting a brand-new version that happened to be on disk already. Snapshot the remote `created_at` per `[name, version]` before merging and back-fill it onto stubs that lack one, attaching the source's first remote so `effective_cooldown` is reachable. The filter now runs ahead of `filter_remote_specs` and rejects every spec that shares an `[name, version]` flagged by `cooldown_excluded?`, so a stub and the endpoint that carries its date drop together. `RemoteSpecification` gains `attr_accessor :created_at` so any subclass without an explicit setter participates. `spec/bundler/resolver/cooldown_spec.rb` gets `name`/`version` on the shared spec helper, plus dedicated coverage for the version-grouped exclusion and stub-only fallback. `spec/install/cooldown_spec.rb` adds two end-to-end cases that pre-install `ripe_gem-2.0.0` and verify the in-cooldown copy is excluded while `--cooldown 0` continues to bypass the filter. ruby/rubygems@3920a092da Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Snapshot the remote alongside `created_at` and restore it during backfill so per-remote cooldown settings (`source ..., cooldown: N`) survive into installed stubs instead of being replaced by whichever remote happens to be first. Build `cooldown_excluded_versions` as a hash so `filter_cooldown`'s membership check is O(1) per spec; large Gemfiles with many candidate versions no longer pay an O(n*m) scan. ruby/rubygems@58669f2890 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dir.each_child yields entry names, so stat/digest/children ran against the working directory instead of HOME. Join dir and name first. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Molinillo (a backtracking resolver) is replaced by PubGrub (a CDCL SAT-based solver) which provides better conflict explanations, smarter backjumping, and provable completeness. PubGrub is already used by Bundler; this vendors the same library re-namespaced under Gem::PubGrub. Key changes: - Vendor PubGrub from bundler/lib/bundler/vendor/pub_grub/, re-namespaced Bundler::PubGrub -> Gem::PubGrub - Rewrite Gem::Resolver to implement PubGrub's source interface (all_versions_for, versions_for, incompatibilities_for, etc.) - Add Gem::Resolver::PubGrubFailure for error reporting via PubGrub's superior conflict explanation format - Add Source::Local#find_all_gems to expose all local gem versions (PubGrub needs complete version information upfront) - Prefer installed specs in version ordering to avoid unnecessary upgrades - Delete Molinillo (21 files, ~2400 lines) and resolver/stats.rb ruby/rubygems@df02d4110c Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ps test Preserve the original dependency requirement from root deps when building ActivationRequests, so lockfiles correctly record constraints like "a (>= 1)" instead of bare "a". Update the orphaned dependencies test: PubGrub correctly backtracks from b-2 (missing c-2) to b-1 (has c-1), finding a valid solution that Molinillo's simpler backtracking missed. ruby/rubygems@ff04cd9d90 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…DependencyResolutionError ruby/rubygems@6592033131
…ions_for and versions_for PubGrub requires both methods to agree on the version universe. ruby/rubygems@23b9505131
…g filtered incorrectly ruby/rubygems@4c280ac057
… ties When version and platform match across sources, prefer the earlier source. This formalises existing behaviour and matches Bundler. Cross-version selection is unchanged. ruby/rubygems@8f2cd72650
…errors & test and document Bundler-aligned resolver behaviors ruby/rubygems@3d5dfa91b9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )