ruby/lib/bundler/installer
Daniel Colson 62b3bcba5e [rubygems/rubygems] Auto-heal on corrupted lockfile with missing deps
Following up on https://github.com/rubygems/rubygems/pull/6355, which
turned a crash into a nicer error message, this commit auto-heals the
corrupt lockfile instead.

In this particular case (a corrupt Gemfile.lock with missing
dependencies) the LazySpecification will not have accurate dependency
information, we have to materialize the SpecSet to determine there are
missing dependencies. We've already got a way to handle this, via
`SpecSet#incomplete_specs`, but it wasn't quite working for this case
because we'd get to `@incomplete_specs += lookup[name]` and
`lookup[name]` would be empty for the dependency.

With this commit we catch it a bit earlier, marking the parent spec
containing the missing dependency as incomplete.

https://github.com/rubygems/rubygems/commit/486ecb8f20
2023-03-01 02:50:40 +00:00
..
gem_installer.rb [rubygems/rubygems] Fix `Gemfile.lock` versions leaking to `bundler/inline` install output 2022-05-13 15:23:56 +09:00
parallel_installer.rb [rubygems/rubygems] Auto-heal on corrupted lockfile with missing deps 2023-03-01 02:50:40 +00:00
standalone.rb Merge rubygems/bundler master 2023-02-21 19:28:12 +09:00