Commit graph

29 commits

Author SHA1 Message Date
David Rodríguez
90085f62fb [rubygems/rubygems] Simulate Bundler 4 in a better way
Overriding the version constant feels too magic and creates a set of
problems. For example, Bundler will lock the simulated version, and that
can cause issues when the lockfile is used under an environment not
simulating Bundler 4 (it will try to auto-install and auto-switch to a
version that does not exist).

On top of that, it can only be configured with an ENV variable which is
not too flexible.

This commit takes a different approach of using a setting, which is
configurable through ENV or `bundle config`, and pass the simulated
version to `Bundler::FeatureFlag`. The real version is still the one set
by `VERSION`, but anything that `Bundler::FeatureFlag` controls will use
the logic of the "simulated version".

In particular, all feature flags and deprecation messages will respect
the simulated version, and this is exactly the set of functionality that
we want users to be able to easily try before releasing it.

8129402193
2025-06-26 08:06:48 +09:00
David Rodríguez
7a297ad2f9
[rubygems/rubygems] Fix Bundler.original_env['GEM_HOME'] when Bundler is trampolined
4c450eb05e
2025-06-24 12:10:50 +09:00
David Rodríguez
32a9f29cc8
[rubygems/rubygems] Remove no longer necessary workarounds for restarts
Since we no longer pass ruby CLI flags in our spec commands, we no
longer need the previous workaround and can get the realworld code
tested.

fd92c855fb
2025-06-24 12:10:50 +09:00
David Rodríguez
441f18df52
Skip to Bundler 4 directly 2025-06-19 10:23:36 +09:00
David Rodríguez
4245d522b2
[rubygems/rubygems] Allow enabling "Bundler 3 mode" more easily
Currently to test Bundler 3 mode we have to actually edit the version
file to simulate we're running a future version. This is inconvenient.

Instead, allow passing an environment variable, `BUNDLER_3_MODE`, to set
the "working mode" Bundler should use.

This can now be set easily by end users to enable them to try out the
changes in the future version and give us feedback.

It's unclear how version auto-switching should work when this
environment variable is set, so the auto-switching feature will be
disabled in that case.

4e92e9b209
2025-06-19 10:23:36 +09:00
David Rodríguez
e4933e1d93 [rubygems/rubygems] Fix bundle update --bundler when restarts disabled
There's no reason why we should not update bundler as requested, even if
restarts are disabled.

e59acd2a0d
2025-06-05 19:12:45 +09:00
David Rodríguez
5cf07c1e8f [rubygems/rubygems] Look in configured path when checking if self-update version is installed
1ce0882e6f
2025-06-05 19:12:44 +09:00
David Rodríguez
0e6805eb31 [rubygems/rubygems] Refactor restarts to not need memoizing the restart version
a9d80a7dcb
2025-06-05 19:12:43 +09:00
David Rodríguez
e74008bfc9 [rubygems/rubygems] Reduce duplication a bit
0574c62fc0
2025-06-05 19:12:40 +09:00
David Rodríguez
9e0eb9778d Merge RubyGems-3.6.2 and Bundler-2.6.2 2024-12-24 07:21:10 +09:00
Camden Narzt
6cde41bc52 [rubygems/rubygems] Fix restarting with locked version when $PROGRAM_NAME has been changed
Use Process.argv0 instead of $PROGRAM_NAME because $PROGRAM_NAME is
liable to be changed but Process.argv0 is not.

43b747dc9e
2024-12-13 14:23:30 +00:00
David Rodríguez
b77ff342cc [rubygems/rubygems] Revert "Fix bundle.bat re-execution"
This reverts commit e04e00f7bb.

554ece1587
2024-10-10 17:57:07 +00:00
David Rodríguez
a90861340a [rubygems/rubygems] Fix bundle.bat re-execution
It does not have ruby code, so we should not prepend `ruby` to the
command the re-execute it.

e04e00f7bb
2024-10-07 16:36:50 +00:00
Samuel Giddins
dfa11551aa [rubygems/rubygems] More rubygems 3.2.x removals
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

272f3464a3
2024-10-04 20:01:52 +00:00
David Rodríguez
5d53993a37 [rubygems/rubygems] Don't try to auto-install dev versions of Bundler not available remotely
1a7a3fdeb9
2024-09-23 10:53:32 +00:00
David Rodríguez
98c923ff4b
Synchronize Bundler & RubyGems (#11071) 2024-06-28 10:12:29 -04:00
David Rodríguez
3e84da0970 [rubygems/rubygems] Auto switch to locked bundler version even when using binstubs
076aba8b1c
2024-06-11 13:30:50 +00:00
David Rodríguez
744dd5a362 [rubygems/rubygems] Fix performance regression on applications with a local cache
Even if all gems are properly installed and no resolve is needed, we
recently started always reading all packages in `vendor/cache` and
extracting specifications from them.

This commit fixes the problem by longer making considering cached specs
the default and only enable them when a resolve is actually needed.

edeb2c42bf
2024-05-24 15:02:30 +00:00
David Rodriguez
7b3ef370f8 [rubygems/rubygems] Fix incorrect bundle update --bundler message
146de56353
2024-03-22 13:14:42 +00:00
Hiroshi SHIBATA
82496f2b38 Merge RubyGems-3.5.2 and Bundler-2.5.2 2023-12-22 07:24:04 +09:00
Imir Kiyamov
23eb13d49d [rubygems/rubygems] Fixed malformed lockfile version on installing
c969a192bf
2023-08-28 07:41:51 +00:00
Hiroshi SHIBATA
dd1af4b22d
[rubygems/rubygems] Rename local to lockfile and global to system
456fd05d3a
2023-07-24 15:04:24 +09:00
Hiroshi SHIBATA
d3305cab44
[rubygems/rubygems] restart with BUNDLE_VERSION if it's specified
57cfe7cf8d
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
f16c880f77
[rubygems/rubygems] Introduce bundle config set version feature
c431a1df52
2023-07-13 11:36:03 +09:00
Hiroshi SHIBATA
d22511fd75 Merge rubygems/rubygems HEAD.
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
2022-01-19 15:01:44 +09:00
David Rodríguez
95d2e06c2b [rubygems/rubygems] Fix bundle update --bundler no longer updating lockfile
a053b7e4d4
2021-12-28 04:38:31 +09:00
Hiroshi SHIBATA
d6311cb1ca Track RubyGems 3.4.0dev and Bundler 2.4.0dev 2021-12-27 10:45:36 +09:00
Hiroshi SHIBATA
fb1ab27f53 Merge RubyGems-3.3.1 and Bundler-2.3.1 2021-12-23 09:44:45 +09:00
Hiroshi SHIBATA
69dc2ea465 Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +09:00