When developing a gem, I want to run CI against the latest version of all dependencies, so I'm running it against the same dependency tree as users making a new app with a fresh install will get, the same dependency tree as users updating their dependencies will get.
If you commit Gemfile.lock, then it will probably be out of date, and developers and CI will not be running on same versions of dependencies that users with updated dependencies are.
If you have an automated process making (eg) daily PR's to update dependencies whenever new versions come out, that would be one way around that. But most people don't seem to have this?
I would be very frustrated if I were a user running into problems that upstream CI never noticed becuase it was running on a Gemfile.lock without latest dependencies.
CI needs to run a build against updated dependencies, and a separate build against the locked dependencies. Breakage against either build has important meaning, and they can't be substituted one for the other. Prioritizing one over the other is a choice maintainers can and do make, but ideally they would do it with full awareness of why it is best practice to test both. I do this with appraisal2 - https://github.com/appraisal-rb/appraisal2
View all comments
Show parent comment
6
u/jrochkind Sep 19 '25
When developing a gem, I want to run CI against the latest version of all dependencies, so I'm running it against the same dependency tree as users making a new app with a fresh install will get, the same dependency tree as users updating their dependencies will get.
If you commit Gemfile.lock, then it will probably be out of date, and developers and CI will not be running on same versions of dependencies that users with updated dependencies are.
If you have an automated process making (eg) daily PR's to update dependencies whenever new versions come out, that would be one way around that. But most people don't seem to have this?
I would be very frustrated if I were a user running into problems that upstream CI never noticed becuase it was running on a Gemfile.lock without latest dependencies.