haskell / haskell/cabal

`--ghc-options` are cached, but shouldn't be

Open
#7,816 17 comments 1 reaction 0 assignees View on GitHub
type: user-question
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
When passing GHC options to `cabal build` (via `--ghc-options`), those options are still applied on later invocations of `cabal build` (unless `cabal clean` has been performed in the meantime).

**To Reproduce**
Steps to reproduce the behavior:

```
$ cabal v2-build --ghc-options="-ddump-simpl"
outputs core
modify the code
$ cabal v2-build
still outputs core
```

**Expected behavior**
No core output when building the second time (i.e. don't use the GHC options from the previous build).

**System information**
cabal-install version: 3.6.2.0
GHC version: 8.10.7

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.