Skip to content

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

Open
hsbt wants to merge 2 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 2 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

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.

hsbt and others added 2 commits August 24, 2026 17:26
…ate --system`

CHANGELOG.md is over 7,000 lines of generated PR titles, and printing every entry since the previous version dominated the output (478 of the 499 lines on the ruby:3.4 image). Print a single line linking the versioned CHANGELOG.md instead. setup.rb keeps accepting --previous-version so the message can name the range to read. The link falls back to master for .dev versions, which have no tag, and the since clause is dropped when the value is missing, invalid, or not older than the installed version.

Fixes #9789

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
With the changelog dump gone, the pre-update notice is where users decide whether to update, so link the versioned CHANGELOG.md there too, matching npm's three-line notice.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hsbt
hsbt force-pushed the claude/rubygems-issue-9789-54fca2 branch from 53d3414 to 4ca3c9e Compare August 24, 2026 08:26
@hsbt

hsbt commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

Thanks for checking these. Both are fixed now: a .dev version links blob/master/CHANGELOG.md since it has no tag, and when --previous-version is missing, invalid, or not older than the installed version, the message drops the since clause instead of naming 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