Skip to content

Commit

Permalink
Haskell#cabal_install more robust deps resolution
Browse files Browse the repository at this point in the history
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#47950
  • Loading branch information
ilovezfs committed Feb 16, 2016
1 parent e43e738 commit fae0eb9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Library/Homebrew/language/haskell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ def cabal_sandbox_add_source(*args)
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)
Expand Down

0 comments on commit fae0eb9

Please sign in to comment.