[ruby-on-rails] Bump Gemfile and Bundler to 4.0.10#220
Merged
hayat01sh1da merged 2 commits intomasterfrom Apr 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Ruby on Rails sample apps to use Bundler 4.0.10 across Docker builds and lockfiles.
Changes:
- Bumped
BUNDLED WITHfrom 4.0.9 → 4.0.10 in multipleGemfile.lockfiles - Updated Docker
ARG BUNDLER_VERSIONto 4.0.10 in corresponding app images
Reviewed changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ruby-on-rails/restful-api/Gemfile.lock | Updates lockfile BUNDLED WITH version to 4.0.10 |
| ruby-on-rails/restful-api/Dockerfile | Bumps Docker build-time Bundler version to 4.0.10 |
| ruby-on-rails/perfect-ruby-on-rails/Gemfile.lock | Updates lockfile BUNDLED WITH version to 4.0.10 |
| ruby-on-rails/perfect-ruby-on-rails/Dockerfile | Bumps Docker build-time Bundler version to 4.0.10 |
| ruby-on-rails/e-navigator/Gemfile.lock | Updates lockfile BUNDLED WITH version to 4.0.10 |
| ruby-on-rails/e-navigator/Dockerfile | Bumps Docker build-time Bundler version to 4.0.10 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…d-bundler-to-4.0.10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0. Summary
4.0.9 targeted the install phase: gems download and install in parallel more efficiently (split download/install, priority queue for native extensions,
BUNDLE_JOBSworker count), and transient network failures are handled with exponential backoff plus a dumb-HTTP fetch fallback.4.0.10 targeted the resolution phase: version comparison is dramatically faster thanks to integer sort keys and reordered branch logic, while PubGrub's version-selection hot path is now memoised. On the compatibility front, JRuby users sharing a
GEM_HOMEno longer see false extension warnings, and platform-mismatch errors now include a concrete "runbundle lock --add-platform" hint. A newdefault_cli_commandsetting lets users restore Bundler 3's auto-install behaviour, and a regression that brokebundle gem --ext=rustscaffolding was fixed.1. Bundler 4.0.9
Released: March 28, 2026 | Tag:
bundler-v4.0.9| Commit:3ce4a321-1. Enhancements
Each git gem source used to spawn a separate
git --versionsystem call (~50 ms each). The version is now checked once and cached at the class level, saving significant overhead in Gemfiles with multiple git sources.BUNDLE_JOBS(#9400 by Edouard-chin)Download and install worker pools previously used a hard-coded count of 5. They now honour the
BUNDLE_JOBSsetting (defaulting toEtc.nprocessors), making parallel downloads faster — especially behind CDNs like Fastly that front RubyGems.org.Bundler retries previously had no backoff. Retries now use exponential backoff with jitter (1 s base × 2^attempt + 0–0.5 s random), reducing thundering-herd pressure on flaky networks. Closes long-standing #5361.
After a gem with native extensions is downloaded and its dependencies are installed, it is now promoted to a priority queue so compilation starts as early as possible instead of waiting at the tail. Benchmarked at ~13 % faster
bundle installon a fresh Rails app (gains scale with compilation time).Previously Bundler waited for a leaf gem to be fully downloaded and installed before queueing its parent. Now all gems are downloaded first; pure-Ruby gems install immediately while native-extension gems still wait for their deps. This unblocks idle threads and reduces tail latency. Also lays groundwork for a future
bundle downloadcommand (#9138).1-2. Bug Fixes
git fetchwithout--depthfor dumb HTTP (#9405 by hsbt)Dumb HTTP git servers cannot handle shallow fetches. Bundler already retried
git clonewithout--depthbut the same fallback was missing forgit fetch, causingbundle installfailures on update. Fixed by refactoring the command assembly and applying the same retry logic. Fixes #9001.2. Bundler 4.0.10
Released: April 8, 2026 | Tag:
bundler-v4.0.10| Commit:1c1d8852-1. Enhancements
missing_extensions?on JRuby (#8508 by hsbt)When sharing a single
GEM_HOMEacross CRuby and JRuby,missing_extensions?produced noisy false-positive warnings (e.g. forjruby-launcher). Since Java-based extensions ship pre-compiled and don't need per-version rebuilds,missing_extensions?now returnsfalseunconditionally on JRuby, silencing the warnings. Closes #3520.bundle installpreviously showed a confusing "Could not find gem … with platform X" error while listing that very platform among available gems. The error now appends a clear hint: "Your current platform (X) is not included in the lockfile's platforms (Y). Add it withbundle lock --add-platform X." Fixes #9413.versions_for(package, range)is called ~3.2 million times during resolution of a large Gemfile (e.g. Shopify monolith). Identical package+constraint lookups are now memoised in a hash, yielding a ~46 % reduction in resolution time (19.2 s → 10.4 s on that monolith).Gem::Version#<=>(#9417 by Edouard-chin)Reordered the comparison branches so the equality check executes first — a micro-optimisation measured at 1.29× faster iterations-per-second for equal versions.
Gem::Version(#9414 by Edouard-chin)Non-prerelease versions with ≤ 4 segments are converted to a single integer sort key, avoiding segment-by-segment comparison. Benchmarked at ~5× faster for less-than / greater-than comparisons. Skipped for 4.0.9 due to a Windows/Ruby-3.3 GC instability issue that was resolved before 4.0.10.
default_cli_commandconfig option (#8886 by jonbarlo)Running
bundlewith no subcommand now respects a new setting. Setbundle config set default_cli_command installto get the Bundler 3 behaviour (auto-install), or leave the Bundler 4 default (cli_help) to show usage help. Onlyinstallandcli_helpare accepted; invalid values produce a clear validation error.2-2. Bug Fixes
rb_sysgem dependency for Rust extensions (#9416 by bangseongbeom)bundle gem --ext=rustgenerated a Rakefile requiringrb_sys/extensiontask, but #8455 had accidentally dropped therb_sysgem from the template's dependencies. Runningbundle exec rake compiletherefore failed withLoadError. The dependency is now restored in the gemspec template.3. Key Differences at a Glance
BUNDLE_JOBSworkersGem::Version(~5× faster comparisons), happy-path-first<=>missing_extensions?warnings on JRuby, actionable error when platform not in lockfiledefault_cli_commandsetting (install/cli_help)git fetchwithout--depthfor dumb HTTP serversrb_sysdependency for Rust gem scaffolding