From 9f9935bcb899c3d79bd638f05602c64954895b9b Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:58:31 -0400 Subject: [PATCH] Rename 'custom lockfile' in code --- lib/ruby_lsp/setup_bundler.rb | 6 +++--- test/setup_bundler_test.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ruby_lsp/setup_bundler.rb b/lib/ruby_lsp/setup_bundler.rb index bcf9fe11f..a887e676b 100644 --- a/lib/ruby_lsp/setup_bundler.rb +++ b/lib/ruby_lsp/setup_bundler.rb @@ -235,7 +235,7 @@ def run_bundle_install(bundle_gemfile = @gemfile) $stderr.puts("Ruby LSP> Running bundle install for the composed bundle. This may take a while...") $stderr.puts("Ruby LSP> Command: #{command}") - # Try to run the bundle install or update command. If that fails, it normally means that the custom lockfile is in + # Try to run the bundle install or update command. If that fails, it normally means that the composed lockfile is in # a bad state that no longer reflects the top level one. In that case, we can remove the whole directory, try # another time and give up if it fails again if !system(env, command) && !@retry && @custom_dir.exist? @@ -288,13 +288,13 @@ def should_bundle_update? if @rails_app return false if @dependencies.values_at("ruby-lsp", "ruby-lsp-rails", "debug").all? - # If the custom lockfile doesn't include `ruby-lsp`, `ruby-lsp-rails` or `debug`, we need to run bundle install + # If the composed lockfile doesn't include `ruby-lsp`, `ruby-lsp-rails` or `debug`, we need to run bundle install # before updating return false if composed_bundle_dependencies.values_at("ruby-lsp", "debug", "ruby-lsp-rails").any?(&:nil?) else return false if @dependencies.values_at("ruby-lsp", "debug").all? - # If the custom lockfile doesn't include `ruby-lsp` or `debug`, we need to run bundle install before updating + # If the composed lockfile doesn't include `ruby-lsp` or `debug`, we need to run bundle install before updating return false if composed_bundle_dependencies.values_at("ruby-lsp", "debug").any?(&:nil?) end diff --git a/test/setup_bundler_test.rb b/test/setup_bundler_test.rb index a94379ba6..6ddbe37b1 100644 --- a/test/setup_bundler_test.rb +++ b/test/setup_bundler_test.rb @@ -115,7 +115,7 @@ def test_changing_lockfile_causes_composed_bundle_to_be_rebuilt # At this point, the composed bundle includes the `ruby-lsp` in its lockfile, but that will be overwritten when # we copy the top level lockfile. If composed bundle dependencies are eagerly evaluated, then we would think the - # ruby-lsp is a part of the custom lockfile and would try to run `bundle update ruby-lsp`, which would fail. If + # ruby-lsp is a part of the composed lockfile and would try to run `bundle update ruby-lsp`, which would fail. If # we evaluate lazily, then we only find dependencies after the lockfile was copied, and then run bundle install # instead, which re-locks and adds the ruby-lsp Bundler.with_unbundled_env do