Idris-dev
Idris-dev copied to clipboard
Idris doesn't build with Cabal 2.4.*
Steps to Reproduce
- Have Cabal 2.4.* (such as from GHC 8.6.4)
-
cabal new-install -O2 -w ${GHC_LOCATION_HERE} idris
- Watch the resolver complain
Expected Behavior
Idris builds without issue.
Observed Behavior
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: Cabal (user goal)
[__0] rejecting: Cabal-2.4.1.0, Cabal-2.4.0.1/installed-2.4..., Cabal-2.4.0.1,
Cabal-2.4.0.0 (constraint from user target requires ==2.2.0.1)
[__0] trying: Cabal-2.2.0.1
[__1] next goal: containers (user goal)
[__1] rejecting: containers-0.6.0.1/installed-0.6..., containers-0.6.0.1
(conflict: Cabal => containers>=0.4.2.1 && <0.6)
[__1] rejecting: containers-0.5.11.0, containers-0.5.10.2,
containers-0.5.10.1, containers-0.5.9.2, containers-0.5.8.2,
containers-0.5.7.1, containers-0.5.7.0, containers-0.5.6.3,
containers-0.5.6.2, containers-0.5.6.1, containers-0.5.6.0,
containers-0.5.5.1, containers-0.5.5.0, containers-0.5.4.0,
containers-0.5.3.1, containers-0.5.3.0, containers-0.5.2.1,
containers-0.5.2.0, containers-0.5.1.0, containers-0.5.0.0,
containers-0.4.2.1, containers-0.4.2.0, containers-0.4.1.0,
containers-0.4.0.0, containers-0.3.0.0, containers-0.2.0.1,
containers-0.2.0.0, containers-0.1.0.1, containers-0.1.0.0,
containers-0.5.9.1, containers-0.5.8.1 (constraint from user target requires
==0.6.0.1)
[__1] fail (backjumping, conflict set: Cabal, containers)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: Cabal, containers
Other notes
According to one person I've asked about this, Setup.hs
may be the cause of this issue, but I cannot verify this, as I'm not very familiar with custom Setup.hs
files.
Maybe it's new-install
that triggers it.
Looks like the SDist building in the setup.hs doesn't work under new-install. And also that autogen modules must be enumerated in the cabal file, but that is easy to fix.
Workaround until this is fixed is to use the old install.
I guess **
wildcards can help us without going back to the crazy data-files
section we had before. But that was introduced in Cabal-2.4.
Strictly speaking you're not getting the error I'm seeing, you're seeing the effect of a cabal version bound. But new-install doesn't work either way.
Oh, of course the **
syntax is required to be followed by *.<extension>
. That is completely asinine. That means we can't use that to grab Makefile
, expected
and run
files.
cabal v1-install idris
gives
cabal: The following packages are likely to be broken by the reinstalls:
Cabal-2.4.0.1
Use --force-reinstalls if you want to install anyway.