sorry, yes. i meant the latest version allowed by any constraints in the Gemfile. e.g.
gem 'nokogiri'
gem 'rails', '5.0.0'
gem 'rack', '>=1.0'
gem 'thin', '~>1.1'
as i mentioned:
The conservative flag allows
bundle update --conservative GEM
to update the version of GEM, but prevents Bundler from updating the versions of any of the gems that GEM depends on, similar to changing a gem’s version number in the Gemfile and then runningbundle install
.
Bundler: The best way to manage a Ruby application's gems
i guess because this seems like the most obvious thing in the world to me. we want to be able to update a dependency without updating all dependencies.
because version constraints are (generally) an anti-pattern. they imply that there’s some reason we can’t/shouldn’t update a dependency beyond that version. only use a version constraint if you really do know there’s something prohibiting you from upgrading to that version (and ideally have tests that would break if someone updated it, so that the constraint is just there to guard against people wasting time when you do your weekly/monthly dependency upgrades via dependabot or whatever).
amortizing risk. i try to enforce a culture of TDD in companies i work for, but often test coverage is woefully inadequate, so we want to upgrade one dependency at a time, in its own PR—or at least one commit per dependency upgrade, because an upgrade often requires a lot of changes in a lot of different places. if that happens for multiple dependencies, i sure as heck don’t want a mega-commit that bundles a ton of risk in a single PR/deploy, and also makes for challenging PR review. small incremental changes are part and parcel of modern agile development.
they also allow for the absolute blessing that is git bisect
should we ship a regression.
i confess, this is all so standard from using package managers like npm, yarn, gomod, bundler, etc. that i’m truly surprised by this line of inquiry. i’ve worked for a LOT of companies in my career, including being eng #11 at zendesk in 2010, and this is all just so standard and desired by developers.