[ParallelInstaller] Allow installing with corrupted lockfiles #5267
[ParallelInstaller] Allow installing with corrupted lockfiles #5267
Conversation
segiddins
commented
Dec 21, 2016
•
edited
edited
- Specs
This looks good to me! 👍 |
@@ -131,6 +135,12 @@ def handle_error | |||
raise Bundler::InstallError, errors.map(&:to_s).join("\n\n") | |||
end | |||
|
|||
def check_for_corrupt_lockfile | |||
return unless @specs.any? {|s| s.corrupt_lockfile?(@specs) } | |||
Bundler.ui.warn "Using 1 thread to install specs instead of #{@size} due to lockfile corruption" unless @size == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge the warning in corrupt_lockfile?
into this one, with wording something like:
Your Gemfile.lock was created by an old Bundler that left some things out. Because of the missing
DEPENDENCIES
, we can only install gems one at a time, instead of installing #{@SiZe} at a time.
You can fix this by adding the missing gems to yourGemfile
, runningbundle install
, and then removing the gems from yourGemfile
. The missing gems are: #{missing.map(&:name).join(", ").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will also mean returning the array of missing names from the method above, I think?
@indirect except it's not actually a bug with the old bundler but rather with rubygems.org... |
That changed eating also means we can't print which gem has the dependencies causing the problems. |
@segiddins I didn't say "an old Bundler that had a bug", I said "an old Bundler that left some things out". I didn't also include "because of a bug in RubyGems.org" because that doesn't make anything about the problem clearer. Moving the warning up into the check so we can keep the context is fine, just merge the warnings into one place. 😛 |
☔ The latest upstream changes (presumably #5260) made this pull request unmergeable. Please resolve the merge conflicts. |
Does this look like a good warning?
|
This looks great. |
14d4d71
to
e86631c
Compare
@bundlerbot r+ |
📌 Commit e86631c has been approved by |
…rning, r=indirect [ParallelInstaller] Allow installing with corrupted lockfiles - [x] Specs
☀️ Test successful - status-travis |
Thank you @segiddins 💝 🎉 |