Describe the bug
cabal-install-3.0.0.0 fails to bootstrap with ghc 8.8.1 on macOS
To Reproduce
Running sh bootstrap.sh --sandbox with ghc 8.8.1 on macOS leads to:
Setup: Encountered missing or private dependencies:
base >=4.3.0.0 && <4.13
This prevents all Haskell-based packages in Homebrew to ship on macOS Catalina :(
System information
It's good to have a ticket that is explicit like this one. This was basically being tracked as #6280.
So, checking if I understand correctly: the latest versions of ghc and cabal-install are incompatible, it is known and expected? How are distributors supposed to know this, and how can we ship working Haskell-based software to our users?
So, checking if I understand correctly: the latest versions of ghc and cabal-install are incompatible, it is known and expected?
Yes; this is going to be addressed with a point release of cabal (probably 3.0.1.0) together with a GHC 8.8 compatible release of hackage-security (which happens to be a major breaking change)
How are distributors supposed to know this
based on the base < 4.13 constraint; which admittedly isn't an obvious thing to those that don't know about the current relationship between base versioning and GHC versioning (due to base being a non-reinstallable library that is fixed to GHC versions)
, and how can we ship working Haskell-based software to our users?
There's for one a binary distribution at http://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/
Or you can build cabal-install with GHC 8.6.5 -- note that it's generally risky to use .1 versions of GHC to build things as they tend to have subtle bugs that are only caught when people actually start using those .1s (notice how it took a .5 minor release to finally reach a reasonably working state of GHC 8.6.*); and the crazy fast release cadence GHC has decided to accelerate to doesn't help either with getting robust and trustworthy GHC releases...
Thanks @hvr for the information. We will have to decide how to know, in the future, when a GHC release is considered “stable”. Perhaps it is because I do not understand well the Haskell ecosystem, but I do not find this state of things particularly healthy 😢
notice how it took a .5 minor release to finally reach a reasonably working state of GHC 8.6.*
Is there a simple test we could run with a new GHC release, to make sure it is at least capable of install cabal-install? (because it is otherwise pretty much useless to our users).
@fxcoudert I wasn't aware that distributions are being held up by the need to compile everything with the very same GHC version (many people don't feel the pain as it's idiomatic to have multiple GHC versions installed side-by-side as the ecosystem is typically very inert to update to new GHC versions; it typically takes several months up to a full year for many packages to adapt to a new major GHC version -- if at all); I've created #6328 to make sure we remedy the current pain point asap; and in future I'll try to put more emphasis into making sure cabal-install is buildable with all released GHCs shortly after release of said GHCs.
@hvr in Homebrew at least, we ship everything with the same version of the compiler. It's true that GHC has been causing us a lot more trouble than C, Fortran, Erlang, and other compilers 😢
@hvr I am not seeing a path forward for this. Can you provide an estimate for a fix? This is totally blocking for all Haskell software in Homebrew, none of which can be installed from source anymore.
Maybe this ship has said, but potentially you could pull the ghc formula back to 8.6 and make 8.8 the "bleeding edge" version, or such. Provided rolling a formula's version back (downgrading) is even an option.
Perhaps I'm mistaken, but I think the issue is the disconnect that you can't build cabal with ghc 8.8, but you can build a project that uses ghc 8.8 using... a 8.6-built cabal. So really cabal doesn't need to be on the same version of ghc as the rest of the Haskell formulas - but I guess it keeps things simple to assume it does.
Provided rolling a formula's version back is even an option
Not really :(
cabal doesn't need to be on the same version of ghc as the rest of the Haskell formulas
We could do that, actually. I didn't know that was an option (none of the Homebrew maintainers know anything about the haskell ecosystem, I'm afraid).
Actually, this is not working. The cabal-install compiled with ghc 8.6.5 cannot be run in our simple test:
==> /usr/local/Cellar/cabal-install/3.0.0.0_1/bin/cabal --config-file=/private/tmp/cabal-install-test-20191117-48253-w6x53r/config info Cabal
Config file path source is commandline option.
Config file /private/tmp/cabal-install-test-20191117-48253-w6x53r/config not
found.
Writing default configuration to
/private/tmp/cabal-install-test-20191117-48253-w6x53r/config
cabal: The program 'ghc' version >=7.0.1 is required but it could not be
found.
Most helpful comment
Not really :(
We could do that, actually. I didn't know that was an option (none of the Homebrew maintainers know anything about the haskell ecosystem, I'm afraid).