haskell / haskell/cabal

Modifying new-build compiler flags without rebuilding is quite difficult

Open
#4,757 2 comments 0 reactions 0 assignees View on GitHub
cabal-install: v2-build system type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

While debugging GHC issues encountered while building with `cabal-install` it is often useful to be able to add flags to the computed `ghc` command line (e.g. `-ddump-tc-trace` or `-keep-tmp-files`). With old `build` this was relatively straightforward as I could just invoke `cabal build` with `-v3` and grab the full command line.

While this mostly works witth `new-build`, one has the additional challenge of identifying which build directory to run the command line in. Emitting this path in the `-v3` output would certainly help here.

However, it would be even better to e a bit more selective about which flags contribute to the hash so that one could simply add the desired flags to `--ghc-options`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.