Open mvgijssel opened 2 years ago
I can't remember why we added these bundler settings but perhaps it's so that the bundle can be vendored?
If you can investigate the implications of not putting deployment into bundle config I could be convinced to drop that.
Looking for additional core maintainers: https://github.com/bazelruby/rules_ruby/discussions/146
Currently when running a
ruby_bundle
without thegemfile_lock
attribute results in the following errorThe documentation (https://github.com/bazelruby/rules_ruby#54-ruby_bundle) suggests that it's possible to run
ruby_bundle
without passing thegemfile_lock
attribute. This is backed-up by the conditional in the code which checks for the presence of thegemfile_lock
attribute https://github.com/bazelruby/rules_ruby/blob/master/ruby/private/bundle/def.bzl#L125-L126.The problem is that the
set_bundler_config
hardcodes the deployment and frozen settings to true (https://github.com/bazelruby/rules_ruby/blob/master/ruby/private/bundle/def.bzl#L56-L58) which enforces that any bundle install command requires a Gemfile.lock file.Disabling these settings as follows seems to help in the case of no Gemfile.lock: