Skip to content

Print a release notes link instead of the whole changelog on gem update --system - #9794

Open
hsbt wants to merge 3 commits into
masterfrom
claude/rubygems-issue-9789-54fca2
Open

Print a release notes link instead of the whole changelog on gem update --system#9794
hsbt wants to merge 3 commits into
masterfrom
claude/rubygems-issue-9789-54fca2

Conversation

@hsbt

@hsbt hsbt commented Aug 21, 2026

Copy link
Copy Markdown
Member

gem update --system prints every CHANGELOG.md entry newer than the previous version, which is 478 of the 499 output lines on the ruby:3.4 Docker image. The changelog is generated from merged PR titles, so what gets printed is closer to a PR list than release notes. This replaces the dump with a single line linking the versioned CHANGELOG.md. setup.rb keeps accepting --previous-version so the message can name the range to read. The changelog is printed by the new version's setup.rb child process, so this also takes effect when upgrading from older RubyGems.

With this change, gem update --system prints the link where the changelog dump used to be:

$ gem update --system
Installing RubyGems 4.0.19
...
RubyGems 4.0.19 installed
Regenerating binstubs
Regenerating plugins

See https://github.com/ruby/rubygems/blob/v4.0.19/CHANGELOG.md for the changes since 3.6.9.

------------------------------------------------------------------------------

RubyGems installed the following executables:
	/usr/local/bin/gem
	/usr/local/bin/bundle
	/usr/local/bin/bundler

RubyGems system software updated

The update suggestion shown before updating gets the same link and now matches npm's three-line notice:

A new release of RubyGems is available: 3.6.9 → 4.0.19!
See https://github.com/ruby/rubygems/blob/v4.0.19/CHANGELOG.md for the changes since 3.6.9.
Run `gem update --system 4.0.19` to update your installation.

Fixes #9789

hsbt and others added 3 commits August 21, 2026 18:17
…ystem

CHANGELOG.md is over 7,000 lines of generated PR titles, and printing
every entry since the previous version dominates the output (478 of 499
lines on the ruby:3.4 image). Print a single link to the versioned
CHANGELOG.md instead, keeping --previous-version so the message can name
the range to read.

Fixes #9789

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With the changelog dump removed from gem update --system, the update
suggestion is where users decide whether to update, so link the release
notes for the latest version there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use the same versioned CHANGELOG.md link as setup so the notice covers
the cumulative changes since the installed version, not just the latest
release.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hsbt

hsbt commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

@kenchan How about this?

@kenchan

kenchan commented Aug 21, 2026

Copy link
Copy Markdown

Thanks, this is exactly what I had in mind — really glad to see it.

I went through it with Claude Code and found two cases where the new message isn't accurate. Both only affect ruby setup.rb, not gem update --system. Just sharing them here:

  1. On master Gem::VERSION is 4.1.0.dev, so the link comes out as blob/v4.1.0.dev/CHANGELOG.md — a 404, since there's no such tag.
  2. Without --previous-version, these lines synthesize one, so the message says "since 4.0.0" from a tarball and "since 4.1.0.dev" from a checkout — either way a version the user never had.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Print a link to the release notes instead of the whole changelog on gem update --system

2 participants