instructure / bundler-multilock

Support multiple lockfiles
MIT License
3 stars 1 forks source link

Can Bundler::Multilock be used to have one gemfile.lock per OS? #40

Open DaveEshopGuide opened 4 months ago

DaveEshopGuide commented 4 months ago

Hey there, I am currently looking for ways to mitigate the removal of the gemfile.lock on heroku when it has been bundled with windows (https://devcenter.heroku.com/articles/bundler-windows-gemfile). We are a team of developers where some of them are on windows and we are sometimes facing the issue of bundler resolving different versions in production vs. dev because of the removal of that gemfile.lock.

Is there a way to use bundler-multilock to generate a gemfile.lock with only linux/mac and then have a different(local) one for windows users?

Best, Dave

ccutrer commented 4 months ago

Not at this time. At the moment, bundler-multilock ensures that the platforms are consistent between gem files. BUT... have you experimented with ensuring you have a Linux platform in your lockfile? Try running bundle lock --add-platform x86_64-linux && bundle lock --add-platform aarch64-linux, then committing it. Then check if Heroku still discards the lockfile, even if one of the platforms is Windows. You can view the current platforms in the Gemfile with bundle platform.