diff options
author | Andre Arko <andre@arko.net> | 2013-08-27 10:29:50 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2013-08-27 10:29:53 -0700 |
commit | 7c6c3af20ddd837629479266ad38ef936c8f7342 (patch) | |
tree | a8319ace5cc80f6560959a9f1299fad10a9fd0a1 | |
parent | 0afeb9f7a8abffeabb2d8960aff0853a23472330 (diff) | |
download | bundler-7c6c3af20ddd837629479266ad38ef936c8f7342.tar.gz |
explain why parallel installs might break
[ci skip]
-rw-r--r-- | lib/bundler/installer.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 9304d1e19e..39bf6c7e2c 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -84,15 +84,15 @@ module Bundler @definition.resolve_remotely! end - # Must install gems in the order that the resolver provides - # as dependencies might actually affect the installation of - # the gem. Installer.post_install_messages = {} - size = [options[:jobs].to_i, 1].max - - if size > 1 && can_install_parallely? - install_in_parallel size, options[:standalone] + # the order that the resolver provides is significant, since + # dependencies might actually affect the installation of a gem. + # that said, it's a rare situation (other than rake), and parallel + # installation is just SO MUCH FASTER. so we let people opt in. + jobs = [options[:jobs].to_i, 1].max + if jobs > 1 && can_install_parallely? + install_in_parallel jobs, options[:standalone] else install_sequentially options[:standalone] end @@ -123,7 +123,7 @@ module Bundler FileUtils.rm_rf(Bundler.tmp) message rescue Exception => e - # install hook failed + # if install hook failed or gem signature is bad, just die raise e if e.is_a?(Bundler::InstallHookError) || e.is_a?(Bundler::SecurityError) # other failure, likely a native extension build failure |