[ruby/rubygems] Limit the gemfile(5) promise that override changes keep locked versions

A locked gem that is not installed and whose metadata rejects the current Ruby is re-resolved during materialization whether or not an override changed, so the man page cannot promise that adding or removing a metadata override never moves a locked version.

https://github.com/ruby/rubygems/commit/c3e0897ff1

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
This commit is contained in:
Hiroshi SHIBATAandClaude Mythos 5.1 authored and git committed 2026-10-27 00:42:49 +00:00
1 parent b77c9f32dc
commit 12ebde9bf1
2 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -530,7 +530,7 @@ OVERRIDES
.fi
.IP "" 0
.P
Requirements are recorded in normalized form, so \fB">=8\.0"\fR and \fB">= 8\.0"\fR are the same override\. A frozen install fails when the Gemfile's overrides differ from the recorded ones\. Adding or removing a \fB:all\fR or metadata override rewrites the section without moving locked versions; run \fBbundle update\fR to re\-resolve under it\. When resolution still fails, Bundler appends the active overrides (with their Gemfile location) to the error message so it is clear which override shaped the constraint set\.
Requirements are recorded in normalized form, so \fB">=8\.0"\fR and \fB">= 8\.0"\fR are the same override\. A frozen install fails when the Gemfile's overrides differ from the recorded ones\. Adding or removing a \fB:all\fR or metadata override rewrites the section and keeps the locked versions\. The exception is a locked gem that is not installed and whose metadata rejects the current Ruby\. Bundler re\-resolves it, as it does without the override\. Run \fBbundle update\fR to re\-resolve under the override\. When resolution still fails, Bundler appends the active overrides (with their Gemfile location) to the error message so it is clear which override shaped the constraint set\.
.SS "DROPPING OR REPLACING A DEPENDENCY"
\fBfrom:\fR and \fBto:\fR rewrite a single dependency of a single gem:
.IP "" 4
+4 -2
View File
@@ -634,8 +634,10 @@ recorded in the lockfile's `OVERRIDES` section, one line per field, sorted:
Requirements are recorded in normalized form, so `">=8.0"` and `">= 8.0"` are
the same override. A frozen install fails when the Gemfile's overrides differ
from the recorded ones. Adding or removing a `:all` or metadata override
rewrites the section without moving locked versions; run `bundle update` to
re-resolve under it. When resolution still fails,
rewrites the section and keeps the locked versions. The exception is a locked
gem that is not installed and whose metadata rejects the current Ruby. Bundler
re-resolves it, as it does without the override. Run `bundle update` to
re-resolve under the override. When resolution still fails,
Bundler appends the active overrides (with their Gemfile location) to the
error message so it is clear which override shaped the constraint set.