-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Now won't wait for dependencies that will never install. Partial fix for #3692 #4012
Now won't wait for dependencies that will never install. Partial fix for #3692 #4012
Conversation
Before this fix, if for any reason a dependency is not on the install list it will cause a deadlock. This now means the bundle will no longer fail in that instance, which matches the behavior of the sequential installer. It isn't clear why the gem is not making it onto the list however, which appears to be a separate bug.
It also builds on this pr #3800. The original problem was that a dependency 'therubyracer' wasn't in the Once I added
I'll see if there is an issue for this or open one. |
I'm just interested in how we even get into that invalid state to begin with... I'm tempted to add some informative assertions about the invarients around the installer to try and catch this |
My best guess is git merges that create mutant lock files? On Sep 24, 2015, 5:26 PM -0400, Samuel E. [email protected], wrote:
|
Ah, so we're trusting the lock file there to be correct, but in reality its missing some lines? Seems like a bug elsewhere in the installer then, and this is just a symptom |
Yes and yes. I’m happy to accept this and at least back to the -j 1 brokenness rather than throw a deadlock, though, and investigate ways to detect bad lockfiles as a separate thing.
|
@indirect sounds good |
In my case it was definitely a bad merge. Detecting and throwing a better
error is relatively straightforward in the parallel installer (throw an
exception in the 'dependencies_installed?' method), but harder in the
sequential. One option might be to get rid of the sequential installer and
use parallel with one worker by default.
|
I like that idea, assuming that we’re able to make it so that the parallel installer with one worker actually works all the time. :)
|
@@ -35,13 +35,14 @@ def ignorable_dependency?(dep) | |||
# sure needed dependencies have been installed. | |||
def dependencies_installed?(all_specs) | |||
installed_specs = all_specs.select(&:installed?).map(&:name) | |||
dependencies.all? {|d| installed_specs.include? d.name } | |||
dependencies(all_specs.map(&:name)).all? {|d| installed_specs.include? d.name } |
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.
pretty sure this change is breaking things?
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.
@segiddins I don't see any failing tests for this line in Travis. Or am I missing something?
Should I resubmit this PR against Also, there's no indication in the procedure (which I should have followed) about |
@lukaso well manually cherry pick back to stable once this is merged. |
…egiddins Error on missing dependency - partial fix for #3692 (alternative) This pull request implements the strategy suggested in the comments for #4012, namely to raise an error when dependencies are not present (due to a corrupted `Gemfile.lock`). This also removes the `install_sequentially` option. I wasn't totally sure about the error message formatting.
☔ The latest upstream changes (presumably #4020) made this pull request unmergeable. Please resolve the merge conflicts. |
This is superceded by #4020. Closing. |
Before this fix, if for any reason a dependency is not on the install list
it will cause a deadlock. This now means the bundle will no longer fail
in that instance, which matches the behavior of the sequential installer.
It isn't clear why the gem is not making it onto the list however, which
appears to be a separate bug.
This fixes my instance of #3692 which was still occurring despite the issue being closed.