Actions
Misc #21770
openStop bumping RUBY_PATCHLEVEL in release versions
Misc #21770:
Stop bumping RUBY_PATCHLEVEL in release versions
Status:
Open
Assignee:
-
Description
Proposal¶
- Stop bumping
RUBY_PATCHLEVELfrom0in Ruby 4.0.0+
Motivation¶
- As a stable branch maintainer, I find it frustrating that reverting a commit made by
tool/merger.rboften causes a conflict on#define RUBY_PATCHLEVEL.
Background¶
- From Ruby 2.1.0, we stopped doing multiple patch-level releases for a single version, e.g. 2.0.0-p647 and 2.0.0-p648 for Ruby 2.0.0.
- From Ruby 3.2.0, we stopped showing patch levels on
RUBY_DESCRIPTION[Feature #18513]. We thought "patch levels no longer serves us very well". - Today, we also backport patches using pull requests on GitHub. We often don't bump
RUBY_PATCHLEVELthere because it's easier to usegit cherry-pickinstead oftool/merger.rb.
Updated by k0kubun (Takashi Kokubun) 1 day ago
- Subject changed from Stop bumping RUBY_PATCHLEVEL in released versions to Stop bumping RUBY_PATCHLEVEL in release versions
Updated by hsbt (Hiroshi SHIBATA) 1 day ago
I agreed this.
I already hide patchlevel from lockfile of Bundler 4.
Updated by Eregon (Benoit Daloze) about 12 hours ago
:+1: I don't think it has any usefulness anymore.
I do know of one usage of RUBY_PATCHLEVEL, for detecting if on a dev build or release version via is_release = RUBY_PATCHLEVEL >= 0.
Notably used in https://github.com/grpc/grpc/blob/46b1795eacc99065c46e3fb60fad808c19f71a87/src/ruby/ext/grpc/extconf.rb#L155
So probably best to keep the constant, but only give it values 0 for releases (and on release branch) or -1 for dev builds (from master).
Actions