Skip to content

Fix regressions of bundler/inline's forked install - #10048

Merged
hsbt merged 3 commits into
masterfrom
claude/jovial-bassi-90d735
Nov 10, 2026
Merged

hsbt merged 3 commits into
masterfrom
claude/jovial-bassi-90d735

Conversation

@hsbt

@hsbt hsbt commented Nov 10, 2026

Copy link
Copy Markdown
Member

Since 4.1.0.beta1, bundler/inline installs gems from a forked child (#7941). The child runs the script's at_exit hooks a second time, an install failure ends the script through exit instead of raising an error the script can rescue, and "Fetching gem metadata" and "Resolving dependencies..." are printed twice.

The child now ends with exit!. When it fails, the parent installs again in its own process, so the error is raised where the script can rescue it. The parent's setup after a forked install no longer prints resolution output.

The fork stays, because building native extensions in the script's process activates default gems such as tempfile and overrides a Gemfile pin on them. The specs are adapted from #10033, thanks to smasry.

Generated with Claude Code

hsbt and others added 3 commits November 11, 2026 06:13
The forked installer child ran the script's at_exit hooks on its way out and reported a failure by making the parent exit, so the script could not rescue it. The child now always ends with exit!, even when flushing its output to a closed pipe fails, and when it fails the parent installs again to raise the error where the script can handle it.

Co-authored-by: Samer Masry <smasry@agero.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a forked install the parent resolves again to set up the bundle, which repeated the metadata and resolution lines the child had already printed.

Co-authored-by: Samer Masry <smasry@agero.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
securerandom is now loaded as Gem::SecureRandom, while building native extensions still activates tempfile, tmpdir and open3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsbt
hsbt force-pushed the claude/jovial-bassi-90d735 branch from 78cfc8c to 0efc389 Compare November 10, 2026 21:13
@hsbt
hsbt merged commit dfaf5d8 into master Nov 10, 2026
114 checks passed
@hsbt
hsbt deleted the claude/jovial-bassi-90d735 branch November 10, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant