Pin gems in bundler.d to keep tests passing#1040
Conversation
| @@ -0,0 +1,10 @@ | |||
| # frozen_string_literal: true | |||
|
|
|||
| # Pin gems that resolve to incompatible versions when bundled from the project | |||
There was a problem hiding this comment.
I have a question about this approach. The comment mentions that these overrides are needed because the project root doesn't have a Gemfile.lock, which allows incompatible gem versions to be resolved. If that's the root cause, shouldn't we generate the image, commit the resulting Gemfile.lock, and rely on the locked dependency versions instead of introducing these temporary gem overrides? I'm wondering if that would provide a more deterministic and maintainable solution than pinning specific gems in code.
There was a problem hiding this comment.
That's what I thought as well at first, but the pattern across knapsacks is to gitignore the Gemfile.lock - it looks like committing it can cause problems with the Hyku submodule.
See, for example, this commit. See also this thread in the hykuup-everything Notch8 channel
There was a problem hiding this comment.
That's right, I keep forgetting that about the knapsacks.
CI was failing because the parent project does not have a Gemfile.lock, so for the local tests it was resolving newer versions of gems which were breaking. This pins them to working versions.