asterius icon indicating copy to clipboard operation
asterius copied to clipboard

Add official support for building and using with cabal instead of stack

Open TerrorJack opened this issue 5 years ago • 2 comments

Is your feature request related to a problem? Please describe. In the early days of this project, we chose stack as the official build system mainly because it's capable of managing sandboxed GHC installations, and it can install the bindists of our GHC fork with a single command. There are downsides though:

  • A stack-based build system is harder to migrate to bazel or nix, compared to cabal. The IOHK fork needs to set up a proper cabal project for the tree first.
  • When it comes to profiling, stack makes things harder to get right (e.g. -fno-prof-auto doesn't seem to work properly).

We can still live with stack from now on, but having official cabal build support can be handy at times, and it seems to be helpful with the ongoing bazel/nix efforts too.

Describe the solution you'd like

  • [ ] Check in the generated .cabal files and the cabal freeze file for the stackage snapshot we're using.
  • [ ] Set up the cabal project file.
  • [ ] Test cabal build support. We need to be cautious whether ahc-cabal will pollute the host ~/.cabal; if so, we need to find a way to isolate host/wasm cabal artifacts
  • [ ] Move to cabal-based building for the base/stackage prebuilt images.

TerrorJack avatar May 03 '20 20:05 TerrorJack

This would be super nice, especially paired with GHC 8.10 support!

InBetweenNames avatar May 03 '20 21:05 InBetweenNames

To be honest, as argued in detail in #617, neither Stack nor Cabal are appropriate for a project of this complexity. We are currently abusing Setup.hs scripts in ways that make build and execution very brittle, and destroy any ability to remote cache.

mboes avatar May 10 '20 08:05 mboes