Proposal: use a stackage snapshot for Hadrian
Due to a recent change in Shake, versions of GHC prior to cc7d5650 (mid December 2019) do not compile with Hadrian. This will make bisecting and other diagnosis more inconvenient than they should.
The current fix (linked above) is to add an upper bound to Shake. But upper bounds are hard to maintain, and I feel that even with the best of intentions this problem is likely to happen again (maybe due to Shake because of a mistaken upper bound, or because of another package without an upper bound).
I think that we really want to avoid this situation. And therefore I'm proposing to use a stackage snapshot as a source of dependencies to build Hadrian. A stackage snapshot is easy to update: just choose a more recent snapshot, and it is guaranteed to remain stable over time.
Stackage snapshots provide freeze files for cabal (e.g. for lts-12.21). I see two possible ways to provide this freeze file to cabal:
- either we manually copy the freeze file and check it into git
- or we let the script
build.cabal.sh
download the freeze file on its own (with a curl call)
(1) is a bit more maintenance, as we need to copy the file in rather than just changing a number when we want to update the snapshot. However it has the advantage that we can easily apply some manual version override, if need be. (and the minor advantage that if Hadrian is already built, GHC can be compiled completely off-line.
So I'm, personally, rather in favour of (1).
(cc @alp @snowleopard )