aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilovezfs2016-02-14 01:55:02 -0800
committerMike McQuaid2016-02-21 18:40:36 +0000
commit6a1a57423b6251ffa082f412d090bd2a1cb7fe95 (patch)
treeb1dc2807580120623e505d5e219d4d87f001c69c
parent2517d396aa66e6a89ff84ce7573f8fa2397619d4 (diff)
downloadbrew-6a1a57423b6251ffa082f412d090bd2a1cb7fe95.tar.bz2
Haskell#cabal_install more robust deps resolution
The default max-backjumps can be too low, especially since Language::Haskell::Cabal doesn't guarantee an LTS config. In particular, this fixes a git-annex build failure in Homebrew/homebrew#47950 Closes Homebrew/homebrew#49158. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Homebrew/language/haskell.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/language/haskell.rb b/Library/Homebrew/language/haskell.rb
index dd9bc5bc8..9928b6322 100644
--- a/Library/Homebrew/language/haskell.rb
+++ b/Library/Homebrew/language/haskell.rb
@@ -45,7 +45,13 @@ module Language
end
def cabal_install(*args)
- system "cabal", "install", "--jobs=#{ENV.make_jobs}", *args
+ # 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
end
def cabal_install_tools(*tools)