Haskell: cap cabal-install make jobs at 64

Fixes Homebrew/homebrew#49509.

Closes Homebrew/homebrew#49511.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Misty De Meo 2016-02-24 21:11:02 -08:00 committed by Mike McQuaid
parent 842e19bbeb
commit a7869783ad

View File

@ -45,13 +45,17 @@ module Language
end
def cabal_install(*args)
# cabal hardcodes 64 as the maximum number of parallel jobs
# https://github.com/Homebrew/homebrew/issues/49509
make_jobs = ENV.make_jobs > 64 ? 64 : ENV.make_jobs
# cabal-install's dependency-resolution backtracking strategy can easily
# need more than the default 2,000 maximum number of "backjumps," since
# Hackage is a fast-moving, rolling-release target. The highest known
# needed value by a formula at this time (February 2016) was 43,478 for
# git-annex, so 100,000 should be enough to avoid most gratuitous
# backjumps build failures.
system "cabal", "install", "--jobs=#{ENV.make_jobs}", "--max-backjumps=100000", *args
system "cabal", "install", "--jobs=#{make_jobs}", "--max-backjumps=100000", *args
end
def cabal_configure(flags)