-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
We have a plan to release Bundler 4 by the end of this year. This is a placeholder ticket to explain the motivations and what we expect to include in this major release.
Context
Bundler currently keeps a branched code base, where there are a number of feature flags that will be enabled only once a major version is released, because they are considered breaking changes.
However, a real major version has not happened for many years. We did release Bundler 2 back in 2019, but that just delayed real breaking changes to future Bundler 3 and only dropped support for old rubies. So, in practice, these features have remained hidden for a long time and our users don’t benefit from them. This also causes maintenance overhead, a slower CI (due to the extra Bundler 2 vs Bundler 3 dimension), makes things harder for contributors, and makes an already complex code base more complex.
The goal of this project is to remove the above tech debt and make all currently hidden features/changes/improvements generally available. We want to study each of these feature flags separately and evaluate a number of things in order to make them releasable:
- Whether they still make sense in 2025 or should be cancelled instead.
- Whether they need any additional changes or it is only a matter of "toggling the switch".
- Whether a particular migration/deprecation path is needed.
- Etc.
Naming
RubyGems and Bundler have been released in lockstep for a while now. However, their version numbers are different (Bundler is currently at 2.x.y, while RubyGems is at 3.x.y), which makes things a bit weird.
I think it is a good time to take the chance and finally sync version numbers of Bundler & RubyGems, hence the idea of naming this major release "Bundler 4", skipping Bundler 3. That way, Bundler 4 & RubyGems 4 can be released together and their versions can stay synced going forward.
⚠ NOTE: RubyGems 4 roadmap will be tracked separately, although there are not many breaking changes pending there.
Changes
The following is the list of feature flags that will be switched on by default in Bundler 4:
- Enable
default_install_uses_pathby default #8653 - Enable
allow_offline_installby default #8654 - Enable
auto_clean_without_pathby default #8655 - Enable
cache_allby default #8656 - Enable
forget_cli_optionsby default #8657 - Enable
global_gem_cacheby default #8658 - Enable
lockfile_checksumsby default #8659 - Enable
path_relative_to_cwdby default #8660 - Enable
print_only_version_numberby default #8661 - Enable
setup_makes_kernel_gem_publicby default #8662 - Set
default_cli_commandto cli_help by default #8786
Deprecated features that will get removed
In addition to all the feature flags, there's a decent amount of deprecated functionality that will get completely removed.
All of those are detailed in this document. It's a bit old now, so needs to be reviewed and probably some missing stuff added to it.
I'll be compiling a reviewed list of these removed features here, too:
- Remove deprecated
bundle vizandbundle injectcommands #8923 - Remove deprecated
Bundler.*clean*, andBundler.environmenthelpers #8924 - Remove implementation of
deployment,capistranoandvladentrypoints #8957 - Completely remove
--rubocopflag tobundle gem, and related configuration #8967 - Remove support for multiple global sources in Gemfile & lockfile #8968
- Completely forbid passing
--exttobundle gemwithout a value #8976 - Make
bundle remove --installraise an error #8977 - Make
bundle install --binstubsraise an error #8978 - Make
--local-gitflag tobundle plugin installraise an error #8979 - Make
bundle show --outdatedraise an error #8980
Release plan
- Phase 1. Prepare and get some basic community agreement on all of the above changes.
- Phase 2. Release some CLI flag or configuration like
--mode 4or something, so that folks can easily test the future major release (by mid-year, approximately). - Phase 3. Get Bundler 4 out (by beginning of December).
- Phase 4. Refine release and fix regressions so that we can include some Bundler 4.0.x version with Ruby 3.5 (25th of December).
Non goals
- Further unification of RubyGems & Bundler, rather than syncing version numbers is not a goal of this project.
- Any additional breaking changes or big features should be discussed separately, and if approved will be released when ready in the next major version after they are completed, not necessarily Bundler 4.