Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

[ParallelInstaller] Allow installing with corrupted lockfiles #5267

Merged
merged 3 commits into from Dec 27, 2016

Conversation

segiddins
Copy link
Member

@segiddins segiddins commented Dec 21, 2016

  • Specs

@indirect
Copy link
Member

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
Copy link
Member

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 your Gemfile, running bundle install, and then removing the gems from your Gemfile. The missing gems are: #{missing.map(&:name).join(", ").

Copy link
Member

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?

@segiddins
Copy link
Member Author

@indirect except it's not actually a bug with the old bundler but rather with rubygems.org...

@segiddins
Copy link
Member Author

That changed eating also means we can't print which gem has the dependencies causing the problems.

@indirect
Copy link
Member

@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. 😛

@bundlerbot
Copy link
Collaborator

☔ The latest upstream changes (presumably #5260) made this pull request unmergeable. Please resolve the merge conflicts.

@segiddins
Copy link
Member Author

Does this look like a good warning?

Your lockfile 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 9 at a time.
You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile.
The missing gems are:
* archive-tar-minitar, hoe, rcov depended upon by mime-types

@indirect
Copy link
Member

This looks great.

@segiddins segiddins force-pushed the seg-parallel-installer-missing-specs-warning branch from 14d4d71 to e86631c Compare December 26, 2016 22:48
@segiddins segiddins dismissed indirect’s stale review December 26, 2016 22:48

andre said it looks great

@indirect
Copy link
Member

@bundlerbot r+

@bundlerbot
Copy link
Collaborator

📌 Commit e86631c has been approved by indirect

@bundlerbot
Copy link
Collaborator

⌛ Testing commit e86631c with merge 2a1cf4a...

bundlerbot added a commit that referenced this pull request Dec 27, 2016
…rning, r=indirect

[ParallelInstaller] Allow installing with corrupted lockfiles

- [x] Specs
@bundlerbot
Copy link
Collaborator

☀️ Test successful - status-travis
Approved by: indirect
Pushing 2a1cf4a to master...

@trevorturk
Copy link

Thank you @segiddins 💝 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants