bugsnag / bugsnag-ruby

BugSnag error monitoring & reporting software for rails, sinatra, rack and ruby
https://docs.bugsnag.com/platforms/ruby
MIT License
246 stars 174 forks source link

Fix optional group definitions in Gemfile #734

Closed imjoehaines closed 1 year ago

imjoehaines commented 1 year ago

Goal

We define a number of optional groups in our Gemfile for various purposes (test dependencies, rubocop etc…) but the definition is broken on older rubies using non-legacy versions of Bundler

Bundler should always check dependency resolution with all optional groups, even when not actually installing them. However on old versions this check didn't happen, which is intuitive but wrong

We were depending on the broken behaviour of older Bundler versions to get our tests to run on old Ruby versions. Instead, we should be upfront about these groups not installing on old Rubies by not defining them unless they will resolve

This allows us to use more up-to-date Bundler versions on old Rubies, instead of hard-coding a super old version with broken behaviour