Haskell-ide-engine: unable to build with cabal

Created on 27 Jun 2019  路  17Comments  路  Source: haskell/haskell-ide-engine

as part of #1221, I need to build hie with cabal, which worked fine up to now, but I am getting the following error:

$ cabal new-build -w ghc-8.6.5
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: HaRe-0.8.4.1 (user goal)
[__1] rejecting: HaRe:!test (constraint from config file, command line flag,
or user target requires opposite flag selection)
[__1] trying: HaRe:*test
[__2] trying: turtle-1.5.14 (dependency of HaRe *test)
[__3] trying: temporary-1.3 (dependency of turtle)
[__4] next goal: cabal-helper (user goal)
[__4] rejecting: cabal-helper-0.9.0.0 (conflict: temporary==1.3, cabal-helper
=> temporary<1.3 && >=1.2.1)
[__4] rejecting: cabal-helper-0.8.2.0, cabal-helper-0.8.1.2,
cabal-helper-0.8.0.2, cabal-helper-0.8.0.1, cabal-helper-0.8.0.0,
cabal-helper-0.7.3.0, cabal-helper-0.7.2.0, cabal-helper-0.7.1.0,
cabal-helper-0.6.3.1, cabal-helper-0.6.3.0, cabal-helper-0.6.2.0,
cabal-helper-0.6.1.0, cabal-helper-0.6.0.0, cabal-helper-0.5.3.0,
cabal-helper-0.5.1.0, cabal-helper-0.5.0.0, cabal-helper-0.4.0.0,
cabal-helper-0.3.9.0, cabal-helper-0.3.8.0, cabal-helper-0.3.7.0,
cabal-helper-0.3.6.0, cabal-helper-0.3.5.0, cabal-helper-0.3.4.0,
cabal-helper-0.3.3.0, cabal-helper-0.3.2.1, cabal-helper-0.3.2.0,
cabal-helper-0.3.1.0, cabal-helper-0.3.0.0, cabal-helper-0.2.0.0,
cabal-helper-0.1.0.1, cabal-helper-0.1.0.0, cabal-helper-0.8.1.1,
cabal-helper-0.8.1.0, cabal-helper-0.7.0.1, cabal-helper-0.5.2.0 (constraint
from user target requires ==0.9.0.0)
[__4] fail (backjumping, conflict set: cabal-helper, temporary)
Backjump limit reached (currently 2000, change with --max-backjumps or try to
run with --reorder-goals).

I have no problem building hie with stack.

I am on the current master (e2f8e321bbb1bff3fc5e1d2dae649a0d61a378b1). Can anyone reproduce this issue?

build

Most helpful comment

I already increased the backjumps in #1221

All 17 comments

Manual solution seems to be: allow temporary-1.3 in cabal-helper , ghc-mod and ghc-mod-core as well as semigroups-1.19 for ghc-mod.

adding --max-backjumps 5000 also solves the problem for me...

@power-fungus can you maybe add that to our install script and CI pipeline?

Will do in #1221. In ci, this is not necessary since it only uses stack for now

I am also seeing this issue, both on master and on #1221.

@robix, what command did you use?

cabal new-clean && cabal new-build works for me:

I get the same error with stack install.hs cabal-hie-8.6.5.

@jneira This may be either luck or some non-default global settings.

I think something has changed with a recent package release, perhaps brittany, if you set your package state to something from around 14th June then it manages to find a build plan for me.

The dependency-resolution seems to be computationally difficult in this case. The solution seems to be to make the problem a bit less difficult in some way and cabal is able to find a solution. Lifting constraints and reducing the search space (i.e. older hackage snapshot) are both solutions towards this.

@jneira This may be either luck or some non-default global settings.

After update the index it fails for me too

Lifting constraints and reducing the search space (i.e. older hackage snapshot) are both solutions

I think the best option would be the firs one. What about setting the constraints that worked for you?

I am in favor of this. However, this spans over several repositories and I am unsure if the upgrade breaks anything. It does still compile though

I will increase the backjumps in the install.hs regardless of the constraints

@power-fungus: On master:

stack install.hs cabal-build-all

On #1221:

cabal v2-run ./install.hs --project-file install/shake.project cabal-build-all

It seems to be succeeding this AM; I think cabal new-update was the only thing I changed 馃檮

I already increased the backjumps in #1221

Was this page helpful?
0 / 5 - 0 ratings