diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-06-09 21:10:12 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-06-15 07:01:23 +0900 |
commit | 21238f38a8eb881d403e47395781c2cc9eafbd9a (patch) | |
tree | 6065e6437ada219c3f8cdc81f455ab326989f79f /lib/bundler/definition.rb | |
parent | 4f1b1817a8f5f51f9e3687dac465dabfb112883b (diff) | |
download | ruby-21238f38a8eb881d403e47395781c2cc9eafbd9a.tar.gz |
[rubygems/rubygems] Extract `Definition#no_resolved_needed?`
https://github.com/rubygems/rubygems/commit/1ff8626571
Diffstat (limited to 'lib/bundler/definition.rb')
-rw-r--r-- | lib/bundler/definition.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 39b7d086f0..7bcc768b51 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -281,7 +281,7 @@ module Bundler @resolve ||= if Bundler.frozen_bundle? Bundler.ui.debug "Frozen, using resolution from the lockfile" @locked_specs - elsif !unlocking? && nothing_changed? + elsif no_resolve_needed? if deleted_deps.any? Bundler.ui.debug "Some dependencies were deleted, using a subset of the resolution from the lockfile" SpecSet.new(filter_specs(@locked_specs, @dependencies - deleted_deps)) @@ -477,6 +477,10 @@ module Bundler !@source_changes && !@dependency_changes && !@new_platform && !@path_changes && !@local_changes && !@incomplete_lockfile end + def no_resolve_needed? + !unlocking? && nothing_changed? + end + def unlocking? @unlocking end |