snowleopard / hadrian

Hadrian: a new build system for the Glasgow Haskell Compiler. Now merged into the GHC tree!
https://gitlab.haskell.org/ghc/ghc/tree/master/hadrian
MIT License
208 stars 37 forks source link

Drop support for cabal < 2 #468

Closed angerman closed 6 years ago

angerman commented 6 years ago

My experience with cabal sandboxes and hadrian has been that they've been buggy and did not rebuild as needed. As hadrian is a tech preview in 8.4 I would like to put cabal >= 2.0 as a requirement for hadrian up for discussion.

It also kills one script to be maintained. Instead of falling back to sandboxes, tell the user to grab a binary distribution of cabal2 from https://www.haskell.org/cabal/download.html.

snowleopard commented 6 years ago

Yes, I'm in favour of this too.

A few of the recent issues seem to be related to the old Cabal, e.g. #463 and #465.

bgamari commented 6 years ago

Andrey Mokhov notifications@github.com writes:

Yes, I'm in favour of this too.

A few of the recent issues seem to be related to the old Cabal, e.g. #463 and #465.

Yes, this sounds reasonable to me.

bgamari commented 6 years ago

Actually, wait a moment. Unless I'm mistaken we don't support building in anything but sandbox mode with cabal 2. Don't we require cabal-install >= 2.1 to use new-build mode?

snowleopard commented 6 years ago

@bgamari Yes, the current constraint is actually cabal-install >= 2.1, since otherwise we could not pass additional parameters to the executable, see #438. Maybe we can relax this to cabal-install >= 2.0 by finding a workaround for #438.

duog commented 6 years ago

Perhaps we could pass parameters to the executable through an environment variable rather than the command line?

bgamari commented 6 years ago

So apparently the plan is to release cabal-install 2.1 well before the GHC 8.4 release, so it's possible we could do mandate 2.1 and keep the global database codepath around for users who really can't upgrade for some reason.

snowleopard commented 6 years ago

@duog I don't think we want to rework Hadrian just to support pre-2.1 Cabal...

@bgamari Sounds good!

snowleopard commented 6 years ago

We have dropped support for Cabal < 2.2 in #668.