1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/bundler/commands
David Rodríguez 853004e04d [rubygems/rubygems] Fix bundle install crash due to an incorrectly incomplete resolve
In case we have a corrupted lockfile that claims to support a platform, but
it's missing platform specific gems for it, bundler has a check that
detects the situation and forces a re-resolve. The result of this check
is kept under the `@locked_specs_incomplete_for_platformn` instance
variable in `Definition`.

The installer, however, calls `Definition#nothing_changed?` before this
instance variable has been filled, so the result of it is actually
incorrect here since it will claim that nothing has changed, but
something has changed (locked specs are incomplete for the current
platform).

The consequence of this incorrect result is that the installer thinks it
can go on without re-resolving, resulting in the incomplete resolution
from the lockfile being used, and in a crash being triggered due to
that.

The solution is to make sure the `@locked_specs_incomplete_for_platform`
instance variable is filled before `nothing_changed?` gets called.
Moving it to `initialize` makes the most sense, not because it's the
best place for it (we can refactor this later), but because all of the
other "outdated definition" checks are already set there.

https://github.com/rubygems/rubygems/commit/708afdd789
2021-10-13 21:16:40 +09:00
..
add_spec.rb
binstubs_spec.rb [rubygems/rubygems] Remove unnecessary code 2021-10-13 16:21:41 +09:00
cache_spec.rb
check_spec.rb [rubygems/rubygems] Fix bundle check showing duplicated gems 2021-08-31 19:06:14 +09:00
clean_spec.rb [rubygems/rubygems] Fix typo 2021-10-09 08:04:48 +09:00
config_spec.rb [rubygems/rubygems] Correctly redact credentials when using x-oauth-basic 2021-08-31 19:06:14 +09:00
console_spec.rb
doctor_spec.rb
exec_spec.rb [rubygems/rubygems] Improve "gem not found in source" errors 2021-08-31 19:06:14 +09:00
fund_spec.rb
help_spec.rb
info_spec.rb [rubygems/rubygems] Show a warning in bundle info if gem has been deleted 2021-10-11 19:13:16 +09:00
init_spec.rb
inject_spec.rb
install_spec.rb [rubygems/rubygems] Fix bundle install crash due to an incorrectly incomplete resolve 2021-10-13 21:16:40 +09:00
issue_spec.rb
licenses_spec.rb
list_spec.rb
lock_spec.rb [rubygems/rubygems] Improve "gem not found in source" errors 2021-08-31 19:06:14 +09:00
newgem_spec.rb Newly generated gems require Ruby 2.6.0 2021-10-09 09:07:47 +09:00
open_spec.rb [rubygems/rubygems] Explicitly define a global source for tests 2021-07-27 09:25:57 +09:00
outdated_spec.rb
post_bundle_message_spec.rb [rubygems/rubygems] Remove redundant part of error message 2021-08-31 19:06:14 +09:00
pristine_spec.rb
remove_spec.rb [rubygems/rubygems] Trigger install command by default on remove 2021-09-17 20:46:18 +09:00
show_spec.rb
update_spec.rb [rubygems/rubygems] Explicitly define a global source for tests 2021-07-27 09:25:57 +09:00
version_spec.rb
viz_spec.rb