mirror of
https://github.com/ruby/ruby.git
synced 2025-09-22 03:53:58 +02:00
![]() 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.
|
||
---|---|---|
.. | ||
add_spec.rb | ||
binstubs_spec.rb | ||
cache_spec.rb | ||
check_spec.rb | ||
clean_spec.rb | ||
config_spec.rb | ||
console_spec.rb | ||
doctor_spec.rb | ||
exec_spec.rb | ||
fund_spec.rb | ||
help_spec.rb | ||
info_spec.rb | ||
init_spec.rb | ||
inject_spec.rb | ||
install_spec.rb | ||
issue_spec.rb | ||
licenses_spec.rb | ||
list_spec.rb | ||
lock_spec.rb | ||
newgem_spec.rb | ||
open_spec.rb | ||
outdated_spec.rb | ||
post_bundle_message_spec.rb | ||
pristine_spec.rb | ||
remove_spec.rb | ||
show_spec.rb | ||
update_spec.rb | ||
version_spec.rb | ||
viz_spec.rb |