mattbrictson / bundle_update_interactive

A stylish interactive mode for Bundler, inspired by `yarn upgrade-interactive`
MIT License
137 stars 3 forks source link

Expand list of gems to install to work around conservative update #1

Closed mattbrictson closed 2 months ago

mattbrictson commented 2 months ago

Some gems are "meta gems" that are composed of other gems locked at identical versions. For example, rails 7.0.4.3 requires activesupport =7.0.4.3, railties =7.0.4.3, and so on.

Therefore, running bundle update --conservative rails may not work depending on how strictly Bundler enforces "conservative" (this behavior is also slightly different in different Bundler releases). In this case, you might see a message from Bundler like:

Attempted to update rails, but the version stayed the same

With this commit, update-interactive solves this problem by updating the entire suite of gems when a "meta gem" is selected for update. In other words, if you pick rails from the list of gems to update, update-interactive will automatically include activesupport, railies, etc. as well, ensuring that the update is successful.