Skip to content

Make the RubyGems and Bundler suites green under RUBY_BOX=1 - #9826

Merged
hsbt merged 10 commits into
masterfrom
ruby-box-green-round1
Sep 15, 2026
Merged

hsbt merged 10 commits into
masterfrom
ruby-box-green-round1

Conversation

@hsbt

@hsbt hsbt commented Aug 28, 2026

Copy link
Copy Markdown
Member

The RubyGems and Bundler suites did not pass with RUBY_BOX=1 on ruby master. This makes bin/rake test:parallel and bin/rake spec:regular pass in both modes. ruby-core.yml now builds ruby/ruby master and runs both with and without RUBY_BOX=1, because the setup-ruby head build lags ruby/ruby by up to a day.

Checks reading $? move to Process.last_status since Ruby::Box leaves it uninitialized, which also stops Gem::Source::Git#rev_parse and the release tool from carrying on after a failing command. Spawned rubies no longer leak the experimental warning into asserted output. Examples that hit unfixed ruby-core bugs, such as stdio capture, $VERBOSE and command line -r, are pended or skipped under Ruby::Box only, each naming its issue.

The content-addressed ABI pin example is also skipped on prerelease Ruby, where ~> X.Y.0 does not match.

Generated with Claude Code

@hsbt
hsbt force-pushed the ruby-box-green-round1 branch from bcc02be to 5f2d481 Compare August 31, 2026 08:38
@hsbt
hsbt force-pushed the ruby-box-green-round1 branch 3 times, most recently from 35619ee to 719b42d Compare September 14, 2026 09:29
hsbt and others added 4 commits September 14, 2026 18:45
Under RUBY_BOX=1 every spawned ruby prints an experimental warning to stderr, which breaks assertions on subprocess output in both suites. The Bundler specs filter the captured stderr instead of adding -W:no-experimental to RUBYOPT, because several of them assert the exact RUBYOPT propagated to subprocesses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Ruby::Box leaves $? uninitialized, so status checks read success after a failing command. Under RUBY_BOX=1 this made Gem::Source::Git#rev_parse swallow rev-parse failures and the release tool carry on with empty output.

https://bugs.ruby-lang.org/issues/22280

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Each box gets detached copies of the stdio globals, so reassigning $stdout or $stderr cannot capture output written by Kernel#warn, Kernel#puts or subprocesses.

https://bugs.ruby-lang.org/issues/21867

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Ruby::Box ignores $VERBOSE=, so assert_ractor cannot keep the Ractor experimental warning out of the child stderr.

https://bugs.ruby-lang.org/issues/22282

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hsbt
hsbt force-pushed the ruby-box-green-round1 branch from fd3e973 to e5ae427 Compare September 14, 2026 09:48
@hsbt hsbt changed the title Make the RubyGems test suite green under RUBY_BOX=1 Make the RubyGems and Bundler suites green under RUBY_BOX=1 Sep 14, 2026
hsbt and others added 6 commits September 15, 2026 13:35
The setup-ruby head build lags ruby/ruby by up to a day, so Ruby::Box fixes that have already landed would stay out of a head lane.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A command line or RUBYOPT -r bypasses the RubyGems Kernel#require override under RUBY_BOX=1, so the gem is never activated. The cargo tests require inside -e instead, and the BUNDLE_CLEAN native extension example, which needs RUBYOPT -r, is skipped.

https://bugs.ruby-lang.org/issues/22295

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A blanket stub also caught the path lookups of a lazy require of rubygems/yaml_serializer, which crashed with Errno::ENOENT under RUBY_BOX=1 with the parallel workers. These examples only need bundler/setup faked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The recursion is not in RbConfig.expand. Inside a box defined?($gvar) does not see assignments made in that box, so mkmf have_devel? never sees its own memo.

https://bugs.ruby-lang.org/issues/22283

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Content-addressed gems pin required_ruby_version to ~> X.Y.0, which a prerelease Ruby such as 4.1.0.dev does not satisfy, so the gem is never resolved on ruby-head.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A broken ruby/ruby build is not something this repository can fix, so it should not fail the required check for every pull request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hsbt
hsbt force-pushed the ruby-box-green-round1 branch from 0131d86 to ec7b4fb Compare September 15, 2026 04:36
@hsbt
hsbt merged commit 4deebb6 into master Sep 15, 2026
113 checks passed
@hsbt
hsbt deleted the ruby-box-green-round1 branch September 15, 2026 05:08
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.

1 participant