cabal v2-haddock isn't respecting --ghc-options
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
I am trying to run `cabal v2-haddock --ghc-options='-Wwarn'` but despite that, it is still erroring (due to my project-wide `-Werror`)
`cabal v2-build --ghc-options='-Wwarn'` successfully only warns instead of errors however.
**To Reproduce**
* Add `-Werror` to your cabal file ghc options
* Introduce a warning (e.g. unused variable)
* `cabal haddock --ghc-options='-Wwarn'` will fail
Please use version-prefixed commands (e.g. `v2-build` or `v1-build`) to avoid ambiguity.
**Expected behavior**
I would expect haddock generation to respect my ghc options. In this example, I would expect it to warn but not error.
**System information**
```
NixOS 20.03
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library
The Glorious Glasgow Haskell Compilation System, version 8.6.5
```
Contributor guide
Assessment
This issue has not been assessed yet.